/* =================================================================
   CoreAtlasHub - BubbleCatch — military crypto arcade
   Palette: tactical navy · neon blue · gold · combat red · white
   Fonts: Black Ops One (display) · Chakra Petch (tactical body)
   ================================================================= */

:root {
  --bg-void: #060912;
  --bg-deep: #0a0f1f;
  --bg-panel: #111a30;
  --bg-panel-2: #16223d;
  --line: #20304f;
  --line-soft: rgba(120, 160, 220, 0.14);

  --blue: #1e8fff;
  --blue-bright: #57b6ff;
  --cyan: #45e6ff;
  --gold: #f5b41f;
  --gold-bright: #ffd34d;
  --red: #ff3b51;
  --red-deep: #c5122a;
  --white: #eef4ff;
  --mute: #8ea4c9;
  --mute-dim: #5c6f93;

  --good: #46d39a;
  --shadow: 0 18px 50px rgba(2, 6, 16, 0.7);
  --ring-blue: 0 0 0 1px rgba(87, 182, 255, 0.5), 0 0 22px rgba(30, 143, 255, 0.35);
  --ring-gold: 0 0 0 1px rgba(245, 180, 31, 0.55), 0 0 24px rgba(245, 180, 31, 0.3);

  --font-display: "Black Ops One", "Chakra Petch", system-ui, sans-serif;
  --font-arcade: "Press Start 2P", monospace;
  --font-body: "Chakra Petch", system-ui, sans-serif;

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  height: 100%;
  background: var(--bg-void);
  color: var(--white);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
  touch-action: none;
}

body {
  position: relative;
  display: grid;
  place-items: center;
}

button { font-family: inherit; cursor: pointer; color: inherit; border: none; background: none; }
ul, ol { list-style: none; }
strong { font-weight: 700; }

/* ---------- Atmospheric overlays ---------- */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  background:
    radial-gradient(110% 80% at 50% -10%, #14233f 0%, var(--bg-deep) 45%, var(--bg-void) 100%);
}
.scanlines {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.16) 2px 3px);
  mix-blend-mode: multiply; opacity: 0.5;
}
.grain {
  position: fixed; inset: 0; z-index: 61; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.reduced .scanlines, body.reduced .grain { display: none; }

/* ---------- Stage / responsive frame ---------- */
.stage {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 540px;
  max-height: 1000px;
  margin-inline: auto;
  overflow: hidden;
}
@media (min-width: 560px) and (min-height: 720px) {
  .stage {
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow), inset 0 0 0 1px rgba(120,160,220,0.05);
    height: min(94vh, 940px);
    margin-block: auto;
  }
  #bg-canvas { background:
    radial-gradient(80% 60% at 50% 0%, #0e1830 0%, var(--bg-void) 70%); }
}

#game-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  touch-action: none;
  z-index: 1;
  background: var(--bg-void) center / cover no-repeat;
}
/* During a mission the bubble-map sits behind the play field; the canvas
   itself paints a translucent vignette over it so the art reads as
   atmosphere while items stay legible. */
body.in-mission #game-canvas {
  background-image: url("../assets/bubble-map.png");
}

/* =================================================================
   HUD
   ================================================================= */
.hud {
  position: absolute; inset: 0; z-index: 10;
  padding: calc(10px + var(--safe-t)) 12px 0;
  pointer-events: none;
  display: flex; flex-direction: column; gap: 8px;
}
.hud-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hud-block { display: flex; align-items: center; }
.hud-center { text-align: center; flex: 1; }
.hud-score {
  font-family: var(--font-arcade);
  font-size: clamp(18px, 6vw, 30px);
  color: var(--gold-bright);
  letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(245,180,31,0.5), 0 2px 0 rgba(0,0,0,0.6);
  line-height: 1;
}
.hud-sub {
  margin-top: 6px;
  display: inline-flex; gap: 8px; align-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
  color: var(--mute);
}
.band-tag { color: var(--cyan); }
.timer-tag { color: var(--white); font-variant-numeric: tabular-nums; }
.lvl-tag { color: var(--gold); }

.lives { gap: 3px; flex-wrap: wrap; max-width: 92px; }
.heart {
  width: 17px; height: 17px;
  filter: drop-shadow(0 0 5px rgba(255,59,81,0.6));
  transition: transform .25s ease, opacity .25s ease;
}
.heart.lost { opacity: 0.18; filter: none; transform: scale(0.8); }
.heart.pop { animation: heartPop .4s ease; }
@keyframes heartPop { 0%,100%{transform:scale(1)} 40%{transform:scale(1.45)} }

