/* ============================================================
   知新 · 真题突破  —— 主样式
   双主题（浅/深），红色为品牌主色（提分向上）
   ============================================================ */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --border: #e5e7eb;
  --text: #1a1d21;
  --text-2: #5b6470;
  --text-3: #8b94a1;
  --brand: #d92b2b;
  --brand-soft: #fdecec;
  --brand-2: #b81f1f;
  --s1: #d92b2b;
  --s2: #e07b1f;
  --s3: #2f7ad6;
  --s4: #1a9c6b;
  --ok: #1a9c6b;
  --ok-soft: #e8f7f0;
  --warn: #e07b1f;
  --shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 24px rgba(16,24,40,.06);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --r: 14px;
  --r-sm: 9px;
}

html[data-theme="dark"] {
  --bg: #14161a;
  --surface: #1d2026;
  --surface-2: #23272e;
  --border: #2e333b;
  --text: #eef1f5;
  --text-2: #a3acb9;
  --text-3: #79828f;
  --brand: #e8554f;
  --brand-soft: #33211f;
  --brand-2: #f2736c;
  --s1: #e8554f;
  --s2: #e29238;
  --s3: #4a92e0;
  --s4: #2bb37c;
  --ok: #2bb37c;
  --ok-soft: #16302a;
  --warn: #e29238;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===================== 布局 ===================== */
.app { display: flex; min-height: 100vh; }

/* ---------- 侧栏 ---------- */
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; flex-shrink: 0;
}
.logo-name { font-weight: 700; font-size: 15.5px; letter-spacing: .3px; }
.logo-sub { font-size: 10.5px; color: var(--text-3); letter-spacing: 1.5px; margin-top: -3px; }

.stage-switch { margin: 0 12px 14px; padding: 4px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; display: flex; gap: 3px; }
.stage-switch button {
  flex: 1; padding: 7px 0; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); transition: .15s;
}
.stage-switch button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }

