/* Skyfall — night raid over six cities */

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: #05060f;
  color: #eef1ff;
  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; cursor: crosshair;
}

/* ── HUD ─────────────────────────────────────────────────────────── */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.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: linear-gradient(180deg, rgba(14, 12, 34, .78), rgba(8, 7, 22, .72));
  border: 1px solid rgba(255, 170, 110, .2);
  border-radius: 14px; padding: 8px 14px; min-width: 110px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.hud-wave { text-align: right; }
.tr-label { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: #c99b7c; }
.tr-value { font-size: 26px; font-weight: 900; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tr-sub { font-size: 11px; color: #b3a1c9; margin-top: 2px; }

.hud-crew {
  position: absolute; top: calc(92px + env(safe-area-inset-top)); left: 10px;
  display: flex; flex-direction: column; gap: 4px; width: 170px;
}
.crew-row {
  display: grid; grid-template-columns: 10px 1fr auto; align-items: center;
  gap: 7px; font-size: 12px; padding: 4px 8px; border-radius: 9px;
  background: rgba(8, 10, 24, .62); color: #e3dcff;
}
.crew-row.me { outline: 1px solid rgba(255, 255, 255, .4); }
.crew-row .crew-dot { width: 8px; height: 8px; border-radius: 50%; }
.crew-row .crew-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-row .crew-kills { font-weight: 700; font-variant-numeric: tabular-nums; }

.hud-banner {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none; opacity: 0;
  transition: opacity .25s;
}
.hud-banner.show { opacity: 1; }
.hud-banner .big {
  font-size: clamp(30px, 8vw, 54px); font-weight: 900; color: #fff;
  letter-spacing: .12em;
  text-shadow: 0 0 30px rgba(255, 120, 60, .7), 0 3px 0 rgba(0, 0, 0, .6);
}
.hud-banner .small { font-size: 15px; color: #f2d9c4; margin-top: 4px; }
.hud-banner .tally { font-size: 14px; color: #e3dcff; margin-top: 10px; line-height: 1.6; }
.hud-banner .tally b { color: #ffd75e; }

.hud-rotate {
  display: none; position: absolute; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom));
  transform: translateX(-50%); padding: 6px 14px; border-radius: 999px;
  background: rgba(8, 10, 24, .8); color: #f2d9c4; font-size: 13px;
  border: 1px solid rgba(255, 150, 90, .25);
}
@media (pointer: coarse) and (orientation: portrait) { .hud-rotate { display: block; } }

/* ── overlays / lobby card ───────────────────────────────────────── */
/* The live sky renders behind the lobby; the overlay only dims it. */
#lobbyOverlay {
  position: fixed; inset: 0; display: flex; align-items: center;
  justify-content: center; z-index: 10; overflow-y: auto;
  background:
    radial-gradient(900px 500px at 50% 110%, rgba(255, 110, 60, .18), transparent 60%),
    linear-gradient(180deg, rgba(3, 4, 12, .55) 0%, rgba(8, 6, 24, .35) 60%, rgba(20, 8, 24, .45) 100%);
}
.card {
  width: min(440px, 94vw); padding: 24px 24px 14px;
  background: linear-gradient(180deg, rgba(14, 12, 34, .82), rgba(8, 7, 22, .88));
  border: 1px solid rgba(255, 170, 110, .22);
  border-radius: 20px; text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .06),
              0 0 0 1px rgba(0, 0, 0, .4);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.neon-title {
  margin: 4px 0 8px; font-size: clamp(34px, 8vw, 52px); font-weight: 900;
  letter-spacing: .22em; line-height: 1;
  background: linear-gradient(180deg, #fff8ec 0%, #ffd9a6 45%, #ff8a4d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 130, 60, .55)) drop-shadow(0 2px 0 rgba(0, 0, 0, .5));
}
.tagline { margin: 0 0 14px; color: #cdb9d9; font-size: 14px; }
.instructions {
  margin: 14px 0 4px; font-size: 12.5px; color: #a48fb8;
  display: grid; gap: 4px;
}
.muted { color: #8f7fa6; }

input#nameInput {
  width: 100%; padding: 12px 14px; border-radius: 12px; font-size: 15px;
  border: 1px solid rgba(255, 170, 110, .22); background: rgba(10, 8, 26, .7); color: #eef1ff;
  outline: none; margin-bottom: 10px; transition: border-color .15s, box-shadow .15s;
}
input#nameInput:focus { border-color: #ffb13d; box-shadow: 0 0 0 3px rgba(255, 177, 61, .18); }

button.primary {
  width: 100%; padding: 13px; border: 0; border-radius: 12px;
  font-size: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffb95a 0%, #ff7a3d 60%, #ff5a3d 100%); color: #2a0e04;
  cursor: pointer; transition: transform .08s, box-shadow .15s;
  box-shadow: 0 8px 26px rgba(255, 110, 60, .38), inset 0 1px 0 rgba(255, 255, 255, .45);
}
button.primary:hover { box-shadow: 0 10px 32px rgba(255, 130, 70, .5), inset 0 1px 0 rgba(255, 255, 255, .45); }
button.primary:active { transform: translateY(1px); filter: brightness(.92); }

.squad-count { color: #ffb13d; font-weight: 700; margin-bottom: 8px; }
.player-list { max-height: 130px; overflow-y: auto; margin-bottom: 10px; }
.player-row {
  padding: 6px 10px; border-radius: 9px; background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .06);
  margin-bottom: 4px; font-size: 14px;
}
.briefing {
  text-align: left; margin: 10px 0; font-size: 13px; color: #cdb9d9;
}
.briefing ul { margin: 6px 0 0 18px; padding: 0; }

.leaderboard {
  text-align: left; margin-top: 12px; padding: 10px 12px;
  background: rgba(255, 255, 255, .04); border-radius: 12px; border: 1px solid rgba(255, 255, 255, .07);
}
.leaderboard h3 { margin: 0 0 6px; font-size: 13px; color: #ffb13d; }
.lb-row {
  display: flex; justify-content: space-between; font-size: 12.5px;
  padding: 2px 0; color: #dccbe8;
}

.load-bar {
  height: 10px; border-radius: 6px; background: #150f2a; overflow: hidden;
  border: 1px solid #2f2350; margin: 12px 0 6px;
}
#loadBar { height: 100%; width: 100%; background: linear-gradient(90deg, #ff6a3d, #ffb13d); transition: width .2s; }
.peers { min-height: 16px; font-size: 12px; }

.countdown {
  font-size: 84px; font-weight: 900; color: #fff;
  text-shadow: 0 0 30px rgba(255, 120, 60, .7);
}

.back-link { display: inline-block; margin-top: 12px; color: #8f7fa6; 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(8, 10, 24, .85); border: 1px solid #2f2350;
  border-radius: 999px; font-size: 12px; letter-spacing: .1em; color: #cdb9d9;
}

/* audio strip in the HUD: pinned bottom-centre. */
#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: #1a1433; color: #dccbe8; border: 1px solid #2f2350;
  border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer;
}
.audio-controls input[type="range"] { width: 86px; accent-color: #ff8a3d; }
/* 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 ─────────────────────────────────────────────────────── */
.card.results-wide { width: min(720px, 96vw); }
#resultTable {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #ffb13d rgba(255, 255, 255, .12);
}
#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; }
  .hud-crew { width: 130px; }
}
