/* ============================================================
   英语四六级训练营 · CET Quest —— 设计系统
   ============================================================ */
:root {
  --bg-0: #070b1a;
  --bg-1: #0d1428;
  --bg-2: #131c36;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.10);
  --stroke-2: rgba(255, 255, 255, 0.18);
  --txt: #eef2ff;
  --txt-2: #a8b3d4;
  --txt-3: #6b7699;
  --green: #34d399;
  --green-d: #059669;
  --violet: #8b5cf6;
  --violet-d: #6d28d9;
  --blue: #38bdf8;
  --amber: #fbbf24;
  --rose: #fb7185;
  --pink: #f472b6;
  --radius: 18px;
  --radius-s: 12px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.75);
  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC",
          -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--txt);
  background: var(--bg-0);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); background-clip: content-box; }

/* ---------- 背景极光 ---------- */
#aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#aurora i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: drift 26s ease-in-out infinite;
}
#aurora i:nth-child(1) { width: 620px; height: 620px; background: #4c1d95; top: -180px; left: -120px; }
#aurora i:nth-child(2) { width: 540px; height: 540px; background: #0f766e; bottom: -200px; right: -100px; animation-delay: -8s; }
#aurora i:nth-child(3) { width: 420px; height: 420px; background: #1e3a8a; top: 38%; left: 52%; animation-delay: -15s; }
#aurora i:nth-child(4) { width: 300px; height: 300px; background: #831843; bottom: 10%; left: 8%; animation-delay: -20s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(70px, 50px) scale(1.14); }
  66% { transform: translate(-50px, 30px) scale(.92); }
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 26px 26px;
}

/* ---------- 布局 ---------- */
#appRoot { position: relative; z-index: 1; display: grid; grid-template-columns: 232px 1fr; height: 100vh; height: 100dvh; overflow: hidden; }

aside.side {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px; background: rgba(7, 11, 26, .55);
  backdrop-filter: blur(22px); border-right: 1px solid var(--stroke);
  overflow-y: auto; min-height: 0; height: 100%;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: linear-gradient(140deg, var(--green), var(--blue) 55%, var(--violet));
  display: grid; place-items: center; font-size: 21px; font-weight: 800; color: #06121f;
  box-shadow: 0 8px 22px -6px rgba(52, 211, 153, .55);
}
.brand b { font-size: 15px; letter-spacing: .3px; display: block; line-height: 1.25; }
.brand small { color: var(--txt-3); font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; }

.nav-sec { font-size: 10.5px; letter-spacing: 1.6px; color: var(--txt-3); padding: 14px 10px 6px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  color: var(--txt-2); font-size: 13.5px; font-weight: 500; transition: .16s; position: relative;
}
.nav-item:hover { background: var(--glass); color: var(--txt); }
.nav-item.on { background: linear-gradient(90deg, rgba(52,211,153,.20), rgba(139,92,246,.13)); color: #fff; font-weight: 650; }
.nav-item.on::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: var(--green);
}
.nav-item .ico { width: 19px; text-align: center; font-size: 16px; flex: none; }
.nav-item .pill {
  margin-left: auto; font-size: 10.5px; padding: 2px 7px; border-radius: 20px;
  background: rgba(251,113,133,.2); color: var(--rose); font-weight: 700;
}