.nav { flex: 1; overflow-y: auto; padding: 0 12px 12px; }
.nav-label { font-size: 10.5px; color: var(--text-3); letter-spacing: 1.2px;
  padding: 12px 8px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 9px; font-size: 13.5px;
  color: var(--text-2); transition: .15s; text-align: left; margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-ico { width: 18px; text-align: center; font-size: 14px; }
.nav-badge { margin-left: auto; font-size: 10.5px; padding: 1px 6px; border-radius: 20px;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.nav-item.on .nav-badge { background: var(--surface); color: var(--brand); border-color: transparent; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.theme-btn { width: 100%; padding: 8px; border-radius: 9px; font-size: 12.5px;
  color: var(--text-2); border: 1px solid var(--border); background: var(--surface-2); }
.theme-btn:hover { color: var(--text); }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 60px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.crumb b { color: var(--text); font-weight: 650; }
.crumb .sp { color: var(--text-3); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.streak {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px;
  padding: 5px 11px; border-radius: 20px; background: var(--brand-soft);
  color: var(--brand); font-weight: 600;
}
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; }

.content { padding: 26px 30px 60px; max-width: 1180px; width: 100%; }

/* ===================== 通用组件 ===================== */
.h1 { font-size: 25px; font-weight: 750; letter-spacing: -.4px; }
.h2 { font-size: 17.5px; font-weight: 700; letter-spacing: -.2px; }
.h3 { font-size: 14.5px; font-weight: 650; }
.sub { color: var(--text-2); font-size: 13.5px; }
.tiny { font-size: 11.5px; color: var(--text-3); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm);
}

.btn {
  padding: 9px 17px; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  transition: .15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { border-color: var(--text-3); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.pill.red { background: var(--brand-soft); color: var(--brand); }
.pill.grey { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.orange { background: rgba(224,123,31,.12); color: var(--s2); }
.pill.blue { background: rgba(47,122,214,.12); color: var(--s3); }

.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.mb20 { margin-bottom: 20px; } .mb24 { margin-bottom: 24px; }

/* ===================== 首页 Hero ===================== */
.hero {
  border-radius: 18px; padding: 30px 32px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--brand) 0%, #a81a1a 100%);
  color: #fff; margin-bottom: 24px;
}
.hero::after {
  content: ''; position: absolute; right: -60px; top: -70px; width: 300px; height: 300px;
  border-radius: 50%; background: rgba(255,255,255,.09);
}
.hero::before {
  content: ''; position: absolute; right: 110px; bottom: -90px; width: 190px; height: 190px;
  border-radius: 50%; background: rgba(255,255,255,.07);
}
.hero h1 { font-size: 27px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 8px; position: relative; }
.hero p { font-size: 13.5px; opacity: .92; max-width: 560px; position: relative; }
.hero-stats { display: flex; gap: 34px; margin-top: 22px; position: relative; }
.hero-stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.hero-stat span { font-size: 11.5px; opacity: .85; }

/* ===================== 四步路线 ===================== */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 18px; position: relative; overflow: hidden; transition: .18s; text-align: left;
  display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--text-3); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.step-no {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 14px; color: #fff;
}
.step-title { font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.step-desc { font-size: 12px; color: var(--text-2); line-height: 1.6; flex: 1; }
.step-bar { height: 5px; border-radius: 20px; background: var(--surface-2); margin-top: 14px; overflow: hidden; }
.step-bar i { display: block; height: 100%; border-radius: 20px; transition: width .5s; }
.step-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 7px; }
.step-done { position: absolute; top: 14px; right: 14px; font-size: 15px; }

/* ===================== 知识点 / 题型 ===================== */
.module-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.module-head { padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; border-bottom: 1px solid transparent; transition: .15s; }
.module-head:hover { background: var(--surface-2); }
.module-head.open { border-bottom-color: var(--border); }
.module-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.module-body { padding: 4px 18px 14px; }
.point-row { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.point-row:last-child { border-bottom: none; }

.type-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-top: 10px; }
.type-card {
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px;
  background: var(--surface-2); cursor: pointer; transition: .15s; text-align: left;
}
.type-card:hover { border-color: var(--brand); background: var(--brand-soft); }
.type-card.disabled { opacity: .55; cursor: default; }

/* ===================== 做题 ===================== */
.q-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.q-progress { flex: 1; min-width: 130px; height: 6px; background: var(--surface-2);
  border-radius: 20px; overflow: hidden; border: 1px solid var(--border); }
.q-progress i { display: block; height: 100%; background: var(--brand); transition: width .35s; }

.q-stem { font-size: 15.5px; line-height: 1.95; padding: 16px 18px; background: var(--surface-2);
  border-radius: var(--r-sm); border: 1px solid var(--border); font-weight: 500; }

.opt {
  display: flex; gap: 11px; padding: 12px 15px; border: 1.5px solid var(--border);
  border-radius: var(--r-sm); margin-top: 10px; cursor: pointer; transition: .13s;
  background: var(--surface); font-size: 14px; align-items: flex-start;
}
.opt:hover { border-color: var(--brand); background: var(--brand-soft); }
.opt .key { font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.opt.picked { border-color: var(--brand); background: var(--brand-soft); }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .key { color: var(--ok); }
.opt.wrong { border-color: var(--brand); background: var(--brand-soft); }
.opt.wrong .key { color: var(--brand); }
.opt.locked { cursor: default; }

.answer-box { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--r-sm);
  overflow: hidden; }
.answer-head { padding: 11px 16px; background: var(--surface-2); font-size: 13.5px;
  font-weight: 650; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.answer-body { padding: 16px; }

.solution-step { display: flex; gap: 11px; padding: 9px 0; }
.solution-step .idx { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); font-size: 11.5px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; margin-top: 2px; }
.solution-step .txt { font-size: 13.5px; line-height: 1.8; color: var(--text); }
.solution-step.concl .txt { font-weight: 700; color: var(--brand); }
.solution-step.concl .idx { background: var(--brand); color: #fff; }

.video-box { display: flex; align-items: center; gap: 13px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); margin-top: 14px; }
.video-ico { width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--s3), #1e5fa8); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px; }

.tip { padding: 11px 14px; border-left: 3px solid var(--s2); background: rgba(224,123,31,.08);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 12.5px; color: var(--text-2); margin-top: 14px; }

/* ===================== 统计 / 图表 ===================== */
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat b { font-size: 24px; font-weight: 800; letter-spacing: -.6px; display: block; }
.stat span { font-size: 12px; color: var(--text-2); }

.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 132px 1fr 46px; align-items: center; gap: 12px; }
.bar-track { height: 9px; border-radius: 20px; background: var(--surface-2); overflow: hidden;
  border: 1px solid var(--border); }
.bar-track i { display: block; height: 100%; border-radius: 20px; transition: width .5s; }
.bar-val { font-size: 12.5px; font-weight: 650; text-align: right; }

/* 掌握度环形 */
.ring-wrap { display: flex; align-items: center; gap: 20px; }
.ring { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.ring-center b { font-size: 21px; font-weight: 800; }
.ring-center span { font-size: 10.5px; color: var(--text-3); }

/* ===================== 错题本 ===================== */
.wrong-item { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 14px 16px;
  background: var(--surface); transition: .15s; }
.wrong-item:hover { border-color: var(--text-3); }
.wrong-item.mastered { background: var(--ok-soft); border-color: var(--ok); opacity: .8; }
.wrong-stem { font-size: 13.5px; line-height: 1.75; }
.tag-list { display: flex; gap: 6px; flex-wrap: wrap; }

/* ===================== 真题冲刺（试卷式） ===================== */
.sprint-head { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); }
.timer { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -.5px; }
.qsheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px,1fr)); gap: 7px; }
.qsheet button { aspect-ratio: 1; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface-2); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.qsheet button.cur { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.qsheet button.done-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.qsheet button.done-no { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }

/* ===================== 上岸在即 ===================== */
.tier-list { display: flex; flex-direction: column; gap: 12px; }
.tier { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 15px 17px;
  background: var(--surface); display: flex; align-items: center; gap: 15px; }
.tier-ico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0; color: #fff; }

/* ===================== 登录页 ===================== */
.auth { display: flex; min-height: 100vh; }

/* 左侧品牌区 */
.auth-brand {
  width: 46%; flex-shrink: 0; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--brand) 0%, #8f1414 100%);
  color: #fff; padding: 46px 52px; display: flex; flex-direction: column;
}
.auth-brand::after {
  content: ''; position: absolute; right: -110px; top: -110px;
  width: 380px; height: 380px; border-radius: 50%; background: rgba(255,255,255,.08);
}
.auth-brand::before {
  content: ''; position: absolute; left: -80px; bottom: -130px;
  width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.06);
}
.auth-logo { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }
.auth-logo-mark {
  width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px;
}
.auth-logo-name { font-weight: 750; font-size: 16.5px; letter-spacing: .3px; }
.auth-logo-sub { font-size: 10.5px; opacity: .8; letter-spacing: 1.6px; margin-top: -3px; }

