/* ============================================================
 * 物理行动 · 八年级上册  |  三角洲行动风格界面
 * ============================================================ */

:root {
  --bg: #0a0e0c;
  --bg-2: #0f1613;
  --panel: rgba(17, 25, 21, 0.86);
  --panel-solid: #111915;
  --line: rgba(133, 173, 152, 0.18);
  --line-strong: rgba(133, 173, 152, 0.38);
  --text: #d9e4de;
  --muted: #7f9188;
  --dim: #56655e;
  --orange: #ff7a45;
  --amber: #ffc53d;
  --green: #95de64;
  --cyan: #36cfc9;
  --purple: #b37feb;
  --blue: #69b1ff;
  --red: #ff5c5c;
  --mono: "SF Mono", "Consolas", "JetBrains Mono", "Courier New", monospace;
  --sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- 背景层 ---------- */
.bg-grid, .bg-scan, .bg-noise, .bg-vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
.bg-grid {
  background-image:
    linear-gradient(rgba(126, 170, 148, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 170, 148, .055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 85%);
}
.bg-scan {
  background: repeating-linear-gradient(0deg, transparent 0, transparent 3px, rgba(0,0,0,.16) 4px);
  opacity: .5;
  animation: scanDrift 18s linear infinite;
}
.bg-noise {
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-vignette {
  background: radial-gradient(ellipse at 50% 45%, transparent 25%, rgba(0,0,0,.62) 100%);
}
@keyframes scanDrift { to { background-position: 0 40px; } }

/* ---------- 应用骨架 ---------- */
#app {
  position: relative; z-index: 1;
  height: 100vh;
  display: flex; flex-direction: column;
}

/* ---------- 顶栏 ---------- */
.topbar {
  flex: 0 0 auto;
  height: 72px;
  display: flex; align-items: center; gap: 28px;
  padding: 0 28px;
  background: linear-gradient(180deg, rgba(13,20,16,.98), rgba(10,15,12,.92));
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  position: relative;
}
.topbar::after {
  content: ""; position: absolute; bottom: -1px; left: 0; width: 28%; height: 2px;
  background: linear-gradient(90deg, var(--orange), transparent);
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 250px; }
.brand-mark { color: var(--orange); filter: drop-shadow(0 0 8px rgba(255,122,69,.5)); }
.brand-title { font-size: 19px; font-weight: 800; letter-spacing: 2px; line-height: 1.1; }
.brand-tag { color: var(--orange); font-size: 15px; }
.brand-sub { font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; color: var(--muted); margin-top: 3px; }

.nav { display: flex; gap: 4px; flex: 1; }
.nav-btn {
  position: relative; padding: 10px 16px; font-size: 13px; font-weight: 700;
  color: var(--muted); letter-spacing: .5px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 92% 100%, 0 100%);
  transition: .2s;
  white-space: nowrap;
}
.nav-btn .nav-ico { margin-right: 6px; font-size: 14px; color: var(--dim); }
.nav-btn:hover { color: var(--text); background: rgba(133,173,152,.08); }
.nav-btn.active { color: var(--amber); background: linear-gradient(180deg, rgba(255,197,61,.14), rgba(255,197,61,.03)); }
.nav-btn.active .nav-ico { color: var(--amber); }
.nav-btn.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px;
  background: var(--amber); box-shadow: 0 0 10px var(--amber);
}

.player-panel { display: flex; align-items: center; gap: 18px; min-width: 300px; justify-content: flex-end; }
.rank-block { display: flex; align-items: center; gap: 10px; }
.rank-badge {
  width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2a352e, #16201b);
  border: 1px solid var(--line-strong); color: var(--amber); font-size: 12px;
  letter-spacing: -2px; padding-right: 2px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  text-shadow: 0 0 10px rgba(255,197,61,.6);
}
.rank-info { flex-shrink: 0; }
.rank-name { font-size: 13px; font-weight: 700; color: var(--amber); white-space: nowrap; }
.rank-exp { font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.exp-track { width: 90px; height: 5px; background: rgba(133,173,152,.12); border-radius: 3px; overflow: hidden; }
.exp-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--amber), var(--orange)); transition: width .5s ease; box-shadow: 0 0 8px rgba(255,197,61,.5); }
.currency { display: flex; align-items: center; gap: 5px; font-family: var(--mono); }
.coin-ico { color: var(--amber); font-size: 16px; }
.coin-num { font-size: 15px; font-weight: 700; color: var(--amber); }
.coin-label { font-size: 10px; color: var(--muted); font-family: var(--sans); }

/* ---------- 主内容 ---------- */
#main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 26px 32px 40px; }
#main::-webkit-scrollbar { width: 8px; }
#main::-webkit-scrollbar-track { background: rgba(0,0,0,.2); }
#main::-webkit-scrollbar-thumb { background: rgba(133,173,152,.25); border-radius: 4px; }
#main::-webkit-scrollbar-thumb:hover { background: rgba(133,173,152,.4); }

.view { display: none; animation: viewIn .35s ease; }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 底部状态栏 ---------- */
.statusbar {
  flex: 0 0 auto; height: 30px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(8,12,10,.95); border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .5px;
}
.status-left { display: flex; align-items: center; gap: 8px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 2s infinite; }
.status-right { display: flex; gap: 12px; align-items: center; }
.status-sep { color: var(--dim); }
.author-credit { color: var(--amber); font-weight: 700; letter-spacing: 1px; white-space: nowrap; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ============================================================
 * 战术大厅
 * ============================================================ */
.home-hero { position: relative; margin-bottom: 26px; padding-left: 18px; }
.hero-line { position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: linear-gradient(180deg, var(--orange), transparent); }
.hero-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--orange); margin-bottom: 6px; }
.hero-title { font-size: 38px; font-weight: 900; letter-spacing: 3px; line-height: 1.15; }
.hero-title .accent { color: var(--orange); text-shadow: 0 0 24px rgba(255,122,69,.35); }
.hero-desc { color: var(--muted); margin-top: 8px; font-size: 13px; line-height: 1.7; }
.hero-desc b { color: var(--amber); }
.hero-stats { display: flex; gap: 38px; margin-top: 20px; }
.stat { position: relative; padding-left: 14px; }
.stat::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 2px; background: var(--line-strong); }
.stat-num { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 5px; }

