/* ============================================================
 * 深圳初二学习提分工具 · 深色主题
 * ============================================================ */

:root {
  --bg: #0a0f16;
  --bg-soft: #0e151f;
  --panel: #131c2a;
  --panel-2: #182333;
  --line: #243246;
  --line-soft: #1c2839;
  --text: #e7eef6;
  --text-2: #9fb0c3;
  --text-3: #64748b;
  --accent: #5eead4;
  --math: #38bdf8;
  --physics: #f5a623;
  --chemistry: #34d399;
  --radius: 12px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .45);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ol, ul { list-style: none; }
::selection { background: rgba(94, 234, 212, .25); }

/* ========== 顶部导航 ========== */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(10, 15, 22, .88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, #1a2740, #0e1a2e); border: 1px solid var(--line); color: var(--accent); }
.brand-text { font-weight: 700; font-size: 16px; line-height: 1.1; display: flex; flex-direction: column; }
.brand-text small { font-size: 9px; font-weight: 500; color: var(--text-3); letter-spacing: 1.5px; }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { padding: 8px 14px; font-size: 14px; color: var(--text-2); border-radius: 8px; transition: all .2s; position: relative; }
.mainnav a:hover { color: var(--text); background: var(--panel); }
.mainnav a.active { color: var(--accent); background: rgba(94, 234, 212, .1); }
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; font-style: normal; font-weight: 700; background: #ef4444; color: #fff; border-radius: 9px; margin-left: 4px; vertical-align: top; }

/* ========== Hero ========== */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse 80% 60% at 50% 0%, #0f1a2e, var(--bg)); }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line-soft) 1px, transparent 1px), linear-gradient(90deg, var(--line-soft) 1px, transparent 1px); background-size: 48px 48px; opacity: .3; mask: radial-gradient(ellipse 70% 50% at 50% 30%, #000 30%, transparent 80%); }
.hero-glow { position: absolute; top: -60%; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(94, 234, 212, .12), transparent 60%); filter: blur(60px); }
.hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 64px 20px 40px; text-align: center; }
.hero-kicker { font-size: 11px; letter-spacing: 3px; color: var(--accent); opacity: .7; margin-bottom: 16px; }
.hero-title { font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.hero-title .accent { color: var(--accent); }
.hero-sub { font-size: 15px; color: var(--text-2); line-height: 1.8; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.hero-stats .stat { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-size: 28px; font-weight: 800; color: var(--text); }
.hero-stats span { font-size: 12px; color: var(--text-3); }
.hero-domain { max-width: 1100px; margin: 0 auto; padding: 0 20px 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ========== 按钮 ========== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; font-size: 14px; font-weight: 600; border-radius: 10px; border: 1px solid var(--line); transition: all .2s; background: var(--panel); color: var(--text); }
.btn-primary { background: var(--accent); color: #0a0f16; border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 20px rgba(94, 234, 212, .3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--panel); }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ========== 学科入口 ========== */
.subject-entry { display: block; padding: 18px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); transition: all .25s; }
.subject-entry:hover { border-color: var(--dc); transform: translateY(-2px); box-shadow: var(--shadow); }
.subject-entry .se-icon { font-size: 24px; margin-bottom: 8px; }
.subject-entry .se-name { font-weight: 700; font-size: 16px; }
.subject-entry .se-en { font-size: 10px; color: var(--text-3); letter-spacing: 1.5px; }
.subject-entry .se-count { font-size: 13px; color: var(--text-2); margin-top: 6px; }

/* ========== Container & Section ========== */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 20px 64px; }
.section-head { margin-bottom: 24px; }
.section-head h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.section-head p { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ========== 学科 Tabs ========== */
.subject-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.stab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; font-size: 14px; font-weight: 600; color: var(--text-2); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; transition: all .2s; }
.stab:hover { color: var(--text); border-color: var(--tab-color); }
.stab.active { color: #0a0f16; background: var(--tab-color); border-color: var(--tab-color); }
.stab-count { font-size: 11px; opacity: .7; }

/* ========== 章节卡片网格 ========== */
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.chapter-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: all .25s; cursor: pointer; border-top: 3px solid var(--dc); }
.chapter-card:hover { transform: translateY(-3px); border-color: var(--dc); box-shadow: 0 8px 30px rgba(0, 0, 0, .3); }
.chapter-card .cc-head { padding: 18px 20px 12px; }
.chapter-card .cc-num { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.chapter-card .cc-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.chapter-card .cc-summary { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.chapter-card .cc-body { padding: 0 20px 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.chapter-card .cc-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.chapter-card .cc-tag b { color: var(--text-2); }
.chapter-card .cc-foot { padding: 12px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; }
.chapter-card .cc-foot .cc-btn { font-size: 13px; font-weight: 600; color: var(--dc); }
.chapter-card .cc-progress { font-size: 12px; color: var(--text-3); }

/* ========== Modal ========== */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .65); backdrop-filter: blur(6px); display: grid; place-items: start center; padding: 40px 16px; overflow-y: auto; }
.modal { position: relative; width: 100%; max-width: 720px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 10; width: 34px; height: 34px; display: grid; place-items: center; font-size: 16px; color: var(--text-2); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; transition: all .2s; }
.modal-close:hover { color: var(--text); border-color: var(--text-3); }

/* 章节详情 Banner */
.modal-banner { padding: 24px 28px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--dc) 12%, var(--bg-soft)), var(--bg-soft)); }
.modal-banner .mb-tags { display: flex; gap: 6px; margin-bottom: 8px; }
.modal-banner .mb-tag { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 6px; background: color-mix(in srgb, var(--dc) 15%, transparent); color: var(--dc); }
.modal-banner h3 { font-size: 22px; font-weight: 800; }
.modal-banner .mb-summary { font-size: 14px; color: var(--text-2); margin-top: 6px; line-height: 1.6; }
.modal-body { padding: 24px 28px 32px; }