.auth-hero { margin-top: auto; position: relative; z-index: 2; }
.auth-hero h1 { font-size: 31px; font-weight: 800; letter-spacing: -.8px; line-height: 1.3; margin-bottom: 14px; }
.auth-hero p { font-size: 13.5px; opacity: .9; line-height: 1.85; max-width: 400px; }
.auth-path { margin-top: 30px; display: flex; flex-direction: column; gap: 13px; position: relative; z-index: 2; }
.auth-step { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.auth-step i {
  width: 25px; height: 25px; border-radius: 8px; background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3); display: flex; align-items: center;
  justify-content: center; font-size: 12px; font-weight: 700; font-style: normal;
  flex-shrink: 0;
}
.auth-step span { opacity: .93; }
.auth-foot { margin-top: 40px; font-size: 11.5px; opacity: .62; position: relative; z-index: 2; }

/* 右侧表单区 */
.auth-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 32px; background: var(--bg);
}
.auth-box { width: 100%; max-width: 372px; }
.auth-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.auth-tabs button {
  padding: 0 2px 12px; font-size: 16px; font-weight: 700; color: var(--text-3);
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; transition: .15s;
  letter-spacing: -.2px;
}
.auth-tabs button.on { color: var(--text); border-bottom-color: var(--brand); }
.auth-tabs button:hover { color: var(--text-2); }