main { display: flex; flex-direction: column; overflow: hidden; min-width: 0; min-height: 0; height: 100%; }
header.top {
  display: flex; align-items: center; gap: 14px; padding: 13px 26px;
  border-bottom: 1px solid var(--stroke); background: rgba(7,11,26,.4);
  backdrop-filter: blur(16px); flex: none;
}
header.top h1 { font-size: 17px; margin: 0; font-weight: 650; }
header.top .sub { font-size: 12px; color: var(--txt-3); margin-top: 2px; }
.spacer { flex: 1; }
.stat-chip {
  display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 11px;
  background: var(--glass); border: 1px solid var(--stroke); font-size: 12.5px; white-space: nowrap;
}
.stat-chip b { font-size: 14px; font-weight: 750; }
.stat-chip.flame { color: #ffb37a; }
.stat-chip.xp { color: var(--amber); }
.stat-chip.count { color: var(--green); }

#view { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 24px 26px 60px; scroll-behavior: smooth; }
.wrap { max-width: 1180px; margin: 0 auto; }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.card.tight { padding: 15px; }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card h3 .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.grid { display: grid; gap: 16px; }
.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; }
.wrapflex { flex-wrap: wrap; }
.muted { color: var(--txt-2); }
.dim { color: var(--txt-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 640;
  background: var(--glass-2); border: 1px solid var(--stroke-2); color: var(--txt);
  transition: .16s; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,.15); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--green), #22d3ee); color: #04121c; border: none; box-shadow: 0 10px 26px -10px rgba(52,211,153,.75); }