/* 折叠面板 */
.accordion { margin-bottom: 20px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.acc-head { width: 100%; padding: 14px 18px; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; text-align: left; background: var(--panel); color: var(--text); transition: background .2s; }
.acc-head:hover { background: var(--panel-2); }
.acc-head .acc-icon { font-size: 18px; }
.acc-head .acc-arrow { margin-left: auto; font-size: 12px; color: var(--text-3); transition: transform .2s; }
.acc-head.open .acc-arrow { transform: rotate(90deg); }
.acc-body { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.acc-body.open { padding: 16px 18px 20px; max-height: 2000px; }

/* 知识点卡片 */
.kp-card { padding: 14px 16px; margin-bottom: 10px; background: var(--panel); border-left: 3px solid var(--dc); border-radius: 8px; }
.kp-card .kp-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.kp-card .kp-content { font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* 高频考点 */
.exam-wrap { margin-bottom: 10px; }
.exam-item { padding: 12px 14px; background: var(--panel); border-radius: 8px; display: flex; align-items: center; gap: 10px; }
.exam-item .exam-text { flex: 1; font-size: 13px; }
.exam-item .freq-tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.freq-tag.高频 { background: rgba(239, 68, 68, .15); color: #f87171; }
.freq-tag.中频 { background: rgba(245, 166, 35, .15); color: #fbbf24; }
.freq-tag.低频 { background: rgba(100, 116, 139, .15); color: #94a3b8; }
.freq-tag.高频压轴 { background: rgba(251, 113, 133, .15); color: #fb7185; }

/* 典型例题（高频考点/易错点共用） */
.ex-block { margin-top: 6px; }
.ex-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: rgba(56, 189, 248, .08); border: 1px dashed rgba(56, 189, 248, .4); color: #7dd3fc; font-size: 12px; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; transition: background .2s; }
.ex-toggle:hover { background: rgba(56, 189, 248, .16); }
.ex-toggle .ex-arrow { transition: transform .2s; display: inline-block; }
.ex-toggle.open .ex-arrow { transform: rotate(90deg); }
.ex-body { display: none; margin-top: 6px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
.ex-body.show { display: block; }
.ex-stem { font-size: 13px; line-height: 1.8; margin-bottom: 10px; font-weight: 600; color: var(--text-1); }
.ex-options { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 12px; }
.ex-options .qc-option { padding: 8px 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.6; display: flex; gap: 10px; cursor: default; }
.ex-options .opt-letter { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); font-size: 11px; font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.ex-reveal { width: 100%; padding: 8px 12px; background: rgba(245, 166, 35, .08); border: 1px dashed rgba(245, 166, 35, .4); color: #fbbf24; border-radius: 6px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .2s; margin-bottom: 10px; }
.ex-reveal:hover { background: rgba(245, 166, 35, .16); }
.ex-reveal.open { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .4); color: #34d399; }
.ex-solution { display: none; }
.ex-solution.show { display: block; }
.ex-steps { display: flex; flex-direction: column; }
.ex-steps .qc-step { padding: 6px 0; }
.ex-answer { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-soft); font-size: 13px; font-weight: 700; color: #34d399; line-height: 1.7; }

/* 易错点 */
.mistake-wrap { margin-bottom: 12px; }
.mistake-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.mistake-wrap .ex-toggle { background: rgba(251, 113, 133, .08); border-color: rgba(251, 113, 133, .4); color: #fda4af; }
.mistake-wrap .ex-toggle:hover { background: rgba(251, 113, 133, .16); }
.mistake-cell { padding: 10px 12px; border-radius: 8px; font-size: 12px; line-height: 1.6; }
.mistake-cell.wrong { background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .2); }
.mistake-cell.correct { background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .2); }
.mistake-cell.reason { background: rgba(139, 92, 246, .08); border: 1px solid rgba(139, 92, 246, .2); }
.mistake-cell .mc-label { font-size: 10px; font-weight: 700; text-transform: uppercase; opacity: .6; margin-bottom: 4px; display: block; }
.mistake-cell.wrong .mc-label { color: #f87171; }
.mistake-cell.correct .mc-label { color: #34d399; }
.mistake-cell.reason .mc-label { color: #a78bfa; }

/* 5分钟预习 */
.preview-box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.preview-box .pv-section { margin-bottom: 16px; }
.preview-box .pv-section:last-child { margin-bottom: 0; }
.preview-box .pv-label { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.preview-box .pv-point { display: flex; gap: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 6px; }
.preview-box .pv-point::before { content: ''; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 8px; }
.preview-box .pv-q { padding: 10px 12px; background: var(--bg-soft); border-radius: 8px; margin-bottom: 8px; }
.preview-box .pv-q .pv-q-text { font-size: 13px; margin-bottom: 6px; }
.preview-box .pv-q .pv-q-answer { font-size: 12px; color: var(--text-3); }
.preview-box .pv-q .pv-q-answer .pv-toggle { color: var(--accent); cursor: pointer; font-weight: 600; }
.preview-box .pv-q .pv-q-answer .pv-ans-text { display: none; margin-top: 4px; color: #34d399; }
.preview-box .pv-q .pv-q-answer .pv-ans-text.show { display: inline; }

/* ========== 题目卡片（精准练习） ========== */
.question-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.question-card .qc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tier-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; }
.tier-badge.basic { background: rgba(52, 211, 153, .15); color: #34d399; }
.tier-badge.variation { background: rgba(56, 189, 248, .15); color: #38bdf8; }
.tier-badge.challenge { background: rgba(251, 113, 133, .15); color: #fb7185; }
.qc-type { font-size: 11px; color: var(--text-3); }
.qc-stem { font-size: 14px; line-height: 1.8; margin-bottom: 14px; }
.qc-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.qc-option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; cursor: pointer; transition: all .15s; }
.qc-option:hover { border-color: var(--text-3); }
.qc-option.selected { border-color: var(--accent); background: rgba(94, 234, 212, .08); }
.qc-option.correct { border-color: #34d399; background: rgba(52, 211, 153, .08); }
.qc-option.wrong { border-color: #ef4444; background: rgba(239, 68, 68, .08); }
.qc-option .opt-letter { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--panel-2); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.qc-input { width: 100%; padding: 10px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 14px; font-family: inherit; }
.qc-input:focus { outline: none; border-color: var(--accent); }
.qc-actions { display: flex; gap: 8px; margin-bottom: 0; }
.qc-feedback { padding: 12px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; display: none; }
.qc-feedback.show { display: block; }
.qc-feedback.correct-fb { background: rgba(52, 211, 153, .08); border: 1px solid rgba(52, 211, 153, .2); color: #34d399; }
.qc-feedback.wrong-fb { background: rgba(239, 68, 68, .08); border: 1px solid rgba(239, 68, 68, .2); color: #f87171; }

/* 步骤解析 */
.qc-steps { margin-top: 12px; display: none; }
.qc-steps.show { display: block; }
.qc-steps .qc-steps-title { font-size: 13px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.qc-step { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--text-2); line-height: 1.7; border-bottom: 1px dashed var(--line-soft); }
.qc-step:last-child { border-bottom: none; }
.qc-step .step-num { flex-shrink: 0; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); font-size: 11px; font-weight: 700; color: var(--accent); }

/* 错因选择器 */
.error-picker { margin-top: 12px; padding: 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 8px; display: none; }
.error-picker.show { display: block; }
.error-picker .ep-title { font-size: 13px; font-weight: 700; color: #f87171; margin-bottom: 10px; }
.error-picker .ep-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ep-btn { padding: 6px 14px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text-2); transition: all .15s; }
.ep-btn:hover { border-color: var(--ep-color); color: var(--ep-color); }
.ep-btn.active { background: var(--ep-color); color: #0a0f16; border-color: var(--ep-color); }

/* ========== 错题本 ========== */
.error-toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.error-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.ef-btn { padding: 6px 14px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text-2); transition: all .15s; }
.ef-btn:hover { color: var(--text); }
.ef-btn.active { background: var(--ef-color, var(--accent)); color: #0a0f16; border-color: var(--ef-color, var(--accent)); }

.error-card { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ec); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.error-card.resolved { opacity: .55; }
.error-card .ec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.error-card .ec-cat { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: var(--ec); color: #0a0f16; }
.error-card .ec-tier { font-size: 11px; }
.error-card .ec-time { font-size: 11px; color: var(--text-3); margin-left: auto; }
.error-card .ec-stem { font-size: 14px; line-height: 1.7; margin-bottom: 10px; }
.error-card .ec-answers { display: flex; gap: 16px; margin-bottom: 10px; font-size: 13px; flex-wrap: wrap; }
.error-card .ec-answers .ec-wrong { color: #f87171; }
.error-card .ec-answers .ec-correct { color: #34d399; }
.error-card .ec-actions { display: flex; gap: 8px; }

/* 纠错追踪指引 */
.trace-box { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--ec); border-radius: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; }
.trace-box .tb-label { font-size: 11px; font-weight: 700; color: var(--ec); margin-bottom: 4px; display: block; text-transform: uppercase; }
.trace-box .tb-link { color: var(--accent); cursor: pointer; font-weight: 600; }

/* 空状态 */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty-state .es-icon { font-size: 40px; margin-bottom: 12px; opacity: .4; }
.empty-state p { font-size: 15px; margin-bottom: 4px; color: var(--text-2); }
.empty-state span { font-size: 13px; }

/* ========== 复习指引 ========== */
.review-section { margin-bottom: 28px; }
.review-section h3 { font-size: 17px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.review-advice { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; color: var(--text-2); line-height: 1.8; margin-bottom: 20px; }
.review-advice .ra-highlight { color: var(--accent); font-weight: 700; }
.weak-list { display: flex; flex-direction: column; gap: 10px; }
.weak-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.weak-item .wi-rank { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--panel-2); font-weight: 700; font-size: 13px; color: var(--accent); flex-shrink: 0; }
.weak-item .wi-name { flex: 1; font-size: 14px; }
.weak-item .wi-count { font-size: 12px; color: var(--text-3); }
.weak-item .wi-bar { width: 80px; height: 6px; background: var(--bg-soft); border-radius: 3px; overflow: hidden; }
.weak-item .wi-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .5s; }
.cat-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.cat-stat { flex: 1; min-width: 120px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.cat-stat .cs-cat { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.cat-stat .cs-num { font-size: 22px; font-weight: 800; }
.cat-stat .cs-bar { margin-top: 8px; height: 4px; background: var(--bg-soft); border-radius: 2px; overflow: hidden; }
.cat-stat .cs-bar-fill { height: 100%; border-radius: 2px; }

/* ========== 设置 ========== */
.level-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.level-card { padding: 18px; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; cursor: pointer; transition: all .2s; text-align: center; }
.level-card:hover { border-color: var(--text-3); }
.level-card.active { border-color: var(--lc); background: color-mix(in srgb, var(--lc) 8%, var(--panel)); }
.level-card .lc-name { font-size: 16px; font-weight: 700; color: var(--lc); margin-bottom: 4px; }
.level-card .lc-desc { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.settings-block { margin-bottom: 24px; }
.settings-block h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.settings-row { display: flex; gap: 8px; }
.data-info { font-size: 13px; color: var(--text-3); margin-top: 10px; }

/* ========== Footer ========== */
.footer { border-top: 1px solid var(--line); padding: 28px 20px; text-align: center; }
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer p { font-size: 13px; color: var(--text-3); }
.footer .footer-note { font-size: 11px; margin-top: 4px; opacity: .7; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .topbar-inner { height: auto; flex-wrap: wrap; padding: 8px 16px; gap: 8px; }
  .mainnav { width: 100%; overflow-x: auto; margin-left: 0; }
  .mainnav a { white-space: nowrap; padding: 6px 12px; font-size: 13px; }
  .hero-inner { padding: 40px 16px 28px; }
  .hero-title { font-size: 24px; }
  .hero-stats { gap: 20px; }
  .hero-stats strong { font-size: 22px; }
  .hero-domain { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: 1fr; }
  .mistake-row { grid-template-columns: 1fr; }
  .level-grid { grid-template-columns: 1fr; }
  .modal { border-radius: 12px; }
  .modal-banner, .modal-body { padding: 16px 18px 20px; }
  .container { padding: 20px 16px 48px; }
}