.field { margin-bottom: 15px; }
.field label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px;
}
.field input, .field select {
  width: 100%; padding: 11px 13px; border-radius: 10px; font-size: 14px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; transition: .15s; outline: none;
}
.field input::placeholder { color: var(--text-3); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; line-height: 1.6;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; transition: .15s; outline: none; resize: vertical;
}

/* 纠错弹窗 */
.rpt-src {
  padding: 12px 14px; border-radius: 11px; background: var(--surface-2);
  border: 1px solid var(--border); margin-bottom: 16px;
}
.rpt-stem { font-size: 13.5px; line-height: 1.65; color: var(--text); }
.rpt-types { display: flex; flex-wrap: wrap; gap: 8px; }
.rpt-type {
  padding: 7px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: .15s;
}
.rpt-type:hover { border-color: var(--text-3); }
.rpt-type.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* 可点击 pill 按钮（纠错入口） */
.pill-btn {
  cursor: pointer; border: 1.5px dashed var(--border); background: transparent;
  color: var(--text-3); font-family: inherit; transition: .15s;
}
.pill-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ===================== 答题反馈大动画 ===================== */
.fb-mask {
  position: fixed; inset: 0; z-index: 1000; pointer-events: none;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, rgba(0,0,0,.14), rgba(0,0,0,.32));
  overflow: hidden;
}
.fb-pop {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: fb-pop .55s cubic-bezier(.2, 1.6, .4, 1) both;
}
.fb-right .fb-icon {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; font-size: 60px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 44px rgba(34,197,94,.45), 0 0 0 12px rgba(34,197,94,.15);
}
.fb-wrong .fb-icon {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #fff; font-size: 58px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 44px rgba(244,63,94,.4), 0 0 0 12px rgba(244,63,94,.13);
  animation: fb-pop .55s cubic-bezier(.2,1.6,.4,1) both, fb-shake .45s .3s ease-in-out both;
}
.fb-word {
  font-size: 24px; font-weight: 800; color: #fff; letter-spacing: .5px;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
.fb-streak {
  font-size: 14px; font-weight: 700; color: #fff; padding: 5px 14px; border-radius: 999px;
  background: rgba(0,0,0,.32); backdrop-filter: blur(4px);
}
@keyframes fb-pop {
  0% { transform: scale(.2); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fb-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px) rotate(-3deg); }
  40% { transform: translateX(9px) rotate(2deg); }
  60% { transform: translateX(-7px) rotate(-2deg); }
  80% { transform: translateX(5px) rotate(1deg); }
}
.fb-confetti {
  position: absolute; top: -16px; width: 9px; height: 15px; border-radius: 2px;
  opacity: 0; animation: fb-fall linear both;
}
@keyframes fb-fall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: .85; }
}

/* 通关横幅（做题列表页顶部） */
.pass-banner {
  padding: 10px 14px; border-radius: 11px; font-size: 13px; font-weight: 650;
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(34,197,94,.05));
  border: 1px solid rgba(34,197,94,.35); color: #16a34a;
}
.field.err input { border-color: var(--brand); }
.field .msg { font-size: 11.5px; color: var(--brand); margin-top: 5px; display: none; }
.field.err .msg { display: block; }

.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 11px 0; border-radius: 10px; font-size: 13.5px; font-weight: 650;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-2);
  transition: .15s;
}
.seg button.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

/* 登录方式切换（密码 / 验证码） */
.ltype {
  display: flex; gap: 6px; padding: 4px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 20px;
}
.ltype button {
  flex: 1; padding: 8px 0; border-radius: 8px; font-size: 13px; font-weight: 650;
  color: var(--text-3); transition: .15s;
}
.ltype button:hover { color: var(--text-2); }
.ltype button.on {
  background: var(--surface); color: var(--brand);
  box-shadow: 0 1px 3px rgba(0,0,0,.07);
}