.btn.primary:hover { box-shadow: 0 14px 32px -10px rgba(52,211,153,.9); }
.btn.violet { background: linear-gradient(135deg, var(--violet), var(--pink)); color: #fff; border: none; box-shadow: 0 10px 26px -10px rgba(139,92,246,.8); }
.btn.ghost { background: transparent; }
.btn.danger { background: rgba(251,113,133,.15); border-color: rgba(251,113,133,.35); color: #ffbcc7; }
.btn.sm { padding: 7px 13px; font-size: 12.5px; border-radius: 10px; }
.btn.lg { padding: 14px 30px; font-size: 15px; border-radius: 14px; }
.btn.block { width: 100%; }

.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; background: var(--glass-2); border: 1px solid var(--stroke); color: var(--txt-2);
}
.tag.green { background: rgba(52,211,153,.15); color: #6ee7b7; border-color: rgba(52,211,153,.3); }
.tag.violet { background: rgba(139,92,246,.16); color: #c4b5fd; border-color: rgba(139,92,246,.3); }
.tag.amber { background: rgba(251,191,36,.14); color: #fcd34d; border-color: rgba(251,191,36,.3); }
.tag.rose { background: rgba(251,113,133,.15); color: #fda4af; border-color: rgba(251,113,133,.3); }
.tag.blue { background: rgba(56,189,248,.15); color: #7dd3fc; border-color: rgba(56,189,248,.3); }

.bar { height: 8px; border-radius: 20px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--green), var(--blue)); transition: width .5s cubic-bezier(.22,1,.36,1); }
.bar.violet > i { background: linear-gradient(90deg, var(--violet), var(--pink)); }
.bar.amber > i { background: linear-gradient(90deg, var(--amber), var(--rose)); }

input.f, textarea.f, select.f {
  width: 100%; padding: 11px 14px; border-radius: 12px; background: rgba(0,0,0,.3);
  border: 1px solid var(--stroke-2); outline: none; transition: .15s; font-size: 13.5px;
}
input.f:focus, textarea.f:focus, select.f:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(52,211,153,.16); }
textarea.f { resize: vertical; min-height: 90px; line-height: 1.7; }
label.lb { display: block; font-size: 12px; color: var(--txt-2); margin: 14px 0 6px; font-weight: 600; }

/* ---------- 进度环 ---------- */
.ring { position: relative; width: 108px; height: 108px; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring .bgc { stroke: rgba(255,255,255,.09); }
.ring .fgc { stroke: url(#ringGrad); transition: stroke-dashoffset .8s cubic-bezier(.22,1,.36,1); }
.ring .lbl {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.1;
}
.ring .lbl b { font-size: 23px; font-weight: 800; }
.ring .lbl small { font-size: 10.5px; color: var(--txt-3); display: block; margin-top: 2px; }

/* ---------- 任务卡 ---------- */
.task {
  display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 14px;
  background: rgba(255,255,255,.035); border: 1px solid var(--stroke); transition: .16s; margin-bottom: 9px;
}
.task:hover { background: rgba(255,255,255,.07); transform: translateX(3px); }
.task.done { opacity: .5; }
.task.done .t-title { text-decoration: line-through; }
.t-check {
  width: 26px; height: 26px; border-radius: 9px; border: 2px solid var(--stroke-2);
  display: grid; place-items: center; flex: none; transition: .16s; font-size: 14px;
}
.task.done .t-check { background: var(--green); border-color: var(--green); color: #04121c; }
.task:hover .t-check { border-color: var(--green); }
.t-body { flex: 1; min-width: 0; }
.t-title { font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.t-desc { font-size: 11.5px; color: var(--txt-3); line-height: 1.5; }
.t-meta { display: flex; gap: 6px; align-items: center; flex: none; }

/* ---------- 题目 ---------- */
.qwrap { max-width: 900px; margin: 0 auto; }
.passage {
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke); border-radius: 14px;
  padding: 20px 22px; line-height: 1.95; font-size: 14.5px; color: #dbe3ff;
  max-height: 46vh; overflow-y: auto; font-family: Georgia, "Times New Roman", serif;
}
.passage.nolimit { max-height: none; }
.passage p { margin: 0 0 13px; }
.passage .ptag { color: var(--amber); font-weight: 700; margin-right: 6px; font-family: var(--font); }
.script-line { margin-bottom: 7px; line-height: 1.85; }
.script-line .who { color: var(--blue); font-weight: 700; font-family: var(--font); }

.opt {
  display: flex; gap: 11px; align-items: flex-start; padding: 12px 15px; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1.5px solid var(--stroke); margin-bottom: 8px;
  transition: .14s; font-size: 13.5px; line-height: 1.6; width: 100%; text-align: left; color: var(--txt);
}
.opt:hover:not(:disabled) { background: rgba(255,255,255,.08); border-color: var(--stroke-2); }
.opt .k {
  width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.1);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 800; flex: none; font-family: var(--mono);
}
.opt.pick { border-color: var(--violet); background: rgba(139,92,246,.14); }
.opt.right { border-color: var(--green); background: rgba(52,211,153,.14); }
.opt.right .k { background: var(--green); color: #04121c; }
.opt.wrong { border-color: var(--rose); background: rgba(251,113,133,.13); }
.opt.wrong .k { background: var(--rose); color: #1a0710; }
.opt:disabled { cursor: default; }

.explain {
  background: linear-gradient(135deg, rgba(52,211,153,.09), rgba(56,189,248,.06));
  border: 1px solid rgba(52,211,153,.28); border-radius: 14px; padding: 15px 17px;
  font-size: 13px; line-height: 1.85; white-space: pre-wrap; margin-top: 12px; color: #d8f5e7;
}
.explain.err { background: linear-gradient(135deg, rgba(251,113,133,.09), rgba(251,191,36,.06)); border-color: rgba(251,113,133,.3); color: #ffe2e7; }

/* ---------- 表格 ---------- */
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th, table.tb td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--stroke); }
table.tb th { color: var(--txt-3); font-size: 11.5px; font-weight: 650; letter-spacing: .4px; }
table.tb tr:last-child td { border-bottom: none; }
table.tb tr:hover td { background: rgba(255,255,255,.03); }

/* ---------- Toast / 弹层 ---------- */
#toasts { position: fixed; bottom: 26px; right: 26px; z-index: 900; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.toast {
  padding: 12px 18px; border-radius: 13px; background: rgba(13,20,40,.96); border: 1px solid var(--stroke-2);
  box-shadow: var(--shadow); font-size: 13px; max-width: 400px; animation: slideIn .3s cubic-bezier(.22,1,.36,1);
  display: flex; align-items: center; gap: 9px;
}
.toast.ok { border-color: rgba(52,211,153,.5); }
.toast.err { border-color: rgba(251,113,133,.5); }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

#modal {
  position: fixed; inset: 0; z-index: 800; background: rgba(3,6,15,.78); backdrop-filter: blur(7px);
  display: grid; place-items: center; padding: 30px; animation: fade .2s;
}
#modal.hide { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.mbox {
  background: linear-gradient(160deg, #131c36, #0c1224); border: 1px solid var(--stroke-2);
  border-radius: 22px; padding: 26px; max-width: 780px; width: 100%; max-height: 86vh; overflow-y: auto;
  box-shadow: 0 30px 80px -20px #000; animation: pop .25s cubic-bezier(.22,1,.36,1);
}
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(14px); } to { opacity: 1; transform: none; } }
.mbox h2 { margin: 0 0 6px; font-size: 20px; }

/* ---------- 单词卡（翻转） ---------- */
.flip { perspective: 1200px; height: 300px; cursor: pointer; }
.flip-in { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.4,.2,.2,1); transform-style: preserve-3d; }
.flip.on .flip-in { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 26px; border: 1px solid var(--stroke-2); text-align: center;
}
.flip-front { background: linear-gradient(150deg, rgba(52,211,153,.14), rgba(139,92,246,.1)); }
.flip-back { background: linear-gradient(150deg, rgba(56,189,248,.12), rgba(139,92,246,.14)); transform: rotateY(180deg); }
.flip-face .w { font-size: 44px; font-weight: 800; letter-spacing: -.5px; }
.flip-face .ph { font-family: var(--mono); color: var(--blue); font-size: 15px; }

/* ---------- 选项按钮组 ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.3); border: 1px solid var(--stroke); }
.seg button { padding: 7px 15px; border-radius: 9px; font-size: 12.5px; color: var(--txt-2); font-weight: 600; transition: .14s; }
.seg button:hover { color: var(--txt); }
.seg button.on { background: var(--glass-2); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }

/* ---------- 学习地图 ---------- */
.week-row { display: flex; gap: 12px; margin-bottom: 12px; align-items: stretch; }
.week-head {
  width: 168px; flex: none; border-radius: 14px; padding: 14px; border: 1px solid var(--stroke);
  background: linear-gradient(150deg, rgba(139,92,246,.14), rgba(52,211,153,.06)); display: flex; flex-direction: column; gap: 5px;
}
.week-head.cur { border-color: var(--green); box-shadow: 0 0 0 2px rgba(52,211,153,.2); }
.week-head.past { opacity: .55; }
.day-dots { display: flex; gap: 7px; flex-wrap: wrap; }
.day-dot {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; border: 1px solid var(--stroke); background: rgba(255,255,255,.04);
  transition: .15s; position: relative;
}
.day-dot:hover { transform: translateY(-2px); border-color: var(--stroke-2); }
.day-dot.done { background: rgba(52,211,153,.25); border-color: rgba(52,211,153,.5); color: #a7f3d0; }
.day-dot.today { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(251,191,36,.25); color: var(--amber); }
.day-dot.cur { border-color: var(--green); }

/* ---------- 视频卡 ---------- */
.vcard { border-radius: 16px; overflow: hidden; border: 1px solid var(--stroke); background: var(--glass); transition: .18s; display: flex; flex-direction: column; }
.vcard:hover { transform: translateY(-3px); border-color: var(--stroke-2); box-shadow: var(--shadow); }
.vthumb {
  height: 116px; display: grid; place-items: center; font-size: 34px; position: relative;
  background: linear-gradient(140deg, rgba(139,92,246,.4), rgba(56,189,248,.25));
}
.vthumb .dur { position: absolute; right: 9px; bottom: 8px; font-size: 10.5px; background: rgba(0,0,0,.65); padding: 2px 7px; border-radius: 6px; font-family: var(--mono); }
.vbody { padding: 13px 15px 15px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.vbody .vt { font-size: 13.5px; font-weight: 650; line-height: 1.45; }

/* ---------- 游戏：单词消消乐候选 ---------- */
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.mcell {
  padding: 14px; border-radius: 13px; border: 1.5px solid var(--stroke); background: rgba(255,255,255,.04);
  font-size: 13.5px; transition: .15s; min-height: 56px; display: flex; align-items: center; justify-content: center;
  text-align: center; line-height: 1.4;
}
.mcell:hover:not(.gone) { border-color: var(--stroke-2); background: rgba(255,255,255,.09); transform: translateY(-2px); }
.mcell.sel { border-color: var(--violet); background: rgba(139,92,246,.2); }
.mcell.good { border-color: var(--green); background: rgba(52,211,153,.22); animation: pop2 .35s; }
.mcell.bad { border-color: var(--rose); background: rgba(251,113,133,.2); animation: shake .35s; }
.mcell.gone { opacity: .2; pointer-events: none; }
@keyframes pop2 { 0% { transform: scale(1); } 50% { transform: scale(1.07); } 100% { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* ---------- 句子拼图 ---------- */
.puzzle-bank { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 12px; border-radius: 13px; border: 1.5px dashed var(--stroke-2); background: rgba(0,0,0,.2); }
.puzzle-line { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 12px; border-radius: 13px; border: 1.5px solid var(--stroke); background: rgba(52,211,153,.06); margin-bottom: 12px; }
.chip {
  padding: 8px 14px; border-radius: 10px; background: var(--glass-2); border: 1px solid var(--stroke-2);
  font-size: 13px; cursor: pointer; transition: .14s; font-family: var(--mono);
}
.chip:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }

/* ---------- 视频播放器 ---------- */
.video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: 14px; overflow: hidden; border: 1px solid var(--stroke-2);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- 金句 ---------- */
.quote-card { position: relative; overflow: hidden; }
.quote-card::before {
  content: '“'; position: absolute; right: 22px; top: -26px; font-size: 140px;
  font-family: Georgia, serif; color: rgba(255,255,255,.05); pointer-events: none; line-height: 1;
}
.quote-en {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px; line-height: 1.6; font-weight: 600; letter-spacing: .2px;
  color: #f2f5ff; margin: 6px 0 12px; text-wrap: balance;
}
.quote-zh { font-size: 15px; line-height: 1.85; color: var(--txt-2); }
@media (max-width: 860px) { .quote-en { font-size: 19px; } }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--txt-3); }
.empty .e-ico { font-size: 52px; margin-bottom: 14px; opacity: .5; }

/* ---------- 骨架屏 ---------- */
.skel { background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.11), rgba(255,255,255,.05)); background-size: 200% 100%; animation: shim 1.4s infinite; border-radius: 10px; }
@keyframes shim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- 撒花 ---------- */
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 950; }
.cf { position: absolute; width: 9px; height: 14px; opacity: .95; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: 0; } }

