/* =====================================================
   墨睿思引擎 · 全局样式
   品牌色：墨黑 #0a0b0f · 金色 #ffd700
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0a0b0f;
    color: #e0e0e0;
    font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
}

/* ===== 导航栏 ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(10, 11, 15, 0.95);
    border-bottom: 1px solid #1a1810;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 8px;
}
.nav-left .logo-link {
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-center {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.nav-center a {
    color: #8a8560;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}
.nav-center a:hover,
.nav-center a.active {
    color: #ffd700;
}
.nav-right {
    display: flex;
    gap: 12px;
    align-items: center;
}
.nav-right a {
    color: #8a8560;
    text-decoration: none;
    font-size: 14px;
}
.nav-right a:hover { color: #ffd700; }
.btn-nav {
    background: #ffd700;
    color: #0a0b0f !important;
    padding: 4px 16px;
    border-radius: 20px;
    font-weight: 600;
}
.btn-nav:hover { background: #ffecb3 !important; }

/* ===== 英雄区 ===== */
.hero { text-align: center; padding: 100px 20px 40px; }
.hero h1 { font-size: 48px; background: linear-gradient(135deg, #ffd700, #ff8c00); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 18px; color: #8a8560; margin: 12px 0; }
.hero .sub { font-size: 14px; color: #5a5530; }
.hero-btns { display: flex; justify-content: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.btn-primary { padding: 12px 32px; background: #ffd700; color: #0a0b0f; border-radius: 30px; text-decoration: none; font-weight: 600; }
.btn-primary:hover { background: #ffecb3; }
.btn-secondary { padding: 12px 32px; border: 1px solid #ffd700; color: #ffd700; border-radius: 30px; text-decoration: none; font-weight: 600; }
.btn-secondary:hover { background: #ffd700; color: #0a0b0f; }

/* ===== 功能亮点 ===== */
.features { padding: 40px 20px; max-width: 1100px; margin: 0 auto; }
.features h2 { text-align: center; font-size: 28px; color: #ffd700; margin-bottom: 30px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: #1a1c24; border: 1px solid #2a2515; border-radius: 16px; padding: 28px 20px; text-align: center; transition: 0.3s; }
.feature-card:hover { border-color: #ffd700; transform: translateY(-4px); }
.feature-card .icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h3 { color: #ffd700; font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: #8a8560; font-size: 14px; line-height: 1.6; }

/* ===== 社区 ===== */
.community-section { padding: 40px 20px; text-align: center; border-top: 1px solid #1a1810; }
.community-section h2 { font-size: 24px; color: #ffd700; }
.community-section p { color: #8a8560; }
.community-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 600px; margin: 20px auto 0; }
.community-card { background: #1a1c24; border: 1px solid #2a2515; border-radius: 12px; padding: 20px; }
.community-card .icon { font-size: 28px; }
.community-card h3 { color: #e0e0e0; }
.community-card a { color: #ffd700; text-decoration: none; }

/* ===== 页脚 ===== */
footer { text-align: center; padding: 24px 20px; border-top: 1px solid #1a1810; color: #5a5530; font-size: 13px; }
footer .footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 8px; }
footer .footer-links a { color: #5a5530; text-decoration: none; }
footer .footer-links a:hover { color: #ffd700; }

/* ===== AI对话 ===== */
.chat-wrapper { flex: 1; overflow: hidden; position: relative; min-height: 0; margin-top: 80px; }
.chat-container { height: 100%; overflow-y: auto; padding: 12px 16px 8px; display: flex; flex-direction: column; gap: 8px; padding-bottom: 80px; }
.message { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.6; word-wrap: break-word; animation: fadeIn 0.25s ease; position: relative; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.message.user { align-self: flex-end; background: #2a2515; color: #ffecb3; border-bottom-right-radius: 4px; }
.message.assistant { align-self: flex-start; background: #1a1c24; border: 1px solid #2a2515; border-bottom-left-radius: 4px; color: #e0e0e0; }
.message .msg-time { font-size: 9px; color: #5a5530; margin-top: 4px; text-align: right; }

/* ===== 模式切换 ===== */
.mode-bar { display: flex; gap: 6px; padding: 8px 16px; background: rgba(0,0,0,0.3); border-bottom: 1px solid #1a1810; flex-shrink: 0; flex-wrap: wrap; position: fixed; top: 52px; left: 0; right: 0; z-index: 50; }
.mode-btn { padding: 4px 14px; border-radius: 16px; border: 1px solid #2a2515; background: transparent; color: #8a8560; font-size: 12px; cursor: pointer; transition: 0.3s; }
.mode-btn.active { border-color: #ffd700; color: #ffd700; background: rgba(255,215,0,0.08); }

/* ===== 输入区域 ===== */
.input-area { position: fixed; bottom: 0; left: 0; right: 0; padding: 6px 12px 10px; background: #0a0b0f; border-top: 1px solid #1a1810; z-index: 50; }
.input-wrapper { display: flex; gap: 4px; align-items: center; }
.input-wrapper .tool-btn { background: transparent; border: none; font-size: 18px; cursor: pointer; padding: 4px; color: #8a8560; flex-shrink: 0; transition: 0.2s; border-radius: 6px; }
.input-wrapper .tool-btn:hover { color: #ffd700; }
.input-wrapper .tool-btn.recording { animation: pulse 0.8s infinite; color: #ff6b6b; }
@keyframes pulse { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.15); } }
.input-wrapper input { flex: 1; background: #1a1c24; border: 1px solid #2a2515; border-radius: 22px; padding: 8px 14px; color: #ffecb3; font-size: 14px; outline: none; min-height: 38px; }
.input-wrapper input:focus { border-color: #ffd700; }
.input-wrapper input::placeholder { color: #5a5530; font-size: 13px; }
.input-wrapper .send-btn { background: #ffd700; border: none; border-radius: 22px; padding: 8px 18px; color: #0a0b0f; font-weight: 600; cursor: pointer; font-size: 13px; flex-shrink: 0; min-height: 38px; }

/* ===== 文件预览 ===== */
.file-preview { display: none; background: #1a1c24; border: 1px solid #2a2515; border-radius: 10px; padding: 4px 12px; margin-bottom: 4px; font-size: 13px; color: #8a8560; align-items: center; gap: 8px; }
.file-preview.show { display: flex; }
.file-preview .remove-file { cursor: pointer; color: #ff6b6b; font-weight: bold; margin-left: auto; }

/* ===== 表情面板 ===== */
.emoji-panel { display: none; background: #1a1c24; border: 1px solid #2a2515; border-radius: 10px; padding: 6px 10px; margin-bottom: 4px; flex-wrap: wrap; gap: 4px; max-height: 100px; overflow-y: auto; }
.emoji-panel.show { display: flex; }
.emoji-panel span { font-size: 22px; cursor: pointer; padding: 2px 4px; border-radius: 4px; transition: 0.2s; }
.emoji-panel span:hover { background: #2a2515; transform: scale(1.15); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .navbar { padding: 8px 12px; }
    .nav-center { gap: 8px; }
    .nav-center a { font-size: 12px; }
    .hero h1 { font-size: 32px; }
    .feature-grid { grid-template-columns: 1fr; }
    .community-grid { grid-template-columns: 1fr; }
    .hero-btns { flex-direction: column; align-items: center; }
    .message { max-width: 92%; font-size: 13px; padding: 8px 12px; }
    .input-wrapper input { font-size: 13px; padding: 6px 12px; min-height: 34px; }
    .input-wrapper .send-btn { padding: 6px 14px; font-size: 12px; min-height: 34px; }
    .input-wrapper .tool-btn { font-size: 16px; }
}

/* ===== 核心功能卡片居中强化 ===== */
.feature-grid {
    justify-items: center;
}
.feature-card {
    width: 100%;
    max-width: 300px;
}

/* ===== 首页全局居中 ===== */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== 核心功能卡片居中 ===== */
.features {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}
.features h2 {
    text-align: center;
}
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.feature-card {
    background: #1a1c24;
    border: 1px solid #2a2515;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: 0.3s;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}
.feature-card .icon {
    display: block;
    margin: 0 auto 12px auto;
}
.feature-card h3 {
    text-align: center;
}
.feature-card p {
    text-align: center;
}

/* ===== 英雄区居中 ===== */
.hero {
    text-align: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
.hero h1 {
    text-align: center;
}
.hero p {
    text-align: center;
}
.hero-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* ===== 社区居中 ===== */
.community-section {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}
.community-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 600px;
    margin: 20px auto 0;
}

/* ===== 页脚居中 ===== */
footer {
    text-align: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* ===== 导航栏居中 ===== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: rgba(10, 11, 15, 0.95);
    border-bottom: 1px solid #1a1810;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 8px;
}
.nav-center {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.nav-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ===== 响应式：手机端单列 ===== */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
    .community-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
    .navbar {
        flex-direction: column;
        align-items: center;
        padding: 8px 12px;
    }
    .nav-center {
        justify-content: center;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
}

/* ===== 核心功能卡片强制居中 ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    justify-items: center;
}
.feature-card {
    width: 100%;
    max-width: 280px;
    text-align: center;
}
.feature-card .icon {
    display: block;
    margin: 0 auto 12px auto;
}
.feature-card h3 {
    text-align: center;
}
.feature-card p {
    text-align: center;
}
