:root {
  --bg: #070b16;
  --bg2: #0d1426;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.10);
  --text: #eef2ff;
  --muted: #94a3c4;
  --accent: #6366f1;
  --accent2: #22d3ee;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #22d3ee 100%);
  --grad-warm: linear-gradient(135deg, #fb7185 0%, #f59e0b 100%);
  --good: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --mc: #6366f1; /* 积木色（按模块注入） */
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --glow: 0 12px 38px rgba(99, 102, 241, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1100px 620px at 82% -8%, rgba(99, 102, 241, 0.22), transparent 62%),
    radial-gradient(900px 520px at -8% 8%, rgba(34, 211, 238, 0.14), transparent 58%),
    radial-gradient(700px 500px at 50% 120%, rgba(139, 92, 246, 0.12), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ============ 背景装饰层（漂浮积木光球 + 网格 + 对角水印） ============ */
.bg-deco { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-deco .blob { position: absolute; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; filter: blur(60px); opacity: 0.5; }
.bg-deco .b1 { width: 420px; height: 420px; top: -120px; right: -80px; background: radial-gradient(circle at 30% 30%, #6366f1, transparent 70%); animation: float1 16s ease-in-out infinite; }
.bg-deco .b2 { width: 360px; height: 360px; bottom: -100px; left: -90px; background: radial-gradient(circle at 30% 30%, #22d3ee, transparent 70%); animation: float2 19s ease-in-out infinite; }
.bg-deco .b3 { width: 300px; height: 300px; top: 40%; left: 60%; background: radial-gradient(circle at 30% 30%, #8b5cf6, transparent 70%); animation: float1 22s ease-in-out infinite reverse; }
.bg-deco .grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 80%);
}
@keyframes float1 { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(-30px, 40px) rotate(12deg); } }
@keyframes float2 { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(40px, -30px) rotate(-12deg); } }

.watermark {
  position: fixed; top: 50%; left: 50%; z-index: -1; pointer-events: none;
  transform: translate(-50%, -50%) rotate(-28deg);
  font-size: 200px; font-weight: 900; letter-spacing: 20px;
  color: rgba(255,255,255,0.022); white-space: nowrap; user-select: none;
}

/* ============ 顶部导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 28px;
  background: rgba(7, 11, 22, 0.66);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 30px rgba(0,0,0,0.35);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; }
.brand .logo { position: relative; width: 38px; height: 38px; flex: none; }
.brand .logo::before, .brand .logo::after {
  content: ''; position: absolute; width: 21px; height: 21px; border-radius: 7px;
}
.brand .logo::before { left: 0; top: 1px; background: linear-gradient(135deg, #6366f1, #8b5cf6); box-shadow: 0 5px 14px rgba(99,102,241,.55); }
.brand .logo::after { right: 0; bottom: 1px; background: linear-gradient(135deg, #22d3ee, #0ea5e9); box-shadow: 0 5px 14px rgba(34,211,238,.5); }
.brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 14px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 14px;
  transition: .15s; position: relative;
}
.nav-links a:hover { color: var(--text); background: var(--panel); }
.nav-links a.active { color: #fff; background: rgba(99,102,241,.22); box-shadow: inset 0 0 0 1px rgba(124,131,253,.5); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn {
  border: 1px solid var(--border); background: var(--panel-strong); color: var(--text);
  padding: 9px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; transition: .18s;
}
.btn:hover { border-color: rgba(255,255,255,.28); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--grad); border: none; color: #fff; box-shadow: 0 10px 26px rgba(99,102,241,.5); }
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 14px 34px rgba(99,102,241,.62); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 13px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* ============ 容器 ============ */
.wrap { max-width: 1100px; margin: 0 auto; padding: 34px 24px 80px; }
.view { display: none; animation: fade .3s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 进场动效 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s cubic-bezier(.2,.7,.2,1), transform .55s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ============ Hero ============ */
.hero {
  position: relative; padding: 72px 36px 60px; border-radius: 28px; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(99,102,241,.26), rgba(34,211,238,.12) 60%, rgba(139,92,246,.16)),
    rgba(255,255,255,0.02);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 85% 0%, rgba(255,255,255,.10), transparent 60%);
  pointer-events: none;
}
.hero-blocks { position: absolute; inset: 0; pointer-events: none; }
.hero-blocks span {
  position: absolute; border-radius: 22% 78% 70% 30% / 40% 30% 70% 60%;
  filter: blur(2px); opacity: .9;
}
.hero-blocks .hb1 { width: 54px; height: 54px; top: 26px; right: 60px; background: linear-gradient(135deg,#fb7185,#f59e0b); animation: float1 9s ease-in-out infinite; }
.hero-blocks .hb2 { width: 38px; height: 38px; bottom: 36px; right: 160px; background: linear-gradient(135deg,#22d3ee,#0ea5e9); animation: float2 11s ease-in-out infinite; }
.hero-blocks .hb3 { width: 30px; height: 30px; top: 90px; left: 40px; background: linear-gradient(135deg,#8b5cf6,#6366f1); animation: float1 13s ease-in-out infinite reverse; }
.hero h1 { position: relative; font-size: 46px; line-height: 1.12; margin: 0 0 16px; font-weight: 900; letter-spacing: -.5px; }
.hero h1 .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { position: relative; color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 28px; line-height: 1.75; }
.hero-cta { position: relative; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn { padding: 12px 24px; font-size: 15px; }
.stats { position: relative; display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 150px; padding: 18px 20px; background: rgba(255,255,255,.04); border: 1px solid var(--border); border-radius: 16px; backdrop-filter: blur(6px); }
.stat b { font-size: 30px; display: block; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

/* ============ 卡片网格 ============ */
.grid { display: grid; gap: 16px; }
.grid-modules { grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); }
.grid-words { grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; transition: .2s; position: relative; overflow: hidden;
  backdrop-filter: blur(6px);
}
.card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.22); background: var(--panel-strong); box-shadow: 0 16px 36px rgba(0,0,0,.4); }
.module-card { cursor: pointer; border-top: 3px solid var(--mc); }
.module-card .ic {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; font-size: 27px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mc) 88%, #fff), var(--mc));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--mc) 38%, transparent);
  margin-bottom: 12px;
}
.module-card .mt { font-size: 18px; font-weight: 800; margin-top: 4px; }
.module-card .me { color: var(--muted); font-size: 12px; letter-spacing: .3px; margin-top: 2px; }
.module-card .bar { height: 7px; border-radius: 7px; background: rgba(255,255,255,.08); margin-top: 16px; overflow: hidden; }
.module-card .bar > i { display: block; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--mc), color-mix(in srgb, var(--mc) 60%, #22d3ee)); }
.module-card:hover { border-color: var(--mc); transform: translateY(-8px); box-shadow: 0 22px 44px color-mix(in srgb, var(--mc) 30%, transparent); }

.section-title { font-size: 25px; font-weight: 900; margin: 38px 0 18px; display: flex; align-items: center; gap: 12px; position: relative; }
.section-title::before { content: ''; width: 6px; height: 24px; border-radius: 4px; background: var(--grad); box-shadow: 0 0 14px rgba(99,102,241,.6); }
.section-title .sub { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ============ 单词卡 ============ */
.word-card .w { font-size: 22px; font-weight: 800; letter-spacing: .3px; }
.word-card .ph { color: var(--accent2); font-size: 14px; margin: 4px 0 8px; }
.word-card .pos { display: inline-block; font-size: 11px; color: var(--muted); border: 1px solid var(--border); padding: 1px 7px; border-radius: 6px; margin-right: 6px; }
.word-card .mean { font-size: 15px; margin: 6px 0; }
.word-card .ex { font-size: 13px; color: var(--muted); line-height: 1.6; }
.word-card .tr { font-size: 13px; color: #c7d0ec; line-height: 1.6; }
.tag { position: absolute; top: 14px; right: 14px; font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 700; }
.tag.new { background: rgba(148,163,184,.18); color: #cbd5e1; }
.tag.learning { background: rgba(245,158,11,.18); color: #fbbf24; }
.tag.mastered { background: rgba(16,185,129,.18); color: #34d399; }

/* ============ 发音按钮 ============ */
.spk { border: 1px solid var(--border); background: var(--panel-strong); color: var(--text); border-radius: 10px; width: 38px; height: 34px; font-size: 16px; display: inline-grid; place-items: center; transition: .15s; flex: none; }
.spk:hover { border-color: var(--accent); color: var(--accent2); transform: scale(1.08); box-shadow: 0 0 16px rgba(34,211,238,.4); }
.spk:active { transform: scale(.94); }
.word-card .w { display: flex; align-items: center; gap: 10px; }
.word-card .w .spk { margin-left: auto; }
.flashcard .front .spk { position: absolute; top: 16px; right: 16px; }
.flashcard .back .spk { position: absolute; top: 16px; right: 16px; }

/* ============ 闪卡学习 ============ */
.study-stage { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 24px 0; }
.flashcard { width: min(520px, 92vw); height: 280px; perspective: 1200px; cursor: pointer; }
.flashcard .inner { position: relative; width: 100%; height: 100%; transition: transform .5s; transform-style: preserve-3d; }
.flashcard.flipped .inner { transform: rotateY(180deg); }
.flashcard .face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--border); padding: 28px; text-align: center; box-shadow: var(--shadow);
}
.flashcard .front { background: linear-gradient(160deg, rgba(99,102,241,.26), rgba(34,211,238,.10)); box-shadow: 0 18px 50px rgba(99,102,241,.32); }
.flashcard .back { background: linear-gradient(160deg, rgba(34,211,238,.20), rgba(139,92,246,.16)); transform: rotateY(180deg); box-shadow: 0 18px 50px rgba(139,92,246,.3); }
.flashcard .big { font-size: 40px; font-weight: 900; letter-spacing: .5px; }
.flashcard .ph { color: var(--accent2); font-size: 16px; }
.flashcard .hint { color: var(--muted); font-size: 13px; }
.flashcard .back .mean { font-size: 22px; font-weight: 800; }
.flashcard .back .ex { font-size: 14px; color: var(--muted); line-height: 1.7; max-width: 90%; }
.study-controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.progress-line { width: min(520px, 92vw); }
.progress-line .pt { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

/* ============ 测验 ============ */
.quiz-box { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 28px; max-width: 620px; margin: 0 auto; box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.quiz-q { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.quiz-sub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.quiz-opts { display: grid; gap: 10px; }
.quiz-opt { text-align: left; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 15px; transition: .15s; }
.quiz-opt:hover { border-color: rgba(124,131,253,.6); background: rgba(99,102,241,.12); transform: translateX(3px); }
.quiz-opt.correct { border-color: var(--good); background: rgba(16,185,129,.16); box-shadow: 0 0 18px rgba(16,185,129,.3); }
.quiz-opt.wrong { border-color: var(--bad); background: rgba(239,68,68,.16); }
.quiz-result { text-align: center; padding: 40px 28px; }
.quiz-result .score { font-size: 60px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 40px rgba(99,102,241,.35); }

/* ============ 进度 / 仪表盘 ============ */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; overflow: hidden; backdrop-filter: blur(6px); }
.kpi::after { content: ''; position: absolute; top: -40px; right: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--mc, var(--accent)) 35%, transparent), transparent 70%); }
.kpi .v { font-size: 40px; font-weight: 900; font-variant-numeric: tabular-nums; position: relative; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 4px; position: relative; }
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.list { display: grid; gap: 10px; }
.list .row { display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 13px; font-size: 14px; transition: .15s; }
.list .row:hover { border-color: rgba(255,255,255,.2); background: var(--panel-strong); }
.list .row .meta { color: var(--muted); font-size: 12px; }

/* ============ 登录弹层 ============ */
.modal-mask { position: fixed; inset: 0; background: rgba(4,7,15,.74); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-mask.show { display: flex; }
.modal { width: min(410px, 94vw); background: var(--bg2); border: 1px solid var(--border); border-radius: 22px; padding: 32px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.modal::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad); }
.modal h3 { margin: 0 0 4px; font-size: 23px; font-weight: 900; }
.modal .desc { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: rgba(0,0,0,.3); color: var(--text); font-size: 15px; outline: none; transition: .15s; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,.25); }
.modal .switch { color: var(--muted); font-size: 13px; text-align: center; margin-top: 14px; }
.modal .switch a { color: var(--accent2); font-weight: 700; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: #1c2540; border: 1px solid var(--border); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; transition: .25s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; }
.toast.err { border-color: var(--bad); }
.toast.ok { border-color: var(--good); }

.empty { text-align: center; color: var(--muted); padding: 50px 20px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0 10px; border-top: 1px solid var(--border); margin-top: 44px; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; background: var(--panel-strong); border: 1px solid var(--border); color: var(--muted); }
.cloud-badge { font-size: 11px; color: var(--warn); border: 1px solid rgba(245,158,11,.4); background: rgba(245,158,11,.12); padding: 3px 9px; border-radius: 20px; font-weight: 700; }

@media (max-width: 720px) {
  .hero h1 { font-size: 33px; }
  .nav { padding: 12px 16px; gap: 10px; }
  .nav-links { display: none; }
  .wrap { padding: 22px 16px 60px; }
  .watermark { font-size: 120px; }
}

/* ============ 口语训练 ============ */
.sp-session { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; padding: 15px 20px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 22px; font-size: 14px; backdrop-filter: blur(6px); }
.sp-session b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 18px; }
.sp-session .ok { color: var(--good); font-size: 13px; }
.sp-session .warn { color: var(--warn); font-size: 13px; }

.grid-sp-parts { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sp-part { cursor: pointer; text-align: center; border-top: 3px solid var(--mc); }
.sp-part .ic { width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 10px; display: grid; place-items: center; font-size: 32px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mc) 88%, #fff), var(--mc));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--mc) 36%, transparent); }
.sp-part .pt { font-size: 19px; font-weight: 800; margin-top: 8px; }
.sp-part .pe { color: var(--muted); font-size: 12.5px; margin-top: 8px; line-height: 1.5; }
.sp-part:hover { border-color: var(--mc); transform: translateY(-8px); box-shadow: 0 22px 44px color-mix(in srgb, var(--mc) 28%, transparent); }

.sp-tip { margin-top: 22px; padding: 15px 19px; border-left: 3px solid var(--accent2); background: rgba(34,211,238,.08); border-radius: 0 12px 12px 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.grid-sp-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sp-card { cursor: pointer; border-left: 3px solid var(--mc); }
.sp-card-title { font-size: 16px; font-weight: 800; line-height: 1.5; }
.sp-card-bullets { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.sp-card-bullets span { font-size: 12px; color: var(--muted); background: var(--panel-strong); border: 1px solid var(--border); padding: 3px 9px; border-radius: 8px; }
.sp-card-go { color: var(--accent2); font-weight: 700; font-size: 14px; }
.sp-card:hover { border-color: var(--mc); transform: translateY(-6px); box-shadow: 0 18px 38px color-mix(in srgb, var(--mc) 26%, transparent); }

.grid-sp-topics { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.sp-topic { cursor: pointer; display: flex; align-items: center; gap: 14px; border-left: 3px solid var(--mc); }
.sp-topic .ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; font-size: 24px; flex: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mc) 88%, #fff), var(--mc));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--mc) 34%, transparent); }
.sp-topic .pt { font-size: 16px; font-weight: 800; }
.sp-topic .pe { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sp-topic:hover { border-color: var(--mc); transform: translateY(-5px); box-shadow: 0 16px 34px color-mix(in srgb, var(--mc) 26%, transparent); }

.sp-qlist { display: grid; gap: 14px; }
.sp-q { display: flex; gap: 14px; align-items: flex-start; }
.sp-q-num { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #fff; box-shadow: 0 8px 18px rgba(99,102,241,.4); }
.sp-q-body { flex: 1; }
.sp-q-text { font-size: 16px; font-weight: 700; line-height: 1.5; }
.sp-q-ctrls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.sp-sample-btn { color: var(--accent2); }
.sp-sample { margin-top: 12px; padding: 14px 16px; background: rgba(34,211,238,.07); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; line-height: 1.75; color: #dbe4ff; }

/* 录音控件 */
.rec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec.center { justify-content: center; margin: 14px 0; }
.rec-btn.recording { background: var(--bad); border-color: var(--bad); color: #fff; animation: recpulse 1.1s infinite; }
@keyframes recpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5);} 50% { box-shadow: 0 0 0 8px rgba(239,68,68,0);} }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); font-size: 14px; }
.rec-playback { display: flex; align-items: center; gap: 8px; }
.rec-playback audio { height: 36px; }
.rec-done { color: var(--good); font-size: 13px; font-weight: 700; }

/* Part 2 话题卡训练 */
.sp2-card { max-width: 640px; margin: 0 auto; background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); backdrop-filter: blur(6px); position: relative; overflow: hidden; }
.sp2-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--grad); }
.sp2-tag { display: inline-block; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 20px; background: var(--panel-strong); border: 1px solid var(--border); color: var(--muted); margin-bottom: 14px; }
.sp2-tag.speaking { background: rgba(239,68,68,.16); border-color: var(--bad); color: #fca5a5; }
.sp2-tag.done { background: rgba(16,185,129,.16); border-color: var(--good); color: #6ee7b7; }
.sp2-title { font-size: 24px; font-weight: 900; line-height: 1.4; margin: 0 0 16px; }
.sp2-bullets { display: grid; gap: 8px; margin-bottom: 20px; }
.sp2-bullet { padding: 10px 14px; background: rgba(99,102,241,.12); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; font-size: 14.5px; color: #dbe4ff; }
.sp2-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.sp2-detail { margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; background: var(--panel-strong); }
.sp2-detail summary { cursor: pointer; padding: 12px 0; font-weight: 700; font-size: 14px; color: var(--accent2); }
.sp2-fw { padding: 0 0 14px; font-size: 14px; line-height: 1.75; color: var(--text); }
.sp2-sample { padding: 0 0 14px; font-size: 14.5px; line-height: 1.85; color: #dbe4ff; }
.sp2-sample-cn { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--muted); font-size: 13px; line-height: 1.7; }

/* 计时器 */
.timer-ring { width: 150px; height: 150px; margin: 18px auto; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 50% 50%, rgba(99,102,241,.2), rgba(13,20,38,.6)); border: 3px solid var(--accent); box-shadow: 0 0 30px rgba(99,102,241,.45); position: relative; }
.timer-ring.rec { border-color: var(--bad); box-shadow: 0 0 30px rgba(239,68,68,.45); }
.timer-num { font-size: 38px; font-weight: 900; font-variant-numeric: tabular-nums; }
.timer-label { position: absolute; bottom: 24px; font-size: 12px; color: var(--muted); }

.sp2-result { display: grid; gap: 14px; margin: 18px 0; }
.sp2-result-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--panel-strong); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.sp2-result-row b { font-size: 20px; color: var(--accent2); }
.sp2-playback audio { width: 100%; height: 40px; }
.sp2-norec { color: var(--muted); font-size: 13px; padding: 12px 16px; background: var(--panel-strong); border: 1px dashed var(--border); border-radius: 12px; text-align: center; }

/* 口语题目/范文小喇叭 */
.spk-sm { width: 30px; height: 28px; font-size: 13px; border-radius: 8px; flex: none; }
.sp-q-line { display: flex; align-items: flex-start; gap: 10px; }
.sp-q-line .sp-q-text { flex: 1; }
.sp-q-line .spk-sm { margin-top: 2px; }
.sp-sample-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-weight: 800; color: var(--accent2); }
.sp-sample-head .spk-sm { margin-left: auto; }

/* 录音评分卡 */
.sp-score { margin-top: 12px; }
.sp-scoring { padding: 14px 16px; background: var(--panel-strong); border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); font-size: 13.5px; text-align: center; }
.sp-score-card { background: linear-gradient(160deg, rgba(99,102,241,.12), rgba(34,211,238,.06)); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-top: 4px; }
.sp-score-head { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sp-err { font-size: 12px; color: var(--warn); font-weight: 600; background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.35); padding: 2px 9px; border-radius: 20px; }
.sp-overall { text-align: center; margin-bottom: 16px; }
.sp-overall-num { font-size: 56px; font-weight: 900; line-height: 1; text-shadow: 0 0 30px rgba(99,102,241,.3); }
.sp-overall-lbl { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.sp-crit { display: grid; gap: 12px; }
.sp-crit-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name val" "bar bar" "self self"; gap: 6px 10px; align-items: center; }
.sp-crit-name { grid-area: name; display: flex; flex-direction: column; }
.sp-crit-name b { font-size: 14px; }
.sp-crit-name small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.sp-crit-val { grid-area: val; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.sp-crit-bar { grid-area: bar; height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.sp-crit-bar > i { display: block; height: 100%; border-radius: 8px; }
.sp-self { grid-area: self; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sp-self button { flex: 1; min-width: 56px; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font-size: 12.5px; font-weight: 700; transition: .15s; }
.sp-self button:hover { border-color: rgba(255,255,255,.25); color: var(--text); }
.sp-self button.on { background: var(--grad); border-color: transparent; color: #fff; }
.sp-fb { margin-top: 14px; display: grid; gap: 8px; }
.sp-fb-item { font-size: 13px; line-height: 1.6; color: var(--text); background: var(--panel); border: 1px solid var(--border); border-left: 3px solid var(--accent2); border-radius: 0 10px 10px 0; padding: 9px 12px; }
.sp-fb-item b { color: var(--accent2); }
.sp-score-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.sp-score-note { margin-top: 10px; font-size: 11.5px; color: var(--muted); line-height: 1.6; text-align: center; }

/* ============== 词根词缀视图 ============== */
.roots-search { flex: 1; min-width: 200px; max-width: 360px; padding: 9px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--panel-strong); color: var(--text); font-size: 14px; outline: none; }
.roots-search:focus { border-color: rgba(124,131,253,.6); box-shadow: 0 0 0 3px rgba(99,102,241,.18); }
.roots-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.rs-card { padding: 16px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; text-align: center; }
.rs-card b { display: block; font-size: 26px; font-weight: 900; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.rs-card span { font-size: 12.5px; color: var(--muted); }
.grid-roots { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.root-card { border-top: 3px solid var(--mc); padding: 18px; }
.rc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.rc-kind { font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 20px; color: #fff; }
.rc-root { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.rc-prefix { background: linear-gradient(135deg,#0ea5e9,#22d3ee); }
.rc-suffix { background: linear-gradient(135deg,#f59e0b,#fb7185); }
.rc-marker { font-size: 19px; font-weight: 900; letter-spacing: .5px; color: #fff; }
.rc-mean { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.55; }
.rc-words { display: flex; flex-wrap: wrap; gap: 8px; }
.rword { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 5px 9px 5px 11px; border-radius: 10px; background: color-mix(in srgb, var(--mc) 14%, transparent); border: 1px solid color-mix(in srgb, var(--mc) 40%, transparent); cursor: pointer; transition: .15s; }
.rword:hover { background: color-mix(in srgb, var(--mc) 26%, transparent); transform: translateY(-2px); }
.mini-spk { border: none; background: rgba(255,255,255,.10); color: var(--text); border-radius: 7px; width: 22px; height: 22px; font-size: 11px; display: inline-grid; place-items: center; cursor: pointer; }
.mini-spk:hover { background: rgba(255,255,255,.22); }
.muted { color: var(--muted); }

/* 词根猎人 游戏 */
.rg-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); backdrop-filter: blur(6px); max-width: 760px; margin: 0 auto; }
.rg-panel.playing { border-color: rgba(124,131,253,.45); box-shadow: 0 18px 60px rgba(99,102,241,.28); }
.rg-title { font-size: 24px; font-weight: 900; margin-bottom: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rg-intro p { color: var(--muted); font-size: 14px; line-height: 1.8; margin: 10px 0; }
.rg-intro b { color: var(--text); }
.rg-best { margin: 12px 0; font-size: 14px; color: var(--text); }
.rg-best b { font-size: 20px; color: #fbbf24; }
.rg-result { margin: 14px 0; padding: 14px 16px; border-radius: 14px; background: rgba(99,102,241,.12); border: 1px solid rgba(124,131,253,.4); }
.rg-score { font-size: 18px; }
.rg-score b { font-size: 28px; color: #34d399; }
.rg-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.rg-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.rg-hud { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rg-hud-item { font-size: 13px; color: var(--muted); background: var(--panel-strong); border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; }
.rg-hud-item b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.rg-progress { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 18px; }
.rg-progress > i { display: block; height: 100%; background: var(--grad); transition: width .3s; }
.rg-question { text-align: center; margin-bottom: 18px; }
.rg-q-kind { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.rg-q-main { font-size: 34px; font-weight: 900; letter-spacing: .5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rg-q-sub { font-size: 14px; color: var(--muted); margin-top: 6px; }
.rg-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rg-opt { text-align: left; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel); color: var(--text); font-size: 16px; font-weight: 700; cursor: pointer; transition: .15s; border-left: 3px solid var(--mc); }
.rg-opt:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.22); background: var(--panel-strong); box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.rg-feedback { min-height: 24px; text-align: center; font-size: 15px; font-weight: 700; margin: 16px 0 8px; }
.rg-feedback.ok { color: #34d399; }
.rg-feedback.bad { color: #fb7185; }
#rg-quit { margin: 4px auto 0; display: block; }

/* 通用空状态 */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big { font-size: 46px; margin-bottom: 10px; }