/* 验证码输入行 */
.code-row { display: flex; gap: 9px; align-items: stretch; }
.code-row input { flex: 1; }
.code-btn {
  flex-shrink: 0; min-width: 108px; padding: 0 13px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--brand);
  font-size: 13px; font-weight: 650; transition: .15s;
}
.code-btn:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-soft); }
.code-btn:disabled { color: var(--text-3); cursor: not-allowed; background: var(--surface-2); }
.code-hint {
  margin-top: 8px; padding: 8px 11px; border-radius: 8px; font-size: 12px;
  background: var(--brand-soft); color: var(--text-2); line-height: 1.5;
}
.code-hint b { color: var(--brand); font-size: 13px; letter-spacing: 1px; }

/* 学段选择卡片 */
.stage-pick { display: flex; flex-direction: column; gap: 9px; }
.stage-opt {
  display: flex; align-items: center; gap: 12px; padding: 12px 13px;
  border: 1.5px solid var(--border); border-radius: 11px; background: var(--surface);
  transition: .15s; text-align: left; width: 100%;
}
.stage-opt:hover { border-color: var(--text-3); }
.stage-opt.on { border-color: var(--brand); background: var(--brand-soft); }
.so-mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; transition: .15s;
}
.stage-opt.on .so-mark { background: var(--brand); border-color: var(--brand); color: #fff; }
.so-text { flex: 1; min-width: 0; }
.so-text b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.so-text i { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.stage-opt.on .so-text b { color: var(--brand); }
.so-check { font-size: 14px; font-weight: 800; color: var(--brand); width: 14px; }

.check-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }
.link { font-size: 12.5px; color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; }

.auth-submit {
  width: 100%; padding: 12.5px 0; border-radius: 10px; font-size: 14.5px; font-weight: 700;
  background: var(--brand); color: #fff; transition: .15s; letter-spacing: .3px;
}
.auth-submit:hover { background: var(--brand-2); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }

.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 18px;
  font-size: 11.5px; color: var(--text-3); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.oauth { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.oauth button {
  padding: 10px 0; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 6px; transition: .15s;
}
.oauth button:hover { border-color: var(--text-3); color: var(--text); }

/* 登录页 · 提分视频入口 */
.video-entry {
  width: 100%; margin-top: 18px; padding: 13px 15px; border-radius: 12px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: linear-gradient(120deg, rgba(224,123,31,.1), rgba(217,43,43,.1));
  border: 1.5px solid rgba(224,123,31,.32); transition: .16s;
}
.video-entry:hover { border-color: var(--brand); transform: translateY(-1px); }
.ve-play {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; padding-left: 2px;
}
.ve-text { flex: 1; min-width: 0; }
.ve-text b { display: block; font-size: 13.5px; font-weight: 700; color: var(--text); }
.ve-text i { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.ve-arrow { font-size: 14px; font-weight: 700; color: var(--brand); }

.auth-demo {
  margin-top: 22px; padding: 12px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px dashed var(--border);
  font-size: 11.5px; color: var(--text-2); line-height: 1.7;
}
.auth-demo b { color: var(--brand); }

.auth-note { text-align: center; font-size: 11.5px; color: var(--text-3); margin-top: 22px; line-height: 1.7; }
.auth-note a { color: var(--text-2); text-decoration: underline; }

/* 顶栏用户菜单 */
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px;
  border-radius: 20px; transition: .15s; }
.user-btn:hover { background: var(--surface-2); }
.user-name { font-size: 13px; font-weight: 600; max-width: 90px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 9px); min-width: 196px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; z-index: 60; display: none;
}
.dropdown.show { display: block; }
.dd-head { padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }
.dd-head b { font-size: 13.5px; display: block; }
.dd-head span { font-size: 11.5px; color: var(--text-3); }
.dd-item {
  width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px;
  font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 9px;
}
.dd-item:hover { background: var(--surface-2); color: var(--text); }
.dd-item.danger { color: var(--brand); }
.dd-item.danger:hover { background: var(--brand-soft); }

/* ===================== 提分视频 ===================== */
.vcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; cursor: pointer; transition: .18s; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.vcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--text-3); }
.vthumb {
  position: relative; aspect-ratio: 16 / 9; display: flex;
  align-items: center; justify-content: center;
}
.vthumb-play {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.92);
  color: #111; display: flex; align-items: center; justify-content: center;
  font-size: 16px; padding-left: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.25);
  transition: .18s;
}
.vcard:hover .vthumb-play { transform: scale(1.1); }
.vthumb-dur {
  position: absolute; right: 9px; bottom: 9px; font-size: 11px; font-weight: 600;
  color: #fff; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 5px;
  font-variant-numeric: tabular-nums;
}
.vthumb-cat {
  position: absolute; left: 9px; top: 9px; font-size: 10.5px; font-weight: 700;
  color: #fff; background: rgba(0,0,0,.42); padding: 2px 8px; border-radius: 20px;
  backdrop-filter: blur(4px);
}
.vthumb-done {
  position: absolute; right: 9px; top: 9px; font-size: 10.5px; font-weight: 700;
  color: #fff; background: rgba(26,156,107,.92); padding: 2px 8px; border-radius: 20px;
}
.vbody { padding: 13px 15px 15px; flex: 1; display: flex; flex-direction: column; }
.vtitle { font-size: 14px; font-weight: 680; line-height: 1.5; margin-bottom: 6px; }
.vmeta { font-size: 11.5px; color: var(--text-3); margin-bottom: 8px; }
.vdesc {
  font-size: 12px; color: var(--text-2); line-height: 1.6; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* 播放器弹层 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10,12,16,.62); z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 20px; overflow-y: auto; backdrop-filter: blur(3px);
}
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  width: 100%; max-width: 780px; box-shadow: 0 24px 70px rgba(0,0,0,.45);
  animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 17px 20px; border-bottom: 1px solid var(--border);
}
.modal-close {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; font-size: 14px;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
}
.modal-close:hover { color: var(--brand); border-color: var(--brand); }
.modal-body { padding: 20px; }

