/* ============================================
   黑神话：悟空 Wiki - 全局样式
   Black Myth: Wukong Wiki
   ============================================ */

:root {
    /* 悟空配色 */
    --primary: #f59e0b;           /* 金箍金 */
    --primary-light: #fbbf24;
    --primary-dark: #d97706;
    --secondary: #991b1b;         /* 中国红 */
    --secondary-light: #ef4444;

    /* 六回颜色 */
    --ch1-color: #f97316;         /* 第一回 · 火照黑云 - 赤焰橙 */
    --ch2-color: #eab308;         /* 第二回 · 风起黄昏 - 风沙黄 */
    --ch3-color: #22d3ee;         /* 第三回 · 夜生白露 - 寒夜青 */
    --ch4-color: #a855f7;         /* 第四回 · 曲度紫鸳 - 紫霞紫 */
    --ch5-color: #ef4444;         /* 第五回 · 日落红尘 - 烈焰红 */
    --ch6-color: #22c55e;         /* 第六回 · 未竟 - 花果绿 */

    /* 品质颜色 */
    --quality-common: #9ca3af;    /* 凡品 */
    --quality-rare: #3b82f6;      /* 良品 */
    --quality-epic: #a855f7;      /* 仙品 */
    --quality-legendary: #f59e0b; /* 神珍 */

    /* 五行颜色 */
    --fire: #ef4444;              /* 火 */
    --water: #3b82f6;             /* 水 */
    --earth: #92400e;             /* 土 */
    --wood: #22c55e;              /* 木 */
    --metal: #eab308;             /* 金 */

    /* 界面颜色 */
    --bg-dark: #0c0a09;           /* 墨黑 */
    --bg-card: #1c1917;           /* 深棕卡 */
    --bg-light: #292524;          /* 浅棕 */
    --text-primary: #fafaf9;      /* 宣纸白 */
    --text-secondary: #d6d3d1;    /* 米白 */
    --text-muted: #78716c;        /* 灰褐 */
    --border: #44403c;            /* 边框褐 */
    --border-gold: rgba(245,158,11,0.3);

    /* 状态 */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --radius: 6px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.7);
    --shadow-gold: 0 4px 20px rgba(245,158,11,0.2);
}

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

body {
    font-family: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
}

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, #0c0a09 0%, #1c1917 100%);
    border-bottom: 2px solid var(--border-gold);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav { display: flex; list-style: none; gap: 0.25rem; }

.navbar-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s;
    font-weight: 500;
}

