/* =====================================================
   墨睿思引擎 · 全局样式
   品牌色：墨黑 #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: 16px 40px;
    background: rgba(10, 11, 15, 0.95);
    border-bottom: 1px solid #1a1810;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}
.nav-left .logo-link {
    font-size: 22px;
    font-weight: 700;
    color: #ffd700;
    text-decoration: none;
}
.nav-center {
    display: flex;
    gap: 24px;
    align-items: center;
}
.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-community {
    color: #ffd700 !important;
    border: 1px solid #ffd700;
    border-radius: 20px;
    padding: 4px 14px !important;
}
.nav-community:hover {
    background: #ffd700;
    color: #0a0b0f !important;
}
.nav-community-cn {
    color: #8a8560 !important;
    font-size: 13px;
}
.nav-right {
    display: flex;
    gap: 16px;
    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: 6px 18px;
    border-radius: 30px;
    font-weight: 600;
}
.btn-nav:hover {
    background: #ffecb3 !important;
}

/* ===== 英雄区 ===== */
.hero {
    text-align: center;
    padding: 120px 20px 60px;
}
.hero h1 {
    font-size: 64px;
    background: linear-gradient(135deg, #ffd700, #ffecb3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p {
    font-size: 18px;
    color: #8a8560;
    margin: 16px 0;
}
.badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0;
}
.badge {
    display: inline-block;
    background: #1a1c24;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #2a2515;
    font-size: 13px;
}
.badge.gold {
    border-color: #ffd700;
    color: #ffd700;
}
.hero-btns {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: #ffd700;
    color: #0a0b0f;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
}
.btn-primary:hover {
    background: #ffecb3;
}
.btn-secondary {
    display: inline-block;
    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;
}

/* ===== 模式展示 ===== */
.modes-section {
    padding: 40px 20px;
}
.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}
.mode-card {
    background: #1a1c24;
    border: 1px solid #2a2515;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
}
.mode-card.gold {
    border-color: #ffd700;
}
.mode-card .icon {
    font-size: 40px;
    margin-bottom: 12px;
}
.mode-card h3 {
    color: #ffd700;
    font-size: 20px;
}
.mode-card p {
    color: #8a8560;
    font-size: 14px;
    margin-top: 8px;
}

/* ===== 社区专区 ===== */
.community-section {
    padding: 60px 20px;
    border-top: 1px solid #1a1810;
    text-align: center;
}
.community-section h2 {
    font-size: 32px;
    color: #ffd700;
}
.community-section p {
    color: #8a8560;
}
.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 30px auto 0;
}
.community-card {
    background: #1a1c24;
    border: 1px solid #2a2515;
    border-radius: 16px;
    padding: 32px 24px;
    transition: 0.3s;
}
.community-card:hover {
    border-color: #ffd700;
    transform: translateY(-4px);
}
.community-card .icon {
    font-size: 40px;
}
.community-card h3 {
    color: #e0e0e0;
    margin: 8px 0;
}
.community-card p {
    color: #8a8560;
    font-size: 14px;
}
.btn-community {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 20px;
    border: 1px solid #ffd700;
    border-radius: 30px;
    color: #ffd700;
    text-decoration: none;
    font-size: 14px;
}
.btn-community:hover {
    background: #ffd700;
    color: #0a0b0f;
}

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

/* ===== AI对话 ===== */
#chatBox .msg {
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    line-height: 1.6;
}
#chatBox .msg.user {
    background: #2a2515;
    color: #ffecb3;
    text-align: right;
    border-bottom-right-radius: 4px;
}
#chatBox .msg.assistant {
    background: #0a0b0f;
    border: 1px solid #2a2515;
    border-bottom-left-radius: 4px;
    color: #e0e0e0;
}

/* ===== 通用容器 ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 模式按钮 ===== */
.mode-btn {
    background: #1a1c24;
    border: 1px solid #2a2515;
    border-radius: 30px;
    padding: 8px 20px;
    color: #8a8560;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}
.mode-btn.active {
    border-color: #ffd700;
    color: #ffd700;
}
.mode-btn:hover {
    border-color: #ffd700;
}

/* ===== 代码块增强 ===== */
.code-block {
    background: #0a0b0f;
    border: 1px solid #2a2515;
    border-radius: 12px;
    overflow: hidden;
    margin: 8px 0;
    width: 100%;
}
.code-block .code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #1a1c24;
    border-bottom: 1px solid #2a2515;
    font-size: 12px;
    color: #8a8560;
    flex-wrap: wrap;
    gap: 4px;
}
.code-block .code-header .lang {
    color: #ffd700;
    font-weight: 600;
}
.code-block .code-header .code-actions {
    display: flex;
    gap: 8px;
}
.code-block .code-header .code-actions button {
    background: transparent;
    border: none;
    color: #8a8560;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: 4px;
}
.code-block .code-header .code-actions button:hover {
    background: #2a2515;
    color: #ffd700;
}
.code-block pre {
    padding: 12px 14px;
    margin: 0;
    overflow-x: auto;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #e0e0e0;
    white-space: pre-wrap;
    word-break: break-word;
}
/* 睿模式代码框架强化 */
.code-block {
    border: 2px solid #ffd700 !important;
    border-radius: 12px !important;
    margin: 12px 0 !important;
    background: #0a0b0f !important;
}
.code-block .code-header {
    background: #1a1c24 !important;
    border-bottom: 2px solid #ffd700 !important;
    padding: 8px 14px !important;
}
.code-block .code-header .lang {
    color: #ffd700 !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}
.code-block pre {
    padding: 14px 16px !important;
    font-size: 13px !important;
    line-height: 1.8 !important;
}
