:root {
  --bg: #0b1a12; --bg2: #12281b;
  --panel: rgba(255,255,255,.05); --line: rgba(255,255,255,.10);
  --text: #e9f5ec; --muted: #8fb7a0;
  --accent: #6ee7a8;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%;
  background: radial-gradient(1200px 800px at 50% -10%, #1b3d28 0%, var(--bg) 55%, #060f0a 100%);
  color: var(--text); overflow: hidden; overscroll-behavior: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
.app { height: 100%; display: grid; grid-template-columns: minmax(220px, 270px) 1fr;
  gap: clamp(10px, 1.4vw, 18px); padding: clamp(10px, 1.4vw, 18px); }
.sidebar { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 9px; }
.logo { font-size: 24px; filter: drop-shadow(0 0 12px rgba(110,231,168,.5)); }
.brand h1 { margin: 0; font-size: clamp(17px, 1.7vw, 21px); font-weight: 700; }
.hud { display: flex; flex-direction: column; gap: 8px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 12px; display: flex; align-items: baseline; justify-content: space-between; }
.stat .k { font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
#score { color: var(--accent); }
.side-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.ghost { padding: 9px 14px; border-radius: 12px; font-size: 13px; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); cursor: pointer; font-family: inherit;
  transition: background .18s, transform .12s; }
.ghost:hover { background: rgba(255,255,255,.09); }
.ghost:active { transform: scale(.97); }
.ghost.primary-action { color: #06120b; background: linear-gradient(135deg, var(--accent), #b4f5d0);
  border: none; font-weight: 700; }
.ghost[aria-pressed="false"] { color: var(--muted); }
.hint { font-size: 11px; color: var(--muted); line-height: 1.7; opacity: .8; }
.stage { position: relative; min-width: 0; min-height: 0; display: flex; align-items: center;
  justify-content: center; border-radius: 20px;
  background: radial-gradient(600px 400px at 50% 50%, rgba(110,231,168,.07), transparent 70%), var(--bg2);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.45); overflow: hidden; touch-action: none; }
#game { display: block; width: 100%; height: 100%; }
.overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(6,14,10,.75); backdrop-filter: blur(6px); z-index: 50; animation: fade .25s ease; }
.overlay.hidden, .hidden { display: none !important; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.card { text-align: center; padding: 26px 36px 30px; border-radius: 22px;
  background: linear-gradient(180deg, rgba(24,48,34,.97), rgba(12,26,18,.97));
  border: 1px solid rgba(110,231,168,.3);
  box-shadow: 0 24px 70px rgba(0,0,0,.55); animation: pop .32s cubic-bezier(.18,1.2,.4,1); }
@keyframes pop { from { transform: scale(.86) translateY(8px); opacity: 0 } to { transform: none; opacity: 1 } }
.icon { font-size: 44px; }
.card h2 { margin: 8px 0; font-size: 24px; letter-spacing: 1px; }
.card .line { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.primary { margin-top: 18px; padding: 12px 34px; border-radius: 999px; font-size: 16px; font-weight: 700;
  color: #06120b; background: linear-gradient(135deg, var(--accent), #b4f5d0); border: none; cursor: pointer;
  font-family: inherit; box-shadow: 0 10px 28px rgba(110,231,168,.3); }

/* ---------- 答题面板 ---------- */
.quiz-card { width: min(92vw, 620px); text-align: left; padding: 22px 26px 20px; }
.qtop { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.qsub { font-size: 12px; letter-spacing: 2px; padding: 4px 12px; border-radius: 999px;
  background: rgba(110,231,168,.16); color: var(--accent); border: 1px solid rgba(110,231,168,.35); }
.qsub.cn { background: rgba(255,183,77,.16); color: #ffb74d; border-color: rgba(255,183,77,.4); }
.qsub.en { background: rgba(110,200,255,.16); color: #6ec8ff; border-color: rgba(110,200,255,.4); }
.qgate { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.qtext { font-size: clamp(18px, 2.4vw, 24px); font-weight: 800; line-height: 1.6;
  margin-bottom: 18px; letter-spacing: .5px; }
.qopts { display: flex; flex-direction: column; gap: 10px; }
.qopt { display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; border-radius: 14px; cursor: pointer; text-align: left;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  color: var(--text); font-size: clamp(15px, 1.9vw, 18px); font-family: inherit;
  transition: background .15s, border-color .15s, transform .1s; }
.qopt:hover { background: rgba(255,255,255,.1); }
.qopt:active { transform: scale(.99); }
.qopt .idx { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.1); font-size: 13px; font-weight: 700; color: var(--muted); }
.qopt.right { background: rgba(110,231,168,.18); border-color: rgba(110,231,168,.65); }
.qopt.right .idx { background: var(--accent); color: #06120b; }
.qopt.wrong { background: rgba(255,107,107,.16); border-color: rgba(255,107,107,.6); }
.qopt.wrong .idx { background: #ff6b6b; color: #2a0a0a; }
.qopt:disabled { cursor: default; }
.qres { margin-top: 14px; min-height: 22px; font-size: 14px; font-weight: 700; letter-spacing: .5px; }
.qres.ok { color: var(--accent); }
.qres.no { color: #ff9a9a; }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); gap: 8px; padding: 8px 8px 6px; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
  .brand h1 { font-size: 16px; } .logo { font-size: 18px; }
  .hud { flex-direction: row; flex: 1; gap: 5px; min-width: 0; }
  .stat { flex-direction: column; align-items: flex-start; gap: 0; padding: 5px 8px; flex: 1; min-width: 0; }
  .stat .k { font-size: 10px; } .stat .v { font-size: 15px; }
  .side-actions { order: 3; width: 100%; flex-direction: row; gap: 6px; margin-top: 0; }
  .side-actions .ghost { flex: 1; padding: 8px 4px; font-size: 11px; }
  .hint { display: none; } .stage { border-radius: 14px; }
  .quiz-card { padding: 18px 16px 16px; }
  .qtext { margin-bottom: 14px; }
}

/* ---------- 触屏 ---------- */
.touch { position: absolute; left: 0; right: 0; bottom: 10px; display: none;
  justify-content: space-between; align-items: flex-end; padding: 0 14px; z-index: 5; }
.move { display: flex; gap: 10px; }
.touch button { width: 64px; height: 64px; border-radius: 16px;
  background: rgba(255,255,255,.09); border: 1px solid var(--line);
  color: var(--text); font-size: 20px; cursor: pointer; backdrop-filter: blur(4px); }
.touch button:active { background: rgba(255,255,255,.2); }
.touch .jump { width: 76px; height: 76px; border-radius: 50%; font-size: 16px; font-weight: 700; }
@media (max-width: 820px) { .touch { display: flex; } }
