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

:root {
  --fg: #cfe6ff;
  --dim: #7a93b3;
  --accent: #4fc3f7;
  --danger: #ff5c7a;
  --panel: rgba(8, 14, 26, 0.82);
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #05070d;
  color: var(--fg);
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

#game { position: fixed; inset: 0; display: block; cursor: crosshair; }
.hidden { display: none !important; }

#hud { position: fixed; inset: 0; pointer-events: none; }

#topbar {
  position: absolute; top: 12px; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 18px; font-size: 14px;
}
#players-online { color: var(--dim); }
#timer { font-size: 22px; font-weight: 600; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
#storm-warning {
  position: absolute; top: 46px; left: 50%; transform: translateX(-50%);
  color: var(--danger); font-weight: 700; letter-spacing: 3px; font-size: 13px;
  animation: blink 0.8s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }

#leaderboard {
  position: absolute; top: 54px; right: 18px;
  background: var(--panel); border: 1px solid rgba(79, 195, 247, 0.25);
  border-radius: 8px; padding: 8px 12px; min-width: 190px;
  font-size: 12px; line-height: 1.7;
}
#leaderboard h3 { font-size: 11px; color: var(--dim); letter-spacing: 2px; margin-bottom: 2px; }
#leaderboard .row { display: flex; justify-content: space-between; gap: 12px; }
#leaderboard .row.me { color: var(--accent); font-weight: 600; }

#bottombar {
  position: absolute; bottom: 16px; left: 18px;
  display: flex; align-items: center; gap: 14px;
}
#energy-wrap {
  width: 220px; height: 14px; border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(79, 195, 247, 0.35); overflow: hidden;
}
#energy-bar {
  height: 100%; width: 30%;
  background: linear-gradient(90deg, #4fc3f7, #81f7d8);
  transition: width 0.15s linear;
}
#energy-wrap.low #energy-bar { background: linear-gradient(90deg, #ff8a65, #ff5c7a); }
#energy-wrap.shake { animation: bar-shake 0.3s linear; }
@keyframes bar-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}
#score { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

#killfeed {
  position: absolute; top: 54px; left: 18px;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; color: var(--dim);
  max-width: 260px;
}
#killfeed .kill-row {
  background: var(--panel); border-radius: 5px;
  padding: 3px 9px; opacity: 0.9;
  animation: killfeed-in 0.2s ease-out;
}
#killfeed .kill-row.mine { color: var(--danger); font-weight: 600; }
@keyframes killfeed-in { from { transform: translateX(-12px); opacity: 0; } }

#boost-btn {
  position: absolute; bottom: 70px; right: 24px;
  width: 92px; height: 92px; border-radius: 50%;
  background: rgba(255, 193, 77, 0.18); border: 2px solid #ffc14d; color: #ffc14d;
  font-size: 15px; font-weight: 700; letter-spacing: 1px;
  pointer-events: auto;
}

.overlay {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(ellipse at center, rgba(10, 18, 34, 0.88), rgba(3, 5, 10, 0.96));
  text-align: center; z-index: 10;
}
.overlay h1 { font-size: 56px; letter-spacing: 6px; font-weight: 800; }
.overlay h1 span { color: var(--accent); }
.overlay h2 { font-size: 30px; letter-spacing: 3px; }
.tagline { color: var(--dim); margin-bottom: 10px; }
.subline {
  color: var(--accent); font-size: 14px; letter-spacing: 0.5px;
  margin-top: -6px; margin-bottom: 14px;
}

.overlay button {
  pointer-events: auto; cursor: pointer;
  background: var(--accent); color: #04121f; border: none;
  font-size: 17px; font-weight: 700; letter-spacing: 3px;
  padding: 13px 46px; border-radius: 6px;
}
.overlay button:hover { filter: brightness(1.15); }

#name-input {
  pointer-events: auto; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(79, 195, 247, 0.4); border-radius: 6px;
  color: var(--fg); font-size: 16px; padding: 11px 16px; text-align: center;
  outline: none; width: 240px;
}

.hints { color: var(--dim); font-size: 13px; line-height: 1.9; margin-top: 16px; }
.hints b { color: var(--fg); }

#death-by { color: var(--dim); font-size: 15px; }
#death-stats { display: flex; gap: 34px; font-variant-numeric: tabular-nums; }
#death-stats div { display: flex; flex-direction: column; gap: 2px; }
#death-stats .v { font-size: 26px; font-weight: 700; }
#death-stats .l { font-size: 11px; color: var(--dim); letter-spacing: 2px; }

#final-board { font-size: 14px; line-height: 1.9; min-width: 260px; }
#final-board .row { display: flex; justify-content: space-between; gap: 18px; }
#next-match { color: var(--dim); }

.mobile-only { display: none; }
@media (pointer: coarse) {
  .mobile-only { display: block; }
  #energy-wrap { width: 140px; }
  .overlay h1 { font-size: 40px; }
}

/* Crawlable/accessibility content: real text without cluttering the game view. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.menu-links {
  margin-top: 14px; font-size: 13px; letter-spacing: 0.5px;
  display: flex; gap: 10px; align-items: center;
}
.menu-links a { color: var(--accent); text-decoration: none; }
.menu-links a:hover { text-decoration: underline; }
.menu-links span { color: var(--dim); }

noscript { display: block; text-align: center; padding: 20px; color: var(--fg); }
noscript a { color: var(--accent); }