.hud-controls { gap: 6px; pointer-events: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(17, 26, 48, 0.72);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--mute); backdrop-filter: blur(6px);
  transition: transform .12s ease, color .12s ease, border-color .12s;
}
.icon-btn:hover, .icon-btn:active { color: var(--white); border-color: var(--blue); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }

.hud-mission { pointer-events: none; }
.mission-label {
  display: flex; justify-content: space-between;
  font-size: 10px; letter-spacing: 1.5px; color: var(--mute);
  margin-bottom: 4px; font-weight: 600;
}
.mission-bar {
  height: 7px; border-radius: 6px;
  background: rgba(10,16,32,0.8);
  border: 1px solid var(--line);
  overflow: hidden;
}
.mission-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 60%, var(--gold) 100%);
  box-shadow: 0 0 14px rgba(69,230,255,0.6);
  border-radius: 6px;
  transition: width .35s cubic-bezier(.2,.8,.2,1);
}

.powerup-tray { display: flex; gap: 7px; flex-wrap: wrap; pointer-events: none; }
.pu-chip {
  display: flex; align-items: center; gap: 5px;
  padding: 4px 9px 4px 5px; border-radius: 20px;
  background: rgba(17,26,48,0.8); border: 1px solid var(--blue);
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  box-shadow: var(--ring-blue);
  animation: chipIn .3s ease;
}
.pu-chip .ico { width: 18px; height: 18px; }
.pu-chip .bar { width: 26px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.pu-chip .bar i { display: block; height: 100%; background: var(--cyan); }
.pu-chip.shield { border-color: var(--blue-bright); }
.pu-chip.moon { border-color: var(--gold); box-shadow: var(--ring-gold); }
.pu-chip.scan { border-color: var(--cyan); }
.pu-chip.hodl { border-color: var(--good); }
@keyframes chipIn { from{ opacity:0; transform: translateY(-6px) scale(.9);} to{opacity:1;} }

/* Toast */
.toast {
  position: absolute; top: 38%; left: 50%; transform: translate(-50%,-50%);
  z-index: 12; pointer-events: none; text-align: center;
  font-family: var(--font-display);
  font-size: clamp(20px, 7vw, 34px);
  color: var(--white); letter-spacing: 2px;
  text-shadow: 0 0 20px rgba(69,230,255,0.7), 0 4px 0 rgba(0,0,0,.5);
  animation: toastPop 1.4s ease forwards;
}
.toast .small { display:block; font-family: var(--font-body); font-size: 13px; letter-spacing:1px; color: var(--gold-bright); margin-top: 6px; }
@keyframes toastPop {
  0% { opacity: 0; transform: translate(-50%,-30%) scale(.6); }
  18% { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-58%) scale(1.05); }
}

/* =================================================================
   SCREENS (overlays)
   ================================================================= */
.screen {
  position: absolute; inset: 0; z-index: 30;
  display: none;
  padding: calc(18px + var(--safe-t)) 16px calc(18px + var(--safe-b));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: grid; place-items: center; animation: screenIn .4s ease; }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

.screen.result { background: radial-gradient(120% 90% at 50% 30%, rgba(8,13,28,0.78), rgba(4,7,16,0.96)); backdrop-filter: blur(4px); }

/* ---------- Start screen ---------- */
#screen-boot {
  background:
    linear-gradient(180deg, rgba(7,11,22,0.74), rgba(7,11,22,0.84) 52%, rgba(7,11,22,0.95)),
    center top / cover no-repeat url("../assets/hero-bg.jpg");
}
.boot-wrap { width: 100%; max-width: 440px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.emblem {
  width: clamp(108px, 34vw, 156px); aspect-ratio: 1;
  background: center/contain no-repeat;
  filter: drop-shadow(0 10px 26px rgba(30,143,255,0.45));
  animation: hover 4s ease-in-out infinite;
}
.emblem.small { width: 64px; }
#boot-emblem {
  width: clamp(200px, 72vw, 340px);
  border-radius: 18px;
  filter: drop-shadow(0 14px 38px rgba(30,143,255,0.5));
}
@keyframes hover { 0%,100%{transform: translateY(0)} 50%{transform: translateY(-10px)} }
body.reduced .emblem { animation: none; }