.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mode-card {
  position: relative; background: linear-gradient(160deg, rgba(20,29,24,.95), rgba(12,18,15,.95));
  border: 1px solid var(--line); padding: 22px; min-height: 320px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.mode-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at 15% 0%, var(--glow, rgba(255,122,69,.12)), transparent 60%);
}
.mode-card:hover { transform: translateY(-5px); border-color: var(--theme); box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 1px var(--theme) inset; }
.mode-card:hover::before { opacity: 1; }
.mode-basic { --theme: var(--orange); --glow: rgba(255,122,69,.13); }
.mode-battle { --theme: var(--cyan); --glow: rgba(54,207,201,.13); }
.mode-demo { --theme: var(--purple); --glow: rgba(179,127,235,.13); }
.card-corner { position: absolute; width: 14px; height: 14px; border-color: var(--theme); opacity: .7; }
.card-corner.tl { top: 8px; left: 8px; border-top: 2px solid; border-left: 2px solid; }
.card-corner.br { bottom: 8px; right: 8px; border-bottom: 2px solid; border-right: 2px solid; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; position: relative; }
.card-icon { color: var(--theme); filter: drop-shadow(0 0 10px var(--theme)); }
.card-mode-id { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--theme); border: 1px solid var(--theme); padding: 3px 7px; opacity: .85; }
.card-title { font-size: 25px; font-weight: 800; letter-spacing: 2px; position: relative; }
.card-sub { color: var(--muted); font-size: 12px; margin: 4px 0 14px; position: relative; }
.card-features { list-style: none; margin-bottom: 16px; position: relative; }
.card-features li { font-size: 12px; color: #a8b8b0; padding: 4px 0 4px 16px; position: relative; }
.card-features li::before { content: "▸"; position: absolute; left: 0; color: var(--theme); }
.card-progress { margin-top: auto; position: relative; }
.cp-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.cp-track { height: 4px; background: rgba(133,173,152,.12); border-radius: 2px; overflow: hidden; }
.cp-fill { height: 100%; width: 0; background: var(--theme); transition: width .6s ease; box-shadow: 0 0 8px var(--theme); }
.card-btn {
  margin-top: 16px; width: 100%; padding: 10px; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: var(--theme); border: 1px solid var(--theme); background: rgba(0,0,0,.2);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 94% 100%, 0 100%); transition: .2s; position: relative;
}
.card-btn span { margin-left: 8px; }
.card-btn:hover { background: var(--theme); color: #0a0e0c; }
.home-bottom { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.intel-strip { flex: 1; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: rgba(133,173,152,.05); border-left: 2px solid var(--amber); font-size: 11px; }
.intel-label { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--amber); white-space: nowrap; }
.intel-text { color: var(--muted); }
.intel-text b { color: var(--text); }
.reset-btn { padding: 8px 14px; font-size: 11px; color: var(--dim); border: 1px solid var(--line); transition: .2s; }
.reset-btn:hover { color: var(--red); border-color: var(--red); }

/* ============================================================
 * 通用视图头
 * ============================================================ */
.view-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.view-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 1.6px; color: var(--orange); margin-bottom: 5px; }
.view-header h2 { font-size: 24px; font-weight: 800; letter-spacing: 1.5px; }
.view-header p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.view-header-badge { font-family: var(--mono); font-size: 11px; color: var(--amber); border: 1px solid rgba(255,197,61,.3); background: rgba(255,197,61,.06); padding: 7px 12px; white-space: nowrap; }

/* 章节选择 */
.chapter-select { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chapter-chip {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; min-width: 104px;
  background: rgba(133,173,152,.04); border: 1px solid var(--line); cursor: pointer; transition: .2s;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 92% 100%, 0 100%);
}
.chapter-chip:hover { border-color: var(--line-strong); background: rgba(133,173,152,.09); }
.chapter-chip.active { border-color: var(--chip-color, var(--orange)); background: rgba(255,122,69,.1); }
.chapter-chip .cc-code { font-family: var(--mono); font-size: 9px; color: var(--chip-color, var(--orange)); letter-spacing: 1px; }
.chapter-chip .cc-name { font-size: 12px; font-weight: 700; }
.chapter-chip .cc-sub { font-size: 9px; color: var(--muted); }

/* ============================================================
 * 烽火地带 · 物资地图
 * ============================================================ */