/* ---------- 引导页 ---------- */
.onboard { min-height: 100%; display: grid; place-items: center; padding: 30px; }
.ob-box { max-width: 720px; width: 100%; }
.step-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 26px; }
.step-dots i { width: 34px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); transition: .3s; }
.step-dots i.on { background: var(--green); }
.level-card {
  padding: 18px; border-radius: 15px; border: 1.5px solid var(--stroke); cursor: pointer; transition: .16s;
  background: rgba(255,255,255,.035);
}
.level-card:hover { border-color: var(--stroke-2); transform: translateY(-2px); }
.level-card.on { border-color: var(--green); background: rgba(52,211,153,.12); }

/* ---------- 测验计时条 ---------- */
.timer-bar { position: sticky; top: 0; z-index: 5; background: rgba(7,11,26,.92); backdrop-filter: blur(12px); padding: 11px 0 13px; margin: -4px 0 16px; border-bottom: 1px solid var(--stroke); }
.timer-bar .tm { font-family: var(--mono); font-size: 19px; font-weight: 700; }
.timer-bar .tm.warn { color: var(--rose); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .4; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px) {
  #appRoot { grid-template-columns: 68px 1fr; }
  .brand b, .brand small, .nav-item span.nm, .nav-sec { display: none; }
  .nav-item { justify-content: center; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  #view { padding: 16px; }
}
.hide { display: none !important; }