.title-main {
  font-family: var(--font-display);
  font-size: clamp(32px, 11vw, 58px);
  line-height: .9; letter-spacing: 1px;
  margin-top: 8px;
  color: var(--white);
  text-shadow: 0 0 28px rgba(30,143,255,0.55), 0 5px 0 rgba(0,0,0,0.45);
  position: relative;
}
.title-sub {
  display: block;
  font-size: clamp(15px, 5.4vw, 25px);
  letter-spacing: clamp(6px, 3vw, 16px);
  margin-top: 10px; margin-left: 6px;
  color: transparent;
  background: linear-gradient(90deg, var(--blue-bright), var(--cyan), var(--gold-bright));
  -webkit-background-clip: text; background-clip: text;
}
.tagline { margin-top: 16px; font-size: 14px; color: var(--mute); letter-spacing: .4px; max-width: 320px; }
.tagline .hl { color: var(--gold-bright); font-weight: 600; }

.best-strip {
  margin-top: 16px; font-size: 12px; letter-spacing: 1.5px;
  color: var(--mute); font-weight: 600;
}
.best-strip strong { color: var(--gold-bright); font-family: var(--font-arcade); font-size: 13px; }

.flag-line { width: 70%; height: 4px; margin-top: 26px; border-radius: 3px;
  background: linear-gradient(90deg, var(--red) 0 33%, var(--white) 33% 66%, var(--blue) 66% 100%);
  opacity: .85; }
.credit { margin-top: 12px; font-size: 10.5px; letter-spacing: .8px; color: var(--mute-dim); }

/* ---------- Menus / buttons ---------- */
.menu { margin-top: 26px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Hero top-3 commanders ---------- */
.hero-top3 { margin-top: 24px; width: 100%; }
.hero-top3-title {
  font-family: var(--font-display); font-size: 11px; letter-spacing: 2.5px;
  color: var(--mute); text-align: center; margin-bottom: 10px;
}
.hero-top3-list { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.hero-top3-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; border-radius: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
}
.hero-top3-list .rank { font-family: var(--font-display); font-size: 14px; color: var(--mute-dim); width: 18px; }
.hero-top3-list .who { flex: 1; font-family: var(--font-arcade); font-size: 13px; letter-spacing: 1px; color: var(--white); }
.hero-top3-list .meta { font-size: 10px; color: var(--mute-dim); letter-spacing: .5px; }
.hero-top3-list .sc { font-family: var(--font-arcade); font-size: 12px; color: var(--gold-bright); }
.hero-top3-list li:nth-child(1) { border-color: var(--gold); box-shadow: var(--ring-gold); }
.hero-top3-list li:nth-child(1) .rank { color: var(--gold-bright); }
.hero-top3-list li:nth-child(2) { border-color: rgba(180,200,230,0.4); }
.hero-top3-list li:nth-child(3) { border-color: rgba(205,127,50,0.5); }

.btn {
  position: relative;
  font-family: var(--font-display);
  letter-spacing: 2px;
  font-size: 15px;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-panel-2), var(--bg-panel));
  color: var(--white);
  overflow: hidden;
  transition: transform .12s ease, border-color .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--blue); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  border-color: var(--blue);
  background: linear-gradient(180deg, #1f6fd6, #12477f);
  box-shadow: var(--ring-blue);
  font-size: 18px;
}
.btn-primary:hover { box-shadow: 0 0 0 1px var(--blue-bright), 0 0 30px rgba(30,143,255,0.55); }
.btn-glow {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 3.4s ease-in-out infinite;
}
@keyframes sheen { 0%,60%{transform: translateX(-120%)} 80%,100%{transform: translateX(120%)} }
body.reduced .btn-glow { display: none; }
.btn-ghost { font-size: 13px; padding: 13px; color: var(--mute); }
.btn-ghost:hover { color: var(--white); }
.btn-ghost.small { font-size: 11px; padding: 9px 14px; }
.btn-ghost.danger:hover { border-color: var(--red); color: var(--red); }

/* ---------- Panels (howto / eco / board / settings) ---------- */
.panel {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, rgba(18,27,49,0.96), rgba(10,16,33,0.97));
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  max-height: 100%;
  overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30,143,255,0.08), transparent);
}
.panel-head h2 { font-family: var(--font-display); font-size: 20px; letter-spacing: 2px; color: var(--white); }
.icon-btn.close { width: 34px; height: 34px; }
.panel-body { padding: 18px 20px; overflow-y: auto; }
.panel-intro { font-size: 13px; color: var(--mute); margin-bottom: 16px; line-height: 1.5; }
.panel-foot { padding: 16px 20px; border-top: 1px solid var(--line); }