.navbar-nav a:hover, .navbar-nav a.active {
    color: var(--primary);
    background: rgba(245,158,11,0.1);
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    padding: 5rem 2rem;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, #0c0a09 0%, #1a0a0a 30%, #0c0a09 60%, #1a1408 100%);
    border-bottom: 2px solid var(--border-gold);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(245,158,11,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 70% 60%, rgba(153,27,27,0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero::after {
    content: '🐵';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20rem;
    opacity: 0.03;
    pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.game-logo {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 30%, var(--secondary-light) 60%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ===== 主要内容区 ===== */
.main-content {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 60vh;
}

.content { flex: 1; min-width: 0; }

/* ===== 侧边栏 ===== */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.sidebar-section h3 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-nav { list-style: none; }

.sidebar-nav li { margin-bottom: 0.3rem; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    font-size: 0.88rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    color: var(--primary);
    background: rgba(245,158,11,0.08);
}

/* ===== 面包屑 ===== */
.breadcrumb {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a { color: var(--primary); text-decoration: none; }

.breadcrumb a:hover { text-decoration: underline; }

/* ===== 标题层级 ===== */
h1 { font-size: 2rem; font-weight: 800; margin: 1.5rem 0 1rem; color: var(--primary); letter-spacing: 0.02em; }
h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; color: var(--primary-light); padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 0.8rem; color: var(--text-primary); }

p { margin-bottom: 1rem; color: var(--text-secondary); line-height: 1.8; }

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    border-color: var(--border-gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.card-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.card h3 { font-size: 1.1rem; color: var(--primary); margin: 0.5rem 0; }

.card p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

.card-meta { display: flex; gap: 0.4rem; margin-top: 0.8rem; flex-wrap: wrap; }

/* ===== 标签 ===== */
.tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.tag-fire { background: rgba(239,68,68,0.15); color: #ef4444; }
.tag-water { background: rgba(59,130,246,0.15); color: #3b82f6; }
.tag-gold { background: rgba(245,158,11,0.15); color: #f59e0b; }
.tag-rare { background: rgba(168,85,247,0.15); color: #a855f7; }
.tag-hot { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ===== 数据表格 ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-table thead { background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(153,27,27,0.1)); }

.data-table th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 0.7rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover td { background: rgba(245,158,11,0.04); }

/* ===== 提示框 ===== */
.tip, .warning, .note {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.tip {
    background: rgba(245,158,11,0.08);
    border-color: var(--primary);
    color: var(--text-secondary);
}

.warning {
    background: rgba(239,68,68,0.08);
    border-color: var(--danger);
    color: var(--text-secondary);
}

.note {
    background: rgba(59,130,246,0.08);
    border-color: var(--info);
    color: var(--text-secondary);
}

/* ===== 页脚 ===== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 3rem;
}

.footer a { color: var(--primary); text-decoration: none; }

/* ===== 响应式设计 ===== */
@media(max-width: 768px) {
    .navbar-nav { display: none; }
    .hero { padding: 3rem 1rem; }
    .game-logo { font-size: 2rem; }
    .main-content { flex-direction: column; padding: 0 1rem; }
    .sidebar { width: 100%; }
    .card-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.5rem; }
}

/* ===== 章节颜色 ===== */
.ch-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.ch1 { background: rgba(249,115,22,0.15); color: #f97316; }
.ch2 { background: rgba(234,179,8,0.15); color: #eab308; }
.ch3 { background: rgba(34,211,238,0.15); color: #22d3ee; }
.ch4 { background: rgba(168,85,247,0.15); color: #a855f7; }
.ch5 { background: rgba(239,68,68,0.15); color: #ef4444; }
.ch6 { background: rgba(34,197,94,0.15); color: #22c55e; }

/* ===== 品质 ===== */
.q-common { border-left: 3px solid var(--quality-common); }
.q-rare { border-left: 3px solid var(--quality-rare); }
.q-epic { border-left: 3px solid var(--quality-epic); }
.q-legendary { border-left: 3px solid var(--quality-legendary); }

/* ===== 品质标签 ===== */
.q-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
}
.qb-common { background: rgba(156,163,175,0.2); color: #9ca3af; }
.qb-rare { background: rgba(59,130,246,0.2); color: #3b82f6; }
.qb-epic { background: rgba(168,85,247,0.2); color: #a855f7; }
.qb-legendary { background: rgba(245,158,11,0.2); color: #f59e0b; }

/* ===== 属性条 ===== */
.stat-row { display: flex; align-items: center; margin: 0.4rem 0; gap: 0.5rem; }
.stat-name { width: 50px; font-size: 0.85rem; color: var(--text-muted); flex-shrink: 0; }
.stat-bar { flex: 1; height: 8px; background: var(--bg-light); border-radius: 4px; overflow: hidden; }
.stat-fill { height: 100%; border-radius: 4px; transition: width 0.5s; }
.stat-fill.fire { background: linear-gradient(90deg, #ef4444, #dc2626); }
.stat-fill.ice { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.stat-fill.thunder { background: linear-gradient(90deg, #eab308, #a16207); }
.stat-fill.mystic { background: linear-gradient(90deg, #a855f7, #7e22ce); }

/* ===== 一键安装按钮 ===== */
.mod-btn-install {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all .3s;
    box-shadow: 0 3px 12px rgba(245,158,11,0.3);
}

.mod-btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,158,11,0.4);
}

/* ===== 进度条 ===== */
.progress-section { margin: 1.5rem 0; }
.progress-item { margin: 0.8rem 0; }
.progress-label { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.progress-track { height: 8px; background: var(--bg-light); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--primary-dark), var(--primary)); transition: width 0.5s; }

/* ===== 页面内锚点 ===== */
:target { scroll-margin-top: 70px; }

/* ===== 列表样式 ===== */
ul, ol { margin: 0.5rem 0 1rem 1.5rem; color: var(--text-secondary); }
li { margin: 0.3rem 0; }