.loot-panel, .demo-panel { background: var(--panel); border: 1px solid var(--line); }
.loot-top, .demo-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.loot-title, .demo-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.loot-title small, .demo-title small { font-size: 10px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 10px var(--orange); animation: blink 1.6s infinite; display: inline-block; }
.pulse-dot.red { background: var(--red); box-shadow: 0 0 10px var(--red); }
.pulse-dot.purple { background: var(--purple); box-shadow: 0 0 10px var(--purple); }
.loot-progress-wrap { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.loot-progress-bar { width: 140px; height: 5px; background: rgba(133,173,152,.12); border-radius: 3px; overflow: hidden; }
.loot-progress-bar div { height: 100%; width: 0; background: var(--orange); transition: width .5s; box-shadow: 0 0 8px var(--orange); }

.loot-map {
  position: relative; height: 440px; overflow: hidden;
  background:
    radial-gradient(circle at 25% 30%, rgba(255,122,69,.08), transparent 35%),
    radial-gradient(circle at 75% 70%, rgba(54,207,201,.06), transparent 35%),
    repeating-linear-gradient(0deg, transparent 0, transparent 28px, rgba(133,173,152,.04) 29px),
    repeating-linear-gradient(90deg, transparent 0, transparent 28px, rgba(133,173,152,.04) 29px),
    linear-gradient(135deg, #0d1410, #0a0f0c);
}
.map-grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(133,173,152,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(133,173,152,.06) 1px, transparent 1px);
  background-size: 60px 60px;
}
.map-radar {
  position: absolute; left: 50%; top: 50%; width: 460px; height: 460px; margin: -230px 0 0 -230px;
  border: 1px solid rgba(133,173,152,.08); border-radius: 50%; pointer-events: none;
}
.map-radar::before, .map-radar::after { content: ""; position: absolute; inset: 15%; border: 1px solid rgba(133,173,152,.06); border-radius: 50%; }
.map-radar::after { inset: 32%; }
.map-zone { position: absolute; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: rgba(133,173,152,.16); border: 1px dashed rgba(133,173,152,.14); padding: 6px 12px; pointer-events: none; }
.zone-a { left: 6%; top: 8%; }
.zone-b { right: 8%; top: 14%; }
.zone-c { left: 44%; bottom: 7%; }

.loot-box {
  position: absolute; width: 54px; height: 54px; transform: translate(-50%, -50%);
  cursor: pointer; transition: .2s; z-index: 2;
}
.loot-box .box-visual {
  width: 100%; height: 100%; position: relative;
  background: linear-gradient(145deg, #3a2a1c, #1e1710);
  border: 2px solid var(--orange);
  clip-path: polygon(50% 0, 100% 22%, 100% 78%, 50% 100%, 0 78%, 0 22%);
  box-shadow: 0 0 18px rgba(255,122,69,.35), inset 0 0 12px rgba(255,122,69,.15);
  display: grid; place-items: center;
}
.loot-box .box-visual::after { content: ""; position: absolute; width: 20px; height: 20px; border: 1px solid var(--orange); transform: rotate(45deg); opacity: .6; }
.loot-box .box-num { position: relative; z-index: 2; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--amber); }
.loot-box .box-label { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); white-space: nowrap; }
.loot-box:hover { transform: translate(-50%, -50%) scale(1.12); }
.loot-box:hover .box-visual { box-shadow: 0 0 26px rgba(255,122,69,.7), inset 0 0 16px rgba(255,122,69,.25); }
.loot-box.unlocked .box-visual { background: linear-gradient(145deg, #1c3a24, #101e14); border-color: var(--green); box-shadow: 0 0 14px rgba(149,222,100,.3); }
.loot-box.unlocked .box-num { color: var(--green); }
.loot-box.unlocked .box-visual::after { border-color: var(--green); }
.loot-box.unlocked .box-label { color: var(--green); }
.loot-box.unlocked { cursor: default; }
.loot-box .box-check { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; color: var(--green); z-index: 3; }
.loot-bottom { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.ghost-btn { padding: 7px 14px; border: 1px solid var(--line-strong); font-size: 11px; color: var(--text); transition: .2s; }
.ghost-btn:hover { border-color: var(--orange); color: var(--orange); }
.ghost-btn span { color: var(--amber); margin-left: 4px; }

/* ============================================================
 * 全面战场 · 战斗竞技场
 * ============================================================ */
.battle-arena {
  position: relative; background: linear-gradient(160deg, rgba(14,22,18,.96), rgba(9,14,11,.96));
  border: 1px solid var(--line); overflow: hidden;
}
.arena-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); font-family: var(--mono); }
.arena-tag { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1px; color: var(--red); }
.arena-score { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.arena-score b { font-size: 18px; color: var(--cyan); margin-left: 6px; }
.arena-combo { font-size: 12px; color: var(--amber); font-weight: 700; }
.arena-combo.hot { color: var(--orange); text-shadow: 0 0 10px var(--orange); }

.arena-hud { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; padding: 22px 30px; align-items: center; border-bottom: 1px solid var(--line); }
.hud-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.hud-label.mt { margin-top: 14px; }
.hp-bar { width: 160px; height: 10px; margin-top: 6px; background: rgba(133,173,152,.1); border: 1px solid var(--line); position: relative; overflow: hidden; }
.hp-bar div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--red), var(--orange)); transition: width .4s; box-shadow: 0 0 10px rgba(255,92,92,.5); }
.hud-big { font-family: var(--mono); font-size: 30px; font-weight: 700; color: var(--cyan); line-height: 1.1; margin-top: 2px; }
.hud-big small { font-size: 14px; color: var(--muted); }
.hud-center { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.crosshair { position: relative; width: 64px; height: 64px; }
.crosshair span { position: absolute; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.crosshair span:nth-child(1) { left: 31px; top: 0; width: 2px; height: 18px; }
.crosshair span:nth-child(2) { left: 31px; bottom: 0; width: 2px; height: 18px; }
.crosshair span:nth-child(3) { top: 31px; left: 0; width: 18px; height: 2px; }
.crosshair span:nth-child(4) { top: 31px; right: 0; width: 18px; height: 2px; }
.crosshair i { position: absolute; left: 30px; top: 30px; width: 4px; height: 4px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.crosshair.fire { animation: recoil .25s ease; }
@keyframes recoil { 0% { transform: scale(1); } 40% { transform: scale(.82); } 100% { transform: scale(1); } }
.crosshair-label { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.hud-right { text-align: right; }
.enemy-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; justify-content: end; margin-top: 8px; width: 160px; margin-left: auto; }
.enemy-dot { width: 26px; height: 26px; display: grid; place-items: center; font-size: 14px; color: var(--red); background: rgba(255,92,92,.08); border: 1px solid rgba(255,92,92,.35); transition: .3s; }
.enemy-dot.dead { color: var(--dim); background: rgba(133,173,152,.04); border-color: var(--line); opacity: .35; text-decoration: line-through; }
.enemy-dot.hit { animation: hitFlash .4s ease; }
@keyframes hitFlash { 0% { background: var(--red); color: #fff; transform: scale(1.4); } 100% { transform: scale(1); } }

.battle-question { padding: 22px 30px 26px; min-height: 220px; }
.bq-head { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: 1px; margin-bottom: 14px; }
.bq-head span:first-child { color: var(--cyan); }
.bq-question { font-size: 17px; font-weight: 700; line-height: 1.6; margin-bottom: 18px; }
.bq-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bq-option {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-align: left;
  background: rgba(133,173,152,.04); border: 1px solid var(--line); font-size: 13px; transition: .18s;
}
.bq-option:hover:not(:disabled) { border-color: var(--cyan); background: rgba(54,207,201,.08); transform: translateX(3px); }
.bq-option .opt-key { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong); }
.bq-option.correct { border-color: var(--green); background: rgba(149,222,100,.12); }
.bq-option.correct .opt-key { color: var(--green); border-color: var(--green); }
.bq-option.wrong { border-color: var(--red); background: rgba(255,92,92,.12); }
.bq-option.wrong .opt-key { color: var(--red); border-color: var(--red); }
.bq-option:disabled { cursor: default; }
.bq-feedback { margin-top: 14px; font-size: 12px; color: var(--muted); min-height: 20px; }
.bq-feedback.success { color: var(--green); }
.bq-feedback.fail { color: var(--red); }

.battle-controls { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.primary-btn {
  padding: 12px 28px; font-size: 14px; font-weight: 700; letter-spacing: 1px;
  color: #0a0e0c; background: linear-gradient(135deg, var(--cyan), #26a69a);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 94% 100%, 0 100%);
  box-shadow: 0 6px 20px rgba(54,207,201,.2); transition: .2s;
}
.primary-btn:hover { filter: brightness(1.15); transform: translateY(-2px); }
.primary-btn span { margin-left: 8px; }
.control-tip { font-size: 11px; color: var(--muted); }

/* ============================================================
 * 黑潮爆破 · 据点地图
 * ============================================================ */
.demo-progress { width: 140px; height: 5px; background: rgba(133,173,152,.12); border-radius: 3px; overflow: hidden; margin-left: auto; }
.demo-progress div { height: 100%; width: 0; background: var(--purple); transition: width .5s; box-shadow: 0 0 8px var(--purple); }
.demo-top > span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.demo-map {
  position: relative; min-height: 300px; padding: 26px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
  background:
    radial-gradient(circle at 80% 20%, rgba(179,127,235,.08), transparent 40%),
    repeating-linear-gradient(0deg, transparent 0, transparent 28px, rgba(133,173,152,.035) 29px),
    repeating-linear-gradient(90deg, transparent 0, transparent 28px, rgba(133,173,152,.035) 29px),
    linear-gradient(135deg, #0f1219, #0a0c10);
}
.outpost {
  position: relative; min-height: 130px; padding: 18px 20px; cursor: pointer; transition: .25s;
  background: rgba(179,127,235,.03); border: 1px solid rgba(179,127,235,.25);
  clip-path: polygon(0 0, 100% 0, 100% 78%, 96% 100%, 0 100%);
  display: flex; flex-direction: column; justify-content: center;
}
.outpost:hover { border-color: var(--purple); background: rgba(179,127,235,.09); transform: translateY(-3px); }
.outpost-id { font-family: var(--mono); font-size: 10px; color: var(--purple); letter-spacing: 1px; }
.outpost-title { font-size: 16px; font-weight: 700; margin: 4px 0 6px; }
.outpost-status { font-size: 11px; color: var(--muted); }
.outpost-status .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); margin-right: 6px; box-shadow: 0 0 8px var(--amber); }
.outpost.destroyed { border-color: rgba(149,222,100,.3); background: rgba(149,222,100,.04); }
.outpost.destroyed .outpost-status { color: var(--green); }
.outpost.destroyed .outpost-status .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.outpost.destroyed::after { content: "✕"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 40px; color: rgba(149,222,100,.2); }
.demo-bottom { padding: 12px 18px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* ============================================================
 * 弹窗
 * ============================================================ */
.modal-root { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.modal-root.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(3,6,4,.82); backdrop-filter: blur(4px); animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  position: relative; z-index: 1; width: min(620px, 92vw); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(160deg, #16211b, #0d130f);
  border: 1px solid var(--line-strong); padding: 28px 30px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  box-shadow: 0 24px 70px rgba(0,0,0,.7);
  animation: modalIn .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-box::-webkit-scrollbar { width: 6px; }
.modal-box::-webkit-scrollbar-thumb { background: rgba(133,173,152,.3); border-radius: 3px; }
.modal-close { position: absolute; right: 18px; top: 16px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); font-size: 20px; border: 1px solid var(--line); transition: .2s; z-index: 2; }
.modal-close:hover { color: var(--red); border-color: var(--red); }
.modal-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 1.6px; color: var(--orange); margin-bottom: 8px; }
.modal-title { font-size: 21px; font-weight: 800; letter-spacing: 1px; margin-bottom: 6px; padding-right: 30px; }
.modal-scene { font-size: 12px; color: var(--muted); line-height: 1.7; padding: 12px 14px; background: rgba(133,173,152,.05); border-left: 2px solid var(--line-strong); margin: 12px 0 18px; }
.modal-scene .scene-head { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; color: var(--orange); margin-bottom: 7px; }
.modal-scene .scene-desc { white-space: pre-wrap; }
.modal-scene .scene-step { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--text); font-size: 13px; line-height: 1.65; }
.modal-scene .scene-step .si { flex: 0 0 auto; color: var(--amber); font-weight: 700; font-family: var(--mono); }
.modal-scene .scene-step .sa { display: block; margin-top: 4px; color: var(--green); font-size: 12px; }
.modal-question { font-size: 16px; font-weight: 700; line-height: 1.7; margin-bottom: 18px; }
.modal-question .blank { color: var(--amber); border-bottom: 2px dashed var(--amber); padding: 0 6px; }
.modal-options { display: flex; flex-direction: column; gap: 10px; }
.modal-option {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left;
  background: rgba(133,173,152,.04); border: 1px solid var(--line); font-size: 14px; transition: .18s;
}
.modal-option:hover:not(:disabled) { border-color: var(--orange); background: rgba(255,122,69,.07); transform: translateX(3px); }
.modal-option .opt-key { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--muted); border: 1px solid var(--line-strong); }
.modal-option.correct { border-color: var(--green); background: rgba(149,222,100,.12); }
.modal-option.correct .opt-key { color: var(--green); border-color: var(--green); }
.modal-option.wrong { border-color: var(--red); background: rgba(255,92,92,.12); }
.modal-option.wrong .opt-key { color: var(--red); border-color: var(--red); }
.modal-option:disabled { cursor: default; }
.modal-explain { margin-top: 18px; padding: 14px 16px; background: rgba(54,207,201,.05); border-left: 2px solid var(--cyan); font-size: 12px; line-height: 1.75; color: #b9ccc3; }
.modal-explain b { color: var(--cyan); }
.modal-actions { display: flex; gap: 12px; margin-top: 22px; justify-content: flex-end; }
.modal-btn { padding: 10px 22px; font-size: 13px; font-weight: 700; border: 1px solid var(--line-strong); color: var(--text); transition: .2s; }
.modal-btn:hover { border-color: var(--text); }
.modal-btn.primary { background: var(--orange); border-color: var(--orange); color: #0a0e0c; }
.modal-btn.primary:hover { filter: brightness(1.15); }
.modal-btn.green { background: var(--green); border-color: var(--green); color: #0a0e0c; }
.modal-btn.purple { background: var(--purple); border-color: var(--purple); color: #0a0e0c; }

/* 情报卡 */
.card-reveal { text-align: center; padding: 10px 0; }
.card-reveal-icon { font-size: 52px; color: var(--amber); filter: drop-shadow(0 0 18px rgba(255,197,61,.5)); animation: cardPop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes cardPop { from { transform: scale(0) rotate(-20deg); } to { transform: none; } }
.card-reveal h3 { font-size: 20px; margin: 12px 0; color: var(--amber); }
.card-reveal .intel-card { text-align: left; padding: 18px; background: rgba(255,197,61,.05); border: 1px solid rgba(255,197,61,.25); }
.card-reveal .intel-card .ic-t { font-size: 14px; font-weight: 700; color: var(--amber); margin-bottom: 8px; }
.card-reveal .intel-card .ic-c { font-size: 13px; line-height: 1.8; color: var(--text); }

/* 结算弹窗 */
.result-banner { text-align: center; padding: 14px 0; }
.result-icon { font-size: 64px; filter: drop-shadow(0 0 20px currentColor); animation: cardPop .5s; }
.result-icon.win { color: var(--green); }
.result-icon.lose { color: var(--red); }
.result-title { font-size: 28px; font-weight: 900; letter-spacing: 3px; margin: 10px 0; }
.result-title.win { color: var(--green); }
.result-title.lose { color: var(--red); }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.result-cell { padding: 14px; background: rgba(133,173,152,.05); border: 1px solid var(--line); text-align: center; }
.result-cell .rc-num { font-family: var(--mono); font-size: 22px; font-weight: 700; color: var(--amber); }
.result-cell .rc-label { font-size: 10px; color: var(--muted); margin-top: 4px; }

/* 爆炸动画 */
.explosion { position: fixed; z-index: 200; pointer-events: none; font-size: 80px; animation: boom 1s ease forwards; }
@keyframes boom { 0% { transform: scale(.2) rotate(0); opacity: 1; } 60% { transform: scale(1.8) rotate(30deg); opacity: 1; } 100% { transform: scale(2.4) rotate(60deg); opacity: 0; } }

/* 情报卡列表 */
.cards-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; max-height: 50vh; overflow-y: auto; }
.intel-item { padding: 12px 14px; background: rgba(255,197,61,.04); border-left: 2px solid var(--amber); }
.intel-item .ii-t { font-size: 12px; font-weight: 700; color: var(--amber); margin-bottom: 4px; }
.intel-item .ii-c { font-size: 11px; color: var(--muted); line-height: 1.6; }

/* Toast */
.toast-root { position: fixed; top: 84px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  min-width: 220px; padding: 12px 16px; background: rgba(17,25,21,.97); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--amber); font-size: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: toastIn .3s cubic-bezier(.2,1,.3,1), toastOut .3s ease 2.7s forwards;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast .t-title { font-weight: 700; margin-bottom: 2px; }
.toast .t-sub { color: var(--muted); font-size: 11px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* 分步指示 */
.step-indicator { display: flex; gap: 6px; margin-bottom: 16px; }
.step-node { flex: 1; height: 4px; background: rgba(133,173,152,.12); }
.step-node.done { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.step-node.active { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .topbar { gap: 14px; padding: 0 18px; }
  .brand { min-width: 190px; }
  .brand-sub { display: none; }
  .nav-btn { padding: 10px 10px; font-size: 12px; }
  .player-panel { min-width: 200px; gap: 10px; }
  .currency .coin-label { display: none; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: auto; }
  .hero-stats { gap: 22px; }
}
@media (max-width: 760px) {
  #main { padding: 18px 14px 30px; }
  .topbar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav-btn { flex: 1; font-size: 11px; padding: 8px 6px; }
  .nav-btn .nav-ico { display: none; }
  .player-panel { min-width: auto; }
  .exp-track { display: none; }
  .hero-title { font-size: 28px; }
  .hero-stats { flex-wrap: wrap; gap: 14px 24px; }
  .bq-options { grid-template-columns: 1fr; }
  .arena-hud { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .hud-center { order: -1; }
  .hud-right { text-align: left; }
  .enemy-grid { margin-left: 0; }
  .battle-question { padding: 16px; }
  .demo-map { grid-template-columns: 1fr; }
  .cards-list { grid-template-columns: 1fr; }
  .home-bottom { flex-direction: column; align-items: stretch; }
  .statusbar { padding: 0 14px; font-size: 9px; }
  .modal-box { padding: 22px 18px; }
}

/* ============================================================
   v2.0 新增：登录界面 / 管理后台 / 动效
   ============================================================ */
.green-dot { background: var(--green) !important; box-shadow: 0 0 10px var(--green) !important; }

/* ---------- 登录/注册 ---------- */
.auth-screen {
  position: fixed; inset: 0; z-index: 500; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(20,32,26,.96), rgba(6,10,8,.99));
  overflow: hidden;
}
.auth-bg-particles { position: absolute; inset: 0; pointer-events: none; }
.auth-particle { position: absolute; border-radius: 50%; background: var(--orange); opacity: .35; animation: float-up linear infinite; }
@keyframes float-up { from { transform: translateY(0) scale(1); opacity: 0; } 15% { opacity: .4; } 85% { opacity: .4; } to { transform: translateY(-100vh) scale(.3); opacity: 0; } }
.auth-wrap { position: relative; z-index: 2; width: min(880px, 92vw); display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.auth-brand { text-align: center; color: var(--text); }
.auth-logo { color: var(--orange); filter: drop-shadow(0 0 20px rgba(255,122,69,.5)); animation: logoPulse 3s ease-in-out infinite; }
@keyframes logoPulse { 0%,100% { filter: drop-shadow(0 0 20px rgba(255,122,69,.4)); transform: scale(1); } 50% { filter: drop-shadow(0 0 32px rgba(255,122,69,.7)); transform: scale(1.05); } }
.auth-brand h1 { font-size: 46px; font-weight: 900; letter-spacing: 6px; margin: 14px 0 6px; }
.auth-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 1.6px; color: var(--orange); }
.auth-desc { color: var(--muted); font-size: 13px; margin-top: 18px; }
.auth-card { background: linear-gradient(160deg, rgba(20,30,24,.98), rgba(12,18,14,.98)); border: 1px solid var(--line-strong); padding: 30px 32px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); box-shadow: 0 24px 70px rgba(0,0,0,.6); }
.auth-tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.auth-tab { flex: 1; padding: 12px; font-size: 15px; font-weight: 700; color: var(--muted); position: relative; }
.auth-tab.active { color: var(--amber); }
.auth-tab.active::after { content: ""; position: absolute; bottom: -1px; left: 20%; right: 20%; height: 2px; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.auth-form label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; letter-spacing: .5px; }
.auth-form input { width: 100%; padding: 12px 14px; background: rgba(0,0,0,.3); border: 1px solid var(--line); color: var(--text); font-size: 14px; outline: none; transition: .2s; }
.auth-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 1px rgba(255,122,69,.3); }
.auth-msg { min-height: 20px; font-size: 12px; color: var(--red); margin-top: 8px; }
.auth-msg.ok { color: var(--green); }
.auth-submit { width: 100%; margin-top: 10px; padding: 14px; font-size: 15px; font-weight: 700; letter-spacing: 1px; color: #0a0e0c; background: linear-gradient(135deg, var(--orange), var(--amber)); clip-path: polygon(0 0, 100% 0, 100% 72%, 95% 100%, 0 100%); transition: .2s; }
.auth-submit:hover { filter: brightness(1.12); transform: translateY(-2px); }
.auth-submit span { margin-left: 8px; }
.auth-foot { display: flex; align-items: center; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }

/* ---------- 顶栏用户菜单 / 同步状态 ---------- */
.save-status { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.save-status.saving { color: var(--amber); }
.save-status.saving .pulse-dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.user-menu { position: relative; }
.user-avatar { width: 38px; height: 38px; display: grid; place-items: center; background: linear-gradient(135deg, var(--orange), var(--amber)); color: #0a0e0c; font-weight: 800; font-size: 16px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.user-dropdown { position: absolute; right: 0; top: 46px; min-width: 150px; background: var(--panel-solid); border: 1px solid var(--line-strong); padding: 8px; display: none; z-index: 50; box-shadow: 0 12px 30px rgba(0,0,0,.6); }
.user-dropdown.show { display: block; }
.ud-name { padding: 8px 10px; font-size: 13px; font-weight: 700; color: var(--amber); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-dropdown button { width: 100%; padding: 8px 10px; font-size: 12px; color: var(--red); text-align: left; }
.user-dropdown button:hover { background: rgba(255,92,92,.1); }

/* ---------- 教材选择页账号栏 ---------- */
.bs-userbar {
  position: fixed; top: 18px; right: 22px; z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  background: rgba(10,16,13,.85); border: 1px solid var(--line-strong);
  backdrop-filter: blur(6px);
}
.bs-user-name { font-size: 12px; color: var(--muted); }
.bs-user-name b { color: var(--amber); font-weight: 700; }
.bs-logout {
  padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--red);
  border: 1px solid rgba(255,92,92,.4); background: rgba(255,92,92,.06);
  cursor: pointer; transition: .2s;
}
.bs-logout:hover { background: rgba(255,92,92,.14); border-color: var(--red); }
@media (max-width: 640px) {
  .bs-userbar { top: 10px; right: 10px; gap: 8px; padding: 6px 9px; }
  .bs-user-name { font-size: 11px; }
  .bs-logout { padding: 5px 9px; font-size: 11px; }
}

/* ---------- 难度徽章 ---------- */
.level-badge { padding: 3px 10px; border: 1px solid var(--amber); color: var(--amber); font-family: var(--mono); font-size: 10px; }
.level-badge.hard { border-color: var(--red); color: var(--red); }

/* ---------- 情报点答题进度条 ---------- */
.quiz-progress { display: flex; gap: 4px; margin: 14px 0 18px; }
.quiz-node { flex: 1; height: 5px; background: rgba(133,173,152,.15); transition: .3s; }
.quiz-node.done { background: var(--green); box-shadow: 0 0 6px var(--green); }
.quiz-node.current { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.quiz-node.wrong { background: var(--red); }

/* ---------- 管理后台 ---------- */
.admin-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.admin-sum-card { padding: 18px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--amber); }
.admin-sum-card .asc-num { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--amber); }
.admin-sum-card .asc-label { font-size: 11px; color: var(--muted); margin-top: 4px; }
.admin-table-wrap { background: var(--panel); border: 1px solid var(--line); overflow: auto; max-height: 460px; }
.admin-table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.admin-table-wrap::-webkit-scrollbar-thumb { background: rgba(133,173,152,.25); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 900px; }
.admin-table th { position: sticky; top: 0; z-index: 2; padding: 12px 14px; text-align: left; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: #121a15; }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table tr:hover td { background: rgba(133,173,152,.04); }
.admin-table .admin-tag { color: var(--orange); font-weight: 700; }
.admin-table .detail-btn { padding: 5px 12px; border: 1px solid var(--line-strong); font-size: 11px; color: var(--cyan); }
.admin-table .detail-btn:hover { border-color: var(--cyan); background: rgba(54,207,201,.1); }
.admin-empty { text-align: center; padding: 40px; color: var(--muted); }

/* ---------- 动态效果增强 ---------- */
.mode-card::after { content: ""; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.04), transparent); transform: skewX(-20deg); transition: .6s; }
.mode-card:hover::after { left: 150%; }
.hero-title .accent { animation: accentGlow 2.5s ease-in-out infinite; }
@keyframes accentGlow { 0%,100% { text-shadow: 0 0 24px rgba(255,122,69,.3); } 50% { text-shadow: 0 0 36px rgba(255,122,69,.6); } }
.pulse-dot { animation: blink 1.6s infinite; }
@keyframes shootLine { 0% { opacity: 1; transform: scaleX(0); } 100% { opacity: 0; transform: scaleX(1); } }
.shot-line { position: absolute; height: 2px; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); transform-origin: left center; animation: shootLine .25s ease-out forwards; z-index: 5; }
.float-score { position: fixed; font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--green); pointer-events: none; z-index: 250; animation: floatScore 1s ease-out forwards; }
@keyframes floatScore { 0% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(-60px) scale(1.4); } }
.float-damage { color: var(--red); }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; gap: 24px; }
  .auth-brand h1 { font-size: 34px; }
  .admin-summary { grid-template-columns: repeat(2, 1fr); }
  .save-status { display: none; }
}

/* ---------- 注册页：班级下拉框 ---------- */
.auth-form select.auth-select {
  width: 100%; padding: 12px 14px; background: rgba(0,0,0,.3);
  border: 1px solid var(--line); color: var(--text); font-size: 14px;
  outline: none; transition: .2s; cursor: pointer;
  font-family: inherit; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--orange) 50%), linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.auth-form select.auth-select:focus { border-color: var(--orange); box-shadow: 0 0 0 1px rgba(255,122,69,.3); }
.auth-form select.auth-select option { background: #0a0e0c; color: var(--text); }
.auth-form select.auth-select:invalid { color: var(--muted); }

/* ============================================================
   v3.0 通用版：教材选择 / 当前教材横幅 / 切换按钮
   ============================================================ */
.book-select {
  position: fixed; inset: 0; z-index: 480; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 25%, rgba(20,32,26,.97), rgba(6,10,8,.995));
  overflow-y: auto; padding: 30px 16px;
}
.bs-bg-particles { position: absolute; inset: 0; pointer-events: none; }
.bs-wrap { position: relative; z-index: 2; width: min(1120px, 94vw); }
.bs-header { text-align: center; margin-bottom: 30px; }
.bs-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 2.4px; color: var(--orange); }
.bs-header h1 { font-size: 38px; font-weight: 900; letter-spacing: 4px; margin: 12px 0 8px; color: var(--text); }
.bs-header p { color: var(--muted); font-size: 13px; }
.book-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.book-card {
  position: relative; padding: 26px 26px 22px; cursor: pointer; overflow: hidden;
  background: linear-gradient(150deg, rgba(22,32,26,.96), rgba(12,18,14,.96));
  border: 1px solid var(--line-strong); border-left: 4px solid var(--bc, var(--orange));
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
  transition: .22s;
}
.book-card:hover { transform: translateY(-5px); border-color: var(--bc, var(--orange)); box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 24px color-mix(in srgb, var(--bc, #ff7a45) 22%, transparent); }
.book-card::after { content: ""; position: absolute; top: -60%; right: -20%; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--bc, #ff7a45) 16%, transparent), transparent 70%); pointer-events: none; }
.bc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bc-code { font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; color: var(--bc, var(--orange)); border: 1px solid var(--bc, var(--orange)); padding: 3px 10px; }
.bc-badge { font-size: 10px; color: var(--dim); font-family: var(--mono); }
.bc-name { font-size: 25px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.bc-sub { font-size: 12px; color: var(--bc, var(--orange)); margin-bottom: 12px; }
.bc-desc { font-size: 12px; color: var(--muted); line-height: 1.7; min-height: 40px; }
.bc-meta { display: flex; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); }
.bc-meta b { color: var(--text); font-family: var(--mono); font-size: 14px; display: block; margin-bottom: 2px; }
.bc-enter { position: absolute; right: 22px; bottom: 20px; font-size: 12px; color: var(--bc, var(--orange)); font-weight: 700; opacity: .8; }
.bc-progress-line { height: 3px; background: rgba(133,173,152,.15); margin-top: 12px; }
.bc-progress-line i { display: block; height: 100%; background: var(--bc, var(--orange)); box-shadow: 0 0 6px var(--bc, var(--orange)); }
.bs-foot { text-align: center; margin-top: 26px; font-size: 11px; color: var(--dim); display: flex; align-items: center; justify-content: center; gap: 8px; }

/* 顶栏教材切换按钮 */
.book-switch { display: flex; align-items: center; gap: 7px; padding: 8px 12px; margin-right: 14px; background: rgba(255,122,69,.08); border: 1px solid var(--line-strong); color: var(--amber); font-size: 12px; font-weight: 600; cursor: pointer; transition: .2s; white-space: nowrap; }
.book-switch:hover { border-color: var(--orange); background: rgba(255,122,69,.16); }
.book-switch .bs-ico { font-size: 14px; }
.book-switch .bs-arrow { font-size: 9px; color: var(--muted); }

/* 当前教材横幅 */
.current-book-banner { display: inline-flex; align-items: center; gap: 12px; padding: 9px 16px; margin-bottom: 20px; background: rgba(0,0,0,.28); border: 1px solid var(--line); border-left: 3px solid var(--orange); }
.cbb-label { font-size: 10px; color: var(--muted); font-family: var(--mono); letter-spacing: 1px; }
.cbb-name { font-size: 15px; font-weight: 700; color: var(--amber); }
.cbb-sub { font-size: 11px; color: var(--dim); }
.cbb-switch { margin-left: 6px; padding: 4px 10px; font-size: 11px; color: var(--cyan); border: 1px solid var(--line-strong); }
.cbb-switch:hover { border-color: var(--cyan); background: rgba(54,207,201,.08); }

/* 教材进度标签（管理后台） */
.book-tag { display: inline-block; font-size: 10px; padding: 2px 7px; margin: 2px 3px 2px 0; border: 1px solid var(--line-strong); color: var(--cyan); font-family: var(--mono); }
.book-tag.active-book { border-color: var(--orange); color: var(--orange); }

@media (max-width: 900px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-switch .bs-arrow, .bs-header h1 { font-size: 30px; }
  .book-switch span:not(.bs-ico) { display: none; }
  .cbb-sub { display: none; }
}

/* ============================================================
 * v4 新增：管理后台分页 / 战场特效 / 天才少年称号
 * ============================================================ */
.admin-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.pager-btn {
  padding: 8px 20px; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  color: var(--muted); border: 1px solid var(--line-strong); background: rgba(0,0,0,.2);
  cursor: pointer; transition: .2s; font-family: inherit;
}
.pager-btn:hover:not(:disabled) { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 12px rgba(255,197,61,.2); }
.pager-btn:disabled { opacity: .3; cursor: not-allowed; }
.pager-info { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 1px; }

/* ---------- 战场特效层 ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 900; }
.fx-boom { position: absolute; width: 0; height: 0; }
.fx-boom span {
  position: absolute; border-radius: 50%;
  animation: fxParticle .72s cubic-bezier(.15,.75,.4,1) forwards;
}
@keyframes fxParticle {
  0% { transform: translate(0,0) scale(1); opacity: 1; }
  70% { opacity: .9; }
  100% { transform: translate(var(--tx), var(--ty)) scale(.15); opacity: 0; }
}
.fx-ring {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px;
  border: 2px solid rgba(255,197,61,.9); border-radius: 50%;
  animation: fxRing .55s ease-out forwards;
}
.fx-ring.big { border-color: rgba(255,122,69,.95); animation-duration: .8s; }
@keyframes fxRing { to { width: 110px; height: 110px; left: -55px; top: -55px; opacity: 0; } }
.fx-trace {
  position: absolute; height: 2px; transform-origin: 0 50%; z-index: 901;
  background: linear-gradient(90deg, rgba(255,244,200,.95), rgba(255,122,69,.4), transparent);
  animation: fxTrace .3s ease-out forwards;
}
@keyframes fxTrace { 0% { opacity: 1; filter: brightness(1.8); } 100% { opacity: 0; } }
.fx-flash { position: fixed; inset: 0; pointer-events: none; z-index: 880; opacity: 0; }
.fx-flash.white { background: radial-gradient(circle, rgba(255,255,255,.9), rgba(255,255,255,.2)); animation: fxFlash .38s ease-out forwards; }
.fx-flash.red { background: radial-gradient(circle, rgba(255,60,60,.55), rgba(180,0,0,.18)); animation: fxFlash .5s ease-out forwards; }
@keyframes fxFlash { 0% { opacity: 1; } 100% { opacity: 0; } }
.fx-banner {
  position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%);
  z-index: 910; text-align: center; pointer-events: none;
  animation: fxBannerIn .5s cubic-bezier(.2,1.2,.4,1) forwards;
}
.fx-banner .fb-big {
  font-size: 52px; font-weight: 900; letter-spacing: 10px; color: var(--amber);
  text-shadow: 0 0 34px rgba(255,197,61,.85), 0 4px 0 rgba(0,0,0,.4);
}
.fx-banner .fb-sub { font-family: var(--mono); font-size: 15px; letter-spacing: 6px; color: #ffe9b8; margin-top: 10px; text-shadow: 0 0 12px rgba(255,197,61,.5); }
@keyframes fxBannerIn {
  0% { transform: translate(-50%,-50%) scale(.5); opacity: 0; }
  55% { transform: translate(-50%,-50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(1); opacity: 1; }
}
.fx-banner.out { animation: fxBannerOut .4s ease-in forwards; }
@keyframes fxBannerOut { to { transform: translate(-50%,-60%) scale(.9); opacity: 0; } }

/* ---------- 战场氛围 ---------- */
.battle-arena { position: relative; }
.battle-arena.shake { animation: arenaShake .4s cubic-bezier(.36,.07,.19,.97); }
@keyframes arenaShake {
  0%,100% { transform: none; }
  15% { transform: translate(-7px,4px); } 30% { transform: translate(6px,-5px); }
  45% { transform: translate(-5px,3px); } 60% { transform: translate(4px,-3px); }
  75% { transform: translate(-2px,2px); }
}
.battle-arena.intense { border-color: rgba(255,77,79,.55); box-shadow: 0 0 26px rgba(255,77,79,.22), inset 0 0 50px rgba(255,77,79,.07); }

/* 士兵目标样式 */
.enemy-dot { position: relative; }
.enemy-dot svg { width: 17px; height: 17px; filter: drop-shadow(0 0 3px rgba(255,92,92,.5)); }
.enemy-dot.dead svg { filter: none; }
.enemy-dot.dead { text-decoration: none; }

/* ---------- 天才少年称号 ---------- */
.genius-toast {
  position: fixed; left: 50%; top: 34%; transform: translate(-50%,-50%);
  z-index: 920; pointer-events: none; opacity: 0;
}
.genius-toast.hidden { display: none; }
.genius-toast.show { animation: gtIn .45s cubic-bezier(.2,1.4,.4,1) forwards; }
.genius-toast.leave { animation: gtOut .35s ease-in forwards; }
@keyframes gtIn {
  0% { opacity: 0; transform: translate(-50%,-30%) scale(.5) rotate(-6deg); }
  100% { opacity: 1; transform: translate(-50%,-50%) scale(1) rotate(0); }
}
@keyframes gtOut { to { opacity: 0; transform: translate(-50%,-64%) scale(.85); } }
.gt-rays {
  position: absolute; left: 50%; top: 50%; width: 340px; height: 340px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255,197,61,.16) 0 14deg, transparent 14deg 45deg, rgba(255,197,61,.16) 45deg 59deg, transparent 59deg 90deg, rgba(255,197,61,.16) 90deg 104deg, transparent 104deg 135deg, rgba(255,197,61,.16) 135deg 149deg, transparent 149deg 180deg, rgba(255,197,61,.16) 180deg 194deg, transparent 194deg 225deg, rgba(255,197,61,.16) 225deg 239deg, transparent 239deg 270deg, rgba(255,197,61,.16) 270deg 284deg, transparent 284deg 315deg, rgba(255,197,61,.16) 315deg 329deg, transparent 329deg 360deg);
  animation: gtSpin 5s linear infinite;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
}
@keyframes gtSpin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.gt-card {
  position: relative; text-align: center; padding: 26px 56px 24px;
  background: linear-gradient(165deg, rgba(46,38,16,.96), rgba(20,18,10,.96));
  border: 1px solid rgba(255,197,61,.7); border-radius: 6px;
  box-shadow: 0 0 46px rgba(255,197,61,.35), 0 18px 50px rgba(0,0,0,.6);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
.gt-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: #ffdf8e; margin-bottom: 12px; }
.gt-badge {
  width: 58px; height: 58px; margin: 0 auto 10px; display: grid; place-items: center;
  background: linear-gradient(160deg, #ffd666, #ff9a3c); color: #2b1d05;
  font-size: 30px; font-weight: 900; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: 0 0 22px rgba(255,197,61,.7);
  animation: gtPulse 1.1s ease infinite alternate;
}
@keyframes gtPulse { from { transform: scale(1); } to { transform: scale(1.1); } }
.gt-title {
  font-size: 42px; font-weight: 900; letter-spacing: 8px; color: #ffd666;
  text-shadow: 0 0 26px rgba(255,197,61,.75), 0 2px 0 rgba(0,0,0,.4);
}
.gt-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: #cfa96a; margin-top: 8px; }