.howto-block { margin-bottom: 18px; }
.howto-block h3, .legend-col h3 { font-family: var(--font-display); font-size: 13px; letter-spacing: 2px; margin-bottom: 8px; color: var(--cyan); }
.howto-block h3.pow { color: var(--blue-bright); }
.howto-block p { font-size: 13px; color: var(--mute); line-height: 1.55; }
.howto-block strong { color: var(--white); }
.ctl-list li { font-size: 12.5px; color: var(--mute); padding: 6px 0; display: flex; align-items: center; gap: 10px; }
.ctl-key {
  flex: 0 0 auto; min-width: 50px; text-align: center;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 1px;
  background: rgba(30,143,255,0.12); border: 1px solid var(--line);
  color: var(--blue-bright); padding: 4px 8px; border-radius: 7px;
}
.howto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.legend-col h3.good { color: var(--good); }
.legend-col h3.bad { color: var(--red); }
.legend { display: flex; flex-direction: column; gap: 9px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mute); }
.legend .ico { width: 30px; height: 30px; flex: 0 0 auto; }
.legend .nm { color: var(--white); font-weight: 600; display: block; font-size: 12px; }
.legend .pts { font-size: 11px; }
.legend .pts.up { color: var(--good); }
.legend .pts.down { color: var(--red); }
.legend-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.legend-wide li { align-items: flex-start; }

/* ---------- Ecosystem grid ---------- */
.eco-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.eco-card {
  display: flex; align-items: center; gap: 11px;
  padding: 13px; border-radius: 14px; text-decoration: none;
  background: rgba(20,30,54,0.7); border: 1px solid var(--line);
  transition: transform .14s, border-color .14s, box-shadow .14s;
}
.eco-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--ring-blue); }
.eco-card .ico { width: 32px; height: 32px; flex: 0 0 auto; }
.eco-card .nm { font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; color: var(--white); display: block; }
.eco-card .dsc { font-size: 10.5px; color: var(--mute-dim); }

/* ---------- Leaderboard ---------- */
.board { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.board li {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 11px;
  background: rgba(20,30,54,0.55); border: 1px solid var(--line);
}
.board li .rank { font-family: var(--font-display); color: var(--mute-dim); font-size: 14px; }
.board li .who { font-family: var(--font-arcade); font-size: 14px; letter-spacing: 1px; color: var(--white); }
.board li .meta { font-size: 10px; color: var(--mute-dim); }
.board li .sc { font-family: var(--font-arcade); font-size: 13px; color: var(--gold-bright); }
.board li:nth-child(1) { border-color: var(--gold); box-shadow: var(--ring-gold); }
.board li:nth-child(1) .rank { color: var(--gold-bright); }
.board li:nth-child(2) { border-color: rgba(180,200,230,0.4); }
.board li:nth-child(3) { border-color: rgba(205,127,50,0.5); }
.board-empty { font-size: 13px; color: var(--mute); text-align: center; padding: 24px 0; line-height: 1.5; }
.board-status { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; text-align: center; margin: 0 0 12px; font-weight: 600; }
.board-status.verified { color: var(--cyan); }
.board-status.offline { color: var(--gold); }

/* ---------- Settings ---------- */
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.setting-row.column { flex-direction: column; align-items: stretch; }
.setting-row h3 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 3px; }
.setting-row p { font-size: 11.5px; color: var(--mute-dim); }
.toggle {
  width: 54px; height: 30px; border-radius: 16px;
  background: rgba(10,16,32,0.9); border: 1px solid var(--line);
  position: relative; transition: background .2s, border-color .2s; flex: 0 0 auto;
}
.toggle span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--mute); transition: transform .2s, background .2s; }
.toggle[aria-checked="true"] { background: rgba(30,143,255,0.3); border-color: var(--blue); }
.toggle[aria-checked="true"] span { transform: translateX(24px); background: var(--blue-bright); }
.char-select { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.char-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: center;
  background: rgba(20,30,54,0.55); transition: border-color .15s, box-shadow .15s, opacity .15s; position: relative;
}
.char-card .ico { width: 64px; height: 64px; margin: 0 auto 8px; object-fit: contain; }
.char-card .nm { font-family: var(--font-display); font-size: 12px; letter-spacing: 1px; }
.char-card .st { font-size: 10px; color: var(--mute-dim); margin-top: 3px; }
.char-card.selected { border-color: var(--gold); box-shadow: var(--ring-gold); }
.char-card.locked { opacity: .5; cursor: not-allowed; }
.char-card.locked .st { color: var(--red); }