.player {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: #0b0d10; position: relative;
}
.player-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px; color: #fff;
  text-align: center; padding: 20px;
}
.pe-icon {
  width: 62px; height: 62px; border-radius: 50%; background: rgba(255,255,255,.94);
  color: #111; display: flex; align-items: center; justify-content: center;
  font-size: 21px; padding-left: 4px; cursor: pointer; margin-bottom: 6px;
  box-shadow: 0 6px 22px rgba(0,0,0,.3); transition: .18s;
}
.pe-icon:hover { transform: scale(1.08); }
.pe-title { font-size: 15px; font-weight: 700; }
.pe-note { font-size: 12px; opacity: .85; }
.pe-btns { display: flex; gap: 9px; margin-top: 9px; }
.pe-btns .btn { background: rgba(255,255,255,.94); border-color: transparent; color: #111; }
.pe-btns .btn:hover { background: #fff; }

.point-list { display: flex; flex-direction: column; }

@media (max-width: 820px) {
  .modal-mask { padding: 16px 12px; }
  .modal-body { padding: 15px; }
}

/* ===================== 打印 & 响应式 ===================== */
.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty-ico { font-size: 38px; margin-bottom: 10px; opacity: .6; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none; z-index: 100;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1080px) {
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .auth-brand { width: 42%; padding: 36px 34px; }
  .auth-hero h1 { font-size: 26px; }
}
@media (max-width: 860px) {
  .auth-brand { display: none; }
  .auth-panel { padding: 32px 22px; }
}
@media (max-width: 820px) {
  .sidebar { width: 64px; }
  .logo-name, .logo-sub, .nav-label, .nav-item span.t, .nav-badge, .stage-switch { display: none; }
  .logo { justify-content: center; padding: 16px 0; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .content { padding: 18px 16px 50px; }
  .g2, .g3, .g4, .steps, .type-list { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
}
