html, body {
  background: #0b0d10;
}

.game-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

.game-card {
  background: var(--card, #11151b);
  border: 1px solid var(--border, #243041);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.game-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.game-head h1 {
  margin: 0;
}

.game-head p {
  color: #a4b0c2;
  margin: 4px 0 0;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

.hud div {
  background: #0e1217;
  border: 1px solid #243041;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
}

.hud span {
  display: block;
  color: #a4b0c2;
  font-size: 12px;
}

.hud strong {
  display: block;
  font-size: 22px;
}

.board-wrap {
  position: relative;
}

#game {
  display: block;
  width: 100%;
  height: auto;
  background:
    radial-gradient(circle at 20% 20%, rgba(56,189,248,.08), transparent 25%),
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
    #070a0f;
  background-size: auto, 32px 32px, 32px 32px;
  border: 1px solid #2b3a50;
  border-radius: 14px;
}

.leaderboard {
  background: #0e1217;
  border: 1px solid #243041;
  border-radius: 14px;
  padding: 10px;
  margin-top: 12px;
}

.leaderboard-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.leaderboard-head h2 {
  margin: 0;
  font-size: 15px;
}

.leaderboard-head a {
  font-size: 12px;
  color: #38bdf8;
  text-decoration: none;
}

.leaderboard-sub {
  color: #a4b0c2;
  font-size: 11px;
  margin: 8px 0 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.leaderboard ol {
  margin: 0;
  padding-left: 22px;
  color: #a4b0c2;
}

.leaderboard li {
  margin: 2px 0;
  font-size: 13px;
}

.leaderboard strong {
  color: #e8eef6;
}

.today-champion {
  text-align: center;
  padding: 8px 10px;
  border: 1px solid #243041;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.06);
}

.today-champion .initials {
  font-size: 22px;
  font-weight: 800;
  color: #38bdf8;
}

.today-champion .score {
  font-size: 16px;
  margin-top: 2px;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  background: rgba(7,10,15,.72);
  border-radius: 14px;
  color: #e8eef6;
}

.overlay.hidden {
  display: none;
}

.overlay strong {
  font-size: 30px;
}

.overlay span {
  color: #a4b0c2;
  margin-top: 8px;
}

.controls {
  text-align: center;
  color: #a4b0c2;
  font-size: 13px;
  margin-top: 10px;
}

kbd {
  background: #1d2633;
  border: 1px solid #33445c;
  border-radius: 6px;
  padding: 1px 6px;
  color: #e8eef6;
}

.mobile-controls {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.mobile-controls button {
  background: #1d2633;
  border: 1px solid #33445c;
  color: #e8eef6;
  border-radius: 12px;
  padding: 14px 8px;
  font-weight: 800;
  font-size: 16px;
}

.mobile-controls button[data-control="start"],
.mobile-controls button[data-control="pause"] {
  grid-column: span 3;
}

@media (max-width: 760px) {
  .game-shell {
    padding: 10px;
  }

  .game-head {
    flex-direction: column;
  }

  .hud {
    gap: 6px;
  }

  .hud div {
    padding: 8px;
  }

  .hud strong {
    font-size: 18px;
  }

  .mobile-controls {
    display: grid;
    position: sticky;
    bottom: 8px;
    z-index: 20;
  }

  .controls {
    display: none;
  }
}