/* =================================================================
   RESULT CARDS
   ================================================================= */
.result-card {
  width: 100%; max-width: 400px; text-align: center;
  background: linear-gradient(180deg, rgba(18,27,49,0.97), rgba(9,14,30,0.98));
  border: 1px solid var(--line); border-radius: 22px;
  padding: 44px 26px 28px; position: relative;
  box-shadow: var(--shadow);
  animation: cardIn .45s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(20px) scale(.94); } to { opacity: 1; } }
.result-card.adv { border-color: var(--cyan); }
.result-card.fail { border-color: var(--red-deep); }
.result-card.win { border-color: var(--gold); box-shadow: var(--ring-gold), var(--shadow); }
.ribbon {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-size: 13px; letter-spacing: 2px;
  padding: 9px 22px; border-radius: 11px; white-space: nowrap;
  background: linear-gradient(180deg, var(--blue), #11477f);
  box-shadow: var(--ring-blue); color: var(--white);
}
.ribbon.danger { background: linear-gradient(180deg, var(--red), var(--red-deep)); box-shadow: 0 0 0 1px var(--red), 0 0 22px rgba(255,59,81,.4); }
.ribbon.gold { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: #2a1c00; box-shadow: var(--ring-gold); }

.result-emblem { width: 92px; height: 92px; margin: 6px auto 14px; background: center/contain no-repeat; }
.result-emblem.eagle-win { width: 120px; height: 120px; animation: hover 3.5s ease-in-out infinite; }
.result-card h2 { font-family: var(--font-display); font-size: 23px; letter-spacing: 2px; color: var(--white); margin-bottom: 6px; }
.win-title { font-size: 26px !important; line-height: 1.1; }
.win-title span { color: var(--gold-bright); }
.result-line { font-size: 13px; color: var(--mute); line-height: 1.5; margin-bottom: 18px; }
.result-line strong { color: var(--gold-bright); font-family: var(--font-arcade); font-size: 13px; }

.result-stats { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.result-stats li { display: flex; justify-content: space-between; align-items: center; padding: 9px 14px; border-radius: 10px; background: rgba(10,16,32,0.6); border: 1px solid var(--line); }
.result-stats li span { font-size: 11px; letter-spacing: 1.5px; color: var(--mute); }
.result-stats li strong { font-family: var(--font-arcade); font-size: 13px; color: var(--white); }
.result-stats.big li strong { color: var(--gold-bright); font-size: 15px; }

.reward { margin-bottom: 18px; font-size: 13px; font-weight: 700; color: var(--good); letter-spacing: 1px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.reward .heart { width: 18px; height: 18px; }
.reward.perfect { color: var(--gold-bright); }

.result-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Twitter username ---------- */
.twitter-input {
  display: flex; align-items: center; max-width: 340px; margin: 8px auto 22px;
  background: rgba(10,16,32,0.8); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden;
}
.twitter-prefix {
  flex: 0 0 auto; padding: 0 0 0 16px;
  font-family: var(--font-arcade); font-size: 18px; color: var(--gold-bright);
  user-select: none; pointer-events: none;
}
.twitter-input input {
  min-width: 0; width: 100%; height: 58px; padding: 0 14px 0 8px;
  font-family: var(--font-body); font-size: 20px; font-weight: 800; color: var(--gold-bright);
  background: transparent; border: 0; caret-color: var(--cyan);
}
.twitter-input input::placeholder { color: rgba(245, 247, 255, 0.35); }
.twitter-input:focus-within { border-color: var(--gold); box-shadow: var(--ring-gold); }
.twitter-input input:focus { outline: none; }

/* ---------- Orientation warning ---------- */
.orient-warn {
  position: fixed; inset: 0; z-index: 90; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--bg-void); padding: 30px; text-align: center;
}
.orient-warn p { font-size: 15px; color: var(--mute); max-width: 280px; line-height: 1.5; }
.orient-warn strong { color: var(--gold-bright); }
@media (max-height: 430px) and (orientation: landscape) {
  .orient-warn[hidden] { display: flex; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
