/* Block Battle — deep-space glass */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #05060f;
  color: #e6ecff;
  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(10, 14, 32, .72); border: 1px solid rgba(120, 150, 255, .22);
  border-radius: 12px; padding: 6px 14px; min-width: 96px;
  backdrop-filter: blur(6px);
}
.tr-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7f8ec9; }
.tr-value { font-size: 22px; font-weight: 800; color: #7ee8ff; line-height: 1.1;
  text-shadow: 0 0 12px rgba(126, 232, 255, .5); }
.tr-sub { font-size: 11px; color: #93a2dd; }

/* touch pads */
#touchPad { position: absolute; left: 0; right: 0;
  bottom: calc(52px + env(safe-area-inset-bottom)); pointer-events: none;
  display: flex; justify-content: space-between; padding: 0 10px; }
.pad-left, .pad-right { display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  pointer-events: auto; }
.pad-right { grid-template-columns: 1fr 1fr 1fr; }
.pad {
  min-width: 58px; height: 58px; border-radius: 14px;
  border: 1px solid rgba(126, 232, 255, .45);
  background: rgba(20, 30, 70, .55); color: #dbe8ff; font-size: 18px;
  font-weight: 800; touch-action: manipulation; backdrop-filter: blur(4px);
}
.pad:active { background: rgba(126, 232, 255, .35); }
.pad-wide { grid-column: span 2; font-size: 14px; }
.pad-right .pad-wide { grid-column: span 3; }
.pad-hard { border-color: #ffb347; color: #ffe0a3; }

/* ── 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%, rgba(30, 40, 90, .55) 0%, rgba(5, 6, 15, .85) 70%);
}
.card {
  width: min(460px, 94vw); padding: 22px 22px 14px;
  background: rgba(12, 16, 36, .88); border: 1px solid rgba(120, 150, 255, .22);
  border-radius: 18px; box-shadow: 0 12px 48px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  text-align: center; backdrop-filter: blur(10px);
}
.neon-title {
  margin: 4px 0 6px; font-size: clamp(30px, 7vw, 44px); font-weight: 900;
  letter-spacing: .08em; color: #7ee8ff;
  text-shadow: 0 0 22px rgba(126, 232, 255, .55), 0 0 2px #fff;
}
.neon-title span { color: #ff6ec7; text-shadow: 0 0 22px rgba(255, 110, 199, .6), 0 0 2px #fff; margin-left: .25em; }
.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: #0d1230; 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, #8ff0ff, #38b6d8); color: #04121c;
  cursor: pointer; box-shadow: 0 6px 22px rgba(126, 232, 255, .25);
}
button.primary:active { filter: brightness(.9); }

.squad-count { color: #7ee8ff; 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: #111838;
  margin-bottom: 4px; font-size: 14px;
}

.settings { text-align: left; margin: 6px 0 10px; padding: 8px 10px;
  background: #0d1230; border: 1px solid #232d58; border-radius: 10px; }
.settings-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.settings-label { width: 44px; font-size: 12px; color: #7f8ec9; letter-spacing: .08em;
  text-transform: uppercase; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button {
  background: #161f45; color: #b8c4f5; border: 1px solid #2a3560;
  border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.seg button.on { background: #7ee8ff; color: #04121c; border-color: #7ee8ff; font-weight: 700; }
.settings.locked .seg button { opacity: .55; pointer-events: none; }
.settings.locked .seg button.on { opacity: 1; }
.mode-hint { margin: 4px 0 0; font-size: 12px; color: #8fa0da; }

.briefing { text-align: left; margin: 10px 0; font-size: 13px; color: #aab6e8; }
.briefing ul { margin: 6px 0 0 18px; padding: 0; }
.handling { display: grid; gap: 6px; margin-top: 6px; font-size: 12px; }
.handling label { display: flex; align-items: center; gap: 8px; }
.handling input[type="range"] { flex: 1; accent-color: #7ee8ff; }

.leaderboard {
  text-align: left; margin-top: 12px; padding: 10px 12px;
  background: #0d1230; border-radius: 10px; border: 1px solid #232d58;
}
.lb-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.lb-tabs button { background: transparent; color: #7f8ec9; border: 0; padding: 2px 8px;
  font-size: 12.5px; cursor: pointer; border-radius: 6px; }
.lb-tabs button.on { color: #7ee8ff; background: rgba(126, 232, 255, .12); }
.lb-row {
  display: flex; justify-content: space-between; font-size: 12.5px;
  padding: 2px 0; color: #c6cffa;
}
.lb-row span:first-child { display: flex; gap: 6px; }
.lb-rank { color: #7f8ec9; width: 18px; }

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

.countdown {
  font-size: 84px; font-weight: 900; color: #7ee8ff;
  text-shadow: 0 0 30px rgba(126, 232, 255, .6);
}

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

/* audio strip pinned to the bottom of the HUD */
#hudAudio {
  position: absolute; left: 0; right: 0;
  bottom: calc(4px + env(safe-area-inset-bottom));
  transform: none;
}
.audio-controls {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  justify-content: center; padding: 4px 0;
}
.audio-controls button {
  background: #121a3d; 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: #7ee8ff; }
/* web/style.css pins .volume-slider position:fixed top:12px — undo it (CLAUDE.md item 5). */
.volume-slider { position: static !important; top: auto !important; }

/* results: the wide stats table */
.card.results-wide { width: min(760px, 96vw); }
#resultTable { overflow-x: auto; scrollbar-width: thin;
  scrollbar-color: #7ee8ff rgba(255, 255, 255, .12); }
#resultTable::-webkit-scrollbar { height: 6px; }
#resultTable::-webkit-scrollbar-thumb { background: rgba(126, 232, 255, .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; }
  .pad { min-width: 50px; height: 50px; font-size: 16px; }
}
