/* Sumo Push — mobile-first neon dojo */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #0b0e1a;
  color: #e8ecff;
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#gameCanvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  display: block; touch-action: none;
}

/* ── HUD ─────────────────────────────────────────────────────────── */
#hud { position: fixed; inset: 0; pointer-events: none; }
.hud-top {
  position: absolute; top: calc(10px + env(safe-area-inset-top));
  left: 10px; right: 10px;
  display: flex; justify-content: space-between; gap: 8px;
}
.hud-panel {
  background: rgba(13, 18, 38, .82); border: 1px solid #2a3560;
  border-radius: 12px; padding: 6px 14px; min-width: 96px;
}
.tr-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7f8ec9; }
.tr-value { font-size: 22px; font-weight: 800; color: #ffd75e; line-height: 1.1; }
.tr-sub { font-size: 11px; color: #93a2dd; }

#dashBtn {
  position: absolute; right: calc(18px + env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 92px; height: 92px; border-radius: 50%;
  border: 3px solid #ffcf4d; background: rgba(255, 190, 60, .16);
  color: #ffe089; font-size: 15px; font-weight: 900; letter-spacing: .08em;
  pointer-events: auto; touch-action: manipulation;
}
#dashBtn:active { background: rgba(255, 190, 60, .4); }
#dashBtn.on-cd { opacity: .35; }
.dash-cd {
  position: absolute; right: calc(18px + env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 92px; text-align: center; margin-top: -30px;
  font-size: 11px; color: #93a2dd; pointer-events: none;
}

/* floating joystick */
#stick {
  position: fixed; width: 120px; height: 120px; border-radius: 50%;
  border: 2px solid rgba(140, 160, 255, .5);
  background: rgba(20, 26, 52, .35); pointer-events: none; z-index: 5;
}
#stickKnob {
  position: absolute; left: 50%; top: 50%; width: 48px; height: 48px;
  border-radius: 50%; transform: translate(-50%, -50%);
  background: rgba(150, 170, 255, .55);
}

/* ── overlays / lobby card ───────────────────────────────────────── */
#lobbyOverlay {
  position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; z-index: 10; overflow-y: auto;
  background: radial-gradient(1200px 700px at 50% 30%, #17203f 0%, #0b0e1a 70%);
}
.card {
  width: min(430px, 94vw); padding: 22px 22px 14px;
  background: rgba(15, 20, 42, .92); border: 1px solid #2a3560;
  border-radius: 16px; box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  text-align: center;
}
.neon-title {
  margin: 4px 0 6px; font-size: clamp(28px, 7vw, 40px); font-weight: 900;
  letter-spacing: .06em; color: #ffd75e;
  text-shadow: 0 0 18px rgba(255, 190, 60, .45);
}
.tagline { margin: 0 0 14px; color: #aab6e8; font-size: 14px; }
.instructions {
  margin: 14px 0 4px; font-size: 12.5px; color: #8fa0da;
  display: grid; gap: 4px;
}
.muted { color: #7f8ec9; }

input#nameInput {
  width: 100%; padding: 11px 14px; border-radius: 10px; font-size: 15px;
  border: 1px solid #33407c; background: #101632; color: #e8ecff;
  outline: none; margin-bottom: 10px;
}

button.primary {
  width: 100%; padding: 12px; border: 0; border-radius: 10px;
  font-size: 16px; font-weight: 800; letter-spacing: .04em;
  background: linear-gradient(180deg, #ffd75e, #f0a92e); color: #231a04;
  cursor: pointer;
}
button.primary:active { filter: brightness(.9); }

.squad-count { color: #ffd75e; font-weight: 700; margin-bottom: 8px; }
.player-list { max-height: 130px; overflow-y: auto; margin-bottom: 10px; }
.player-row {
  padding: 4px 8px; border-radius: 8px; background: #131a38;
  margin-bottom: 4px; font-size: 14px;
}
.briefing {
  text-align: left; margin: 10px 0; font-size: 13px; color: #aab6e8;
}
.briefing ul { margin: 6px 0 0 18px; padding: 0; }

.leaderboard {
  text-align: left; margin-top: 12px; padding: 10px 12px;
  background: #101632; border-radius: 10px; border: 1px solid #232d58;
}
.leaderboard h3 { margin: 0 0 6px; font-size: 13px; color: #ffd75e; }
.lb-row {
  display: flex; justify-content: space-between; font-size: 12.5px;
  padding: 2px 0; color: #c6cffa;
}

.load-bar {
  height: 10px; border-radius: 6px; background: #101632; overflow: hidden;
  border: 1px solid #232d58; margin: 12px 0 6px;
}
#loadBar { height: 100%; width: 100%; background: #f0a92e; transition: width .2s; }
.peers { min-height: 16px; font-size: 12px; }

.countdown {
  font-size: 84px; font-weight: 900; color: #ffd75e;
  text-shadow: 0 0 30px rgba(255, 190, 60, .6);
}

.back-link { display: inline-block; margin-top: 12px; color: #7f8ec9; font-size: 13px; }
.spectator-flag {
  position: fixed; top: calc(64px + env(safe-area-inset-top)); left: 50%;
  transform: translateX(-50%); z-index: 9; padding: 4px 12px;
  background: rgba(13, 18, 38, .85); border: 1px solid #2a3560;
  border-radius: 999px; font-size: 12px; letter-spacing: .1em; color: #9fb0f0;
}

/* audio strip repositioned by relocateAudioControls() into #hudAudio.
   #hudAudio is pinned to the bottom so the strip never covers the ring. */
#hudAudio {
  position: absolute; left: 0; right: 0;
  bottom: calc(4px + env(safe-area-inset-bottom));
}
.audio-controls {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  justify-content: center; padding: 4px 0;
}
.audio-controls button {
  background: #16203f; color: #c6cffa; border: 1px solid #2a3560;
  border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.audio-controls input[type="range"] { width: 86px; accent-color: #f0a92e; }
/* web/style.css pins .volume-slider position:fixed top:12px — undo it here
   or every slider lands in the corner of the screen (CLAUDE.md item 5). */
.volume-slider { position: static !important; top: auto !important; }

/* ── results: the 8-column stats table is wider than the lobby card ──
   widen the card while results show; the table scrolls inside its own
   box instead of spilling out (tron pattern) */
.card.results-wide { width: min(720px, 96vw); }
#resultTable {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #ffd75e rgba(255, 255, 255, .12);
}
#resultTable::-webkit-scrollbar { height: 6px; }
#resultTable::-webkit-scrollbar-track { background: rgba(255, 215, 94, .12); border-radius: 3px; }
#resultTable::-webkit-scrollbar-thumb { background: rgba(255, 215, 94, .6); border-radius: 3px; }
#resultTable .fs-table { width: max-content; min-width: 100%; font-size: .86rem; }
#resultTable .fs-table th, #resultTable .fs-table td { padding: 6px 9px; }
@media (max-width: 560px) {
  #resultTable .fs-table { font-size: .78rem; }
}
