:root {
  --bg: #0d1013;
  --hud-bg: rgba(10, 12, 16, 0.72);
  --hud-border: rgba(255, 255, 255, 0.08);
  --accent: #ff3d2e;
  --accent-2: #16f5c7;
  --text: #f5f0e6;
  --muted: rgba(245, 240, 230, 0.6);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, #1a222b, var(--bg));
  font-family: var(--font-display, 'Bebas Neue', 'Oswald', 'Impact', 'Haettenschweiler', 'Arial Narrow', sans-serif);
  color: var(--text);
  letter-spacing: 0.6px;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  background: transparent;
}

#hud {
  position: fixed;
  top: 24px;
  left: 24px;
  padding: 16px 18px;
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: 14px;
  min-width: 260px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

#hud .title {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

#hud .title img {
  height: clamp(56px, 6vw, 92px);
  width: auto;
  display: block;
  filter: drop-shadow(0 0 14px rgba(255, 61, 46, 0.45));
}

#hud .subtitle {
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 1.4px;
}

#map-lottery {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 15% 10%, rgba(30, 40, 54, 0.75), rgba(4, 6, 10, 0.96));
  z-index: 30;
}

#map-lottery.active {
  display: flex;
}

.map-lottery-shell {
  width: min(720px, 86vw);
  padding: 32px 34px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(140deg, rgba(12, 16, 22, 0.92), rgba(10, 18, 24, 0.86));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.map-lottery-title {
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-2);
  text-shadow: 0 0 18px rgba(22, 245, 199, 0.35);
}

.map-lottery-subtitle {
  margin-top: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.map-lottery-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.map-lottery-item {
  font-size: 24px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(6, 9, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(245, 240, 230, 0.65);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.map-lottery-item.active {
  color: #ffffff;
  border-color: rgba(255, 211, 106, 0.7);
  box-shadow: 0 0 18px rgba(255, 211, 106, 0.45);
  transform: translateY(-2px);
}

.map-lottery-item.selected {
  color: var(--accent-2);
  border-color: rgba(22, 245, 199, 0.75);
  box-shadow: 0 0 22px rgba(22, 245, 199, 0.5);
  transform: translateY(-4px) scale(1.01);
}

#hud .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  font-size: 18px;
}

#hud.race .row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#hud.entry-countdown .row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#phase {
  font-size: 20px;
  letter-spacing: 1.3px;
}

#phase.raffle {
  font-size: 24px;
  color: var(--accent-2);
  text-shadow: 0 0 14px rgba(22, 245, 199, 0.45);
}

#hud .label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}

#hud .positions {
  margin-top: 12px;
}

#positions {
  font-size: 18px;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#positions .player {
  color: var(--accent-2);
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

#positions .player:hover {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(22, 245, 199, 0.4);
}

#positions .player:focus-visible {
  outline: 1px solid rgba(22, 245, 199, 0.7);
  outline-offset: 2px;
}

#positions .player.copied {
  color: var(--accent);
}

#positions .player:disabled {
  color: var(--muted);
  cursor: default;
  text-shadow: none;
}

#help {
  position: fixed;
  left: 24px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(9, 11, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 15px;
  color: var(--muted);
  max-width: min(540px, 80vw);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

#help div+div {
  margin-top: 6px;
  color: rgba(245, 240, 230, 0.45);
}

#side-panel {
  position: fixed;
  top: 24px;
  right: 24px;
  width: min(340px, 32vw);
  display: grid;
  gap: 12px;
  z-index: 10;
  pointer-events: none;
}

.menu-banner {
  display: none;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(22, 245, 199, 0.45);
  background: rgba(9, 12, 18, 0.72);
  font-size: 20px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--accent-2);
  text-align: center;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.menu-banner.show {
  display: block;
}

#trade-log {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
  gap: 4px;
  font-size: 12px;
}

.trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(9, 12, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.trade-row span:last-child {
  color: var(--muted);
  white-space: nowrap;
}

.trade-row.sold {
  border-color: rgba(255, 61, 46, 0.7);
  background: rgba(60, 14, 12, 0.55);
  color: #ffd6cf;
  animation: sold-flash 900ms ease-out;
}

.trade-row.sold span:last-child {
  color: #ff3d2e;
}

@keyframes sold-flash {
  0% {
    box-shadow: 0 0 0 rgba(255, 61, 46, 0);
  }

  40% {
    box-shadow: 0 0 18px rgba(255, 61, 46, 0.45);
  }

  100% {
    box-shadow: 0 0 0 rgba(255, 61, 46, 0);
  }
}

.panel {
  padding: 14px 16px;
  background: var(--hud-bg);
  border: 1px solid var(--hud-border);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.panel-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
}

.panel-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text);
}

.panel-list {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.ca-panel {
  padding: 10px 12px;
}

.ca-text {
  font-family: var(--font-body, 'Rajdhani', 'Segoe UI', 'Helvetica', sans-serif);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  word-break: break-all;
}

#entry-list {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}

.list-row {
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(9, 12, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.list-row.stagger {
  opacity: 0;
  transform: translateY(6px);
  animation: list-stagger-in 160ms ease-out forwards;
}

.list-row.in {
  border-color: rgba(22, 245, 199, 0.35);
}

.list-row.out {
  border-color: rgba(255, 61, 46, 0.35);
  color: rgba(245, 240, 230, 0.55);
  text-decoration: line-through;
}

.list-empty {
  padding: 6px 4px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes list-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.trade-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 12, 18, 0.45);
}

.trade-row.buy {
  border-color: rgba(22, 245, 199, 0.45);
  color: rgba(245, 240, 230, 0.95);
}

.trade-row.sell {
  border-color: rgba(255, 61, 46, 0.45);
  color: rgba(245, 240, 230, 0.8);
}

.meta {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  font-size: 13px;
  color: var(--muted);
}

#winner-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 10%, rgba(40, 50, 64, 0.6), rgba(4, 6, 10, 0.94));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 20;
}

#winner-screen.show {
  opacity: 1;
  pointer-events: auto;
}

.podium-screen.show .podium-shell {
  animation: podium-rise 0.35s ease;
}

.podium-shell {
  position: relative;
  width: min(1120px, 94vw);
  padding: 28px 30px 24px;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(12, 16, 22, 0.96), rgba(10, 18, 24, 0.9));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.podium-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(22, 245, 199, 0.16), transparent 55%),
    radial-gradient(circle at 85% 20%, rgba(255, 211, 106, 0.16), transparent 55%);
  pointer-events: none;
}

.podium-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.podium-title {
  font-size: 34px;
  letter-spacing: 3px;
  color: var(--accent-2);
  text-shadow: 0 0 18px rgba(22, 245, 199, 0.35);
}

.podium-sub {
  margin-top: 6px;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 1.4px;
}

.podium-split {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 211, 106, 0.4);
  background: rgba(12, 16, 22, 0.7);
  color: #ffe279;
  font-size: 14px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.podium-body {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 20px;
}

.podium-winners {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.podium-winner {
  padding: 16px 12px;
  border-radius: 18px;
  background: rgba(9, 12, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.podium-winner.place-1 {
  border-color: rgba(22, 245, 199, 0.6);
  box-shadow: 0 0 24px rgba(22, 245, 199, 0.2);
}

.podium-winner.place-2 {
  border-color: rgba(255, 211, 106, 0.5);
}

.podium-winner.place-3 {
  border-color: rgba(255, 61, 46, 0.4);
}

.podium-rank {
  font-size: 18px;
  color: var(--muted);
}

.podium-car {
  width: 96px;
  height: 140px;
  border-radius: 18px;
  background: rgba(9, 12, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
}

.podium-car-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.podium-wallet {
  font-size: 15px;
  letter-spacing: 1px;
}

.podium-share {
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--accent-2);
}

.podium-participants {
  padding: 16px 16px 12px;
  border-radius: 18px;
  background: rgba(9, 12, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
}

.podium-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.podium-list {
  display: grid;
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 4px;
}

.podium-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 20, 0.55);
  font-size: 13px;
}

.podium-row.finished {
  border-color: rgba(22, 245, 199, 0.4);
}

.podium-row.out {
  color: rgba(245, 240, 230, 0.45);
  text-decoration: line-through;
}

.podium-row .rank {
  color: var(--muted);
  min-width: 42px;
}

.podium-row .status {
  color: var(--accent-2);
  font-size: 12px;
}

.podium-footer {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.podium-reward {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 211, 106, 0.35);
  background: rgba(12, 16, 22, 0.6);
}

.podium-reward-text {
  font-size: 20px;
  font-weight: 700;
  color: #ffe279;
  text-transform: none;
  letter-spacing: 2px;
}

.podium-reward-dots span {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  color: #ffe279;
  text-transform: none;
  animation: podium-dot 1s infinite;
}

.podium-reward-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.podium-reward-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.podium-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.podium-meta {
  color: rgba(245, 240, 230, 0.6);
}

.podium-note {
  text-align: right;
}

@keyframes podium-dot {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@keyframes podium-rise {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0.6;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

#podium-banner {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  opacity: 0;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(22, 245, 199, 0.45);
  background: rgba(9, 12, 18, 0.75);
  font-size: 14px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: all 0.25s ease;
  z-index: 12;
}

#podium-banner.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#raffle-banner {
  position: fixed;
  left: 50%;
  top: 24px;
  transform: translate(-50%, -10px);
  opacity: 0;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid rgba(22, 245, 199, 0.45);
  background: rgba(9, 12, 18, 0.72);
  font-size: 26px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--accent-2);
  text-shadow: 0 0 16px rgba(22, 245, 199, 0.45);
  transition: all 0.25s ease;
  z-index: 13;
  pointer-events: none;
}

#raffle-banner.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#start-countdown {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  opacity: 0;
  pointer-events: none;
  display: grid;
  justify-items: center;
  gap: 6px;
  font-size: clamp(72px, 18vw, 190px);
  letter-spacing: 6px;
  color: #f5f0e6;
  text-shadow: 0 0 24px rgba(255, 211, 106, 0.45), 0 0 80px rgba(22, 245, 199, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 18;
}

#start-countdown::before {
  content: 'RACE STARTS IN';
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

#start-countdown.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

#start-countdown .millis {
  font-size: 0.45em;
  letter-spacing: 2px;
  color: #ffe279;
}

#start-countdown.hype {
  color: #ffe279;
  text-shadow: 0 0 28px rgba(255, 211, 106, 0.85), 0 0 90px rgba(255, 61, 46, 0.35);
  animation: countdown-glow 0.6s ease-in-out infinite;
}

#start-countdown.hype .millis {
  color: #ff3d2e;
}

#start-countdown.final {
  color: #ff3d2e;
  text-shadow: 0 0 32px rgba(255, 61, 46, 0.85), 0 0 120px rgba(255, 61, 46, 0.55);
  animation: countdown-final 0.25s ease-in-out infinite;
}

#lap-display {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -6px);
  opacity: 0;
  pointer-events: none;
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 12, 18, 0.78);
  font-size: clamp(28px, 6vw, 64px);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 16;
}

#lap-display.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#lap-display .lap-label {
  font-size: 0.5em;
  color: var(--muted);
  letter-spacing: 2px;
}

#lap-display .lap-value {
  font-size: 1em;
  color: var(--accent-2);
  text-shadow: 0 0 18px rgba(22, 245, 199, 0.55);
}

#lap-display .lap-total {
  font-size: 0.55em;
  color: rgba(245, 240, 230, 0.75);
}

.winner-callout {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 28px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 12, 18, 0.78);
  font-size: clamp(32px, 6vw, 64px);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 0 26px rgba(22, 245, 199, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 19;
}

.winner-callout.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  animation: winner-pop 0.35s ease;
}

.winner-callout.place-1 {
  border-color: rgba(22, 245, 199, 0.65);
  color: #16f5c7;
  text-shadow: 0 0 28px rgba(22, 245, 199, 0.6);
}

.winner-callout.place-2 {
  border-color: rgba(255, 211, 106, 0.65);
  color: #ffe279;
  text-shadow: 0 0 26px rgba(255, 211, 106, 0.6);
}

.winner-callout.place-3 {
  border-color: rgba(255, 61, 46, 0.55);
  color: #ff3d2e;
  text-shadow: 0 0 26px rgba(255, 61, 46, 0.6);
}

.winner-callout-title {
  font-size: 0.65em;
  letter-spacing: 4px;
  color: rgba(245, 240, 230, 0.6);
}

.winner-callout-wallet {
  font-size: 1em;
  letter-spacing: 2px;
}

@keyframes winner-pop {
  0% {
    transform: translate(-50%, -50%) scale(0.92);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes countdown-glow {
  0% {
    text-shadow: 0 0 18px rgba(255, 211, 106, 0.5), 0 0 60px rgba(255, 61, 46, 0.25);
  }

  100% {
    text-shadow: 0 0 34px rgba(255, 211, 106, 0.9), 0 0 110px rgba(255, 61, 46, 0.45);
  }
}

@keyframes countdown-final {
  0% {
    filter: drop-shadow(0 0 6px rgba(255, 61, 46, 0.35));
  }

  100% {
    filter: drop-shadow(0 0 18px rgba(255, 61, 46, 0.9));
  }
}

@media (max-width: 720px) {
  #hud {
    top: 12px;
    left: 12px;
    min-width: 220px;
  }

  #help {
    left: 12px;
    right: 12px;
    bottom: 12px;
    font-size: 13px;
  }

  #side-panel {
    position: static;
    width: auto;
    padding: 0 12px 80px;
  }

  .panel {
    pointer-events: auto;
  }

  #podium-banner {
    bottom: 18px;
    font-size: 12px;
  }

  .menu-banner {
    font-size: 14px;
    padding: 10px 12px;
  }

  #raffle-banner {
    top: 12px;
    font-size: 18px;
    padding: 10px 16px;
  }

  #start-countdown {
    font-size: clamp(56px, 22vw, 150px);
    letter-spacing: 4px;
  }

  #start-countdown::before {
    font-size: 12px;
    letter-spacing: 2px;
  }

  #start-countdown .millis {
    font-size: 0.5em;
  }

  #lap-display {
    top: 16px;
    font-size: clamp(22px, 8vw, 48px);
    gap: 8px;
    padding: 8px 14px;
  }

  #lap-display .lap-label {
    font-size: 0.55em;
  }

  .winner-callout {
    font-size: clamp(24px, 9vw, 48px);
    padding: 14px 20px;
    border-radius: 18px;
  }

  .winner-callout-title {
    font-size: 0.7em;
  }

  .podium-shell {
    padding: 22px 18px;
  }

  .podium-body {
    grid-template-columns: 1fr;
  }

  .podium-winners {
    grid-template-columns: 1fr;
  }

  .podium-winner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: start;
    text-align: left;
    padding: 14px;
  }

  .podium-car {
    width: 80px;
    height: 120px;
  }

  .podium-footer-meta {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

.game-onboarding {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Remove padding to allow true full screen */
  padding: 0;
}

.game-onboarding__backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(125deg, rgba(4, 7, 12, 0.9), rgba(4, 7, 12, 0.62)),
    radial-gradient(circle at 18% 18%, rgba(22, 245, 199, 0.2), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(255, 61, 46, 0.22), transparent 28%);
  backdrop-filter: blur(18px);
}

.game-onboarding__backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 88%);
}

.game-onboarding__shell {
  position: relative;
  z-index: 1;
  /* Make the shell fill the entire screen */
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr);
  /* Remove rounded corners for full screen feel */
  border-radius: 0;
  overflow: hidden;
  border: none;
  background: #000;
  box-shadow: none;
}

.game-onboarding__sidebar {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  height: 100%;
  min-height: 0;
  padding: 30px 22px 26px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(12, 18, 26, 0.9), rgba(9, 14, 22, 0.82)),
    radial-gradient(circle at top, rgba(22, 245, 199, 0.1), transparent 42%);
}

.game-onboarding__brand {
  display: grid;
  gap: 16px;
}

.game-onboarding__brand img {
  width: clamp(150px, 18vw, 210px);
  max-width: 100%;
  filter: drop-shadow(0 0 16px rgba(22, 245, 199, 0.18));
}

.game-onboarding__eyebrow {
  font-size: 12px;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  color: rgba(22, 245, 199, 0.85);
}

.game-onboarding__subcopy {
  margin-top: 8px;
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 16px;
  line-height: 1.2;
  color: rgba(245, 240, 230, 0.62);
}

.game-onboarding__nav {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.game-onboarding__nav-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.game-onboarding__nav-item strong {
  display: block;
  font-size: 24px;
  letter-spacing: 1.2px;
}

.game-onboarding__nav-item small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 1px;
}

.game-onboarding__nav-item:hover,
.game-onboarding__nav-item:focus-visible,
.game-onboarding__nav-item.is-active {
  border-color: rgba(22, 245, 199, 0.42);
  background: rgba(22, 245, 199, 0.08);
  box-shadow: inset 0 0 0 1px rgba(22, 245, 199, 0.12), 0 18px 26px rgba(0, 0, 0, 0.2);
  transform: translateX(4px);
  outline: none;
}

.game-onboarding__nav-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 240, 230, 0.7);
  font-size: 15px;
  letter-spacing: 2px;
}

.game-onboarding__sidebar-footer {
  display: grid;
  gap: 10px;
}

.game-onboarding__sidebar-footer p {
  margin: 0;
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 15px;
  line-height: 1.05;
  color: rgba(245, 240, 230, 0.58);
}

.game-onboarding__sidebar-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-onboarding__sidebar-hints span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 13px;
  color: rgba(245, 240, 230, 0.64);
}

.game-onboarding__content {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  height: 100%;
  min-height: 0;
  padding: 34px;
}

.game-onboarding__skip {
  position: absolute;
  top: 28px;
  right: 28px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 240, 230, 0.7);
  font: inherit;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
}

.game-onboarding__header {
  max-width: 720px;
  padding-right: 96px;
}

.game-onboarding__header h1 {
  margin: 10px 0 14px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.92;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.game-onboarding__header p {
  margin: 0;
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.15;
  color: rgba(245, 240, 230, 0.72);
}

.game-onboarding__panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.88fr);
  gap: 18px;
  min-height: 0;
}

.game-onboarding__panel {
  min-height: 0;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(12, 16, 22, 0.92), rgba(10, 14, 20, 0.88)),
    radial-gradient(circle at top right, rgba(255, 61, 46, 0.08), transparent 35%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.game-onboarding__panel--media {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 14px;
}

.game-onboarding__media-primary {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-onboarding__media-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 6, 10, 0) 18%, rgba(4, 6, 10, 0.72) 100%);
}

.game-onboarding__media-primary-image {
  object-fit: cover;
}

.game-onboarding__media-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.game-onboarding__media-caption span {
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(22, 245, 199, 0.92);
}

.game-onboarding__media-caption strong {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 0.96;
  text-transform: uppercase;
}

.game-onboarding__media-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.game-onboarding__media-strip figure {
  position: relative;
  margin: 0;
  min-height: 164px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.game-onboarding__media-strip-image {
  object-fit: cover;
}

.game-onboarding__media-strip figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, rgba(4, 6, 10, 0), rgba(4, 6, 10, 0.88));
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 13px;
  letter-spacing: 1px;
  color: rgba(245, 240, 230, 0.7);
  text-transform: uppercase;
}

.game-onboarding__panel--details {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 16px;
  overflow: auto;
}

.game-onboarding__badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-onboarding__badge-row span,
.game-onboarding__split-title {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(22, 245, 199, 0.18);
  background: rgba(22, 245, 199, 0.08);
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 13px;
  letter-spacing: 1.6px;
  color: rgba(22, 245, 199, 0.92);
  text-transform: uppercase;
}

.game-onboarding__stat-grid {
  display: grid;
  gap: 12px;
}

.game-onboarding__stat-grid article,
.game-onboarding__steps article,
.game-onboarding__garage figure,
.game-onboarding__powerups div,
.game-onboarding__split {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.game-onboarding__stat-grid strong,
.game-onboarding__steps span {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  font-size: 30px;
  color: #16f5c7;
}

.game-onboarding__stat-grid span,
.game-onboarding__steps p {
  display: block;
  font-family: var(--font-body, 'Rajdhani', sans-serif);
  font-size: 16px;
  line-height: 1.1;
  color: rgba(245, 240, 230, 0.7);
}

.game-onboarding__steps {
  display: grid;
  gap: 12px;
}

.game-onboarding__steps article strong {
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
  text-transform: uppercase;
}

.game-onboarding__steps article p {
  margin: 0;
}

.game-onboarding__split {
  display: grid;
  gap: 12px;
}

.game-onboarding__split-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.game-onboarding__split-values span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  font-size: clamp(28px, 4vw, 42px);
  color: #ffe279;
}

.game-onboarding__garage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.game-onboarding__garage figure {
  margin: 0;
  text-align: center;
}

.game-onboarding__mission-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.game-onboarding__stat-box {
  background: rgba(22, 245, 199, 0.05);
  border: 1px solid rgba(22, 245, 199, 0.2);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
}

.game-onboarding__stat-box strong {
  display: block;
  font-family: var(--font-display), sans-serif;
  font-size: 48px;
  color: var(--accent-2);
  line-height: 1;
}

.game-onboarding__stat-box span {
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  color: #fff;
  letter-spacing: 2px;
  margin-top: 10px;
  display: block;
}

.game-onboarding__mission-points {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
}

.game-onboarding__hq-panel {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: 20px;
}

.game-onboarding__roadmap strong {
  font-family: var(--font-display), sans-serif;
  font-size: 24px;
  color: #fff;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 20px;
}

.game-onboarding__roadmap ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.game-onboarding__roadmap li {
  font-family: var(--font-body), sans-serif;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 15px;
}

.game-onboarding__roadmap li::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  transform: rotate(45deg);
}

.game-onboarding__socials {
  display: flex;
  gap: 20px;
}

.game-onboarding__socials a {
  flex: 1;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  letter-spacing: 2px;
  transition: all 0.3s ease;
}

.game-onboarding__socials a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.game-onboarding__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 20%, rgba(0, 0, 0, 0.4) 70%, rgba(0, 0, 0, 0.8) 100%);
  pointer-events: none;
  z-index: 1;
}

.game-onboarding__scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%,
      rgba(0, 0, 0, 0.1) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.3;
}

.game-onboarding__hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.game-onboarding__hero-img {
  object-fit: cover;
  filter: brightness(0.7) contrast(1.1);
}

.game-onboarding__main {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  gap: clamp(18px, 3vh, 28px);
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(34px, 6vh, 72px) clamp(44px, 6vw, 90px) clamp(24px, 4vh, 42px);
  overflow: hidden;
}



.game-onboarding__terminal {
  width: min(600px, calc(100vw - 40px));
  max-width: none;
  background:
    linear-gradient(180deg, rgba(7, 11, 15, 0.9), rgba(7, 11, 15, 0.78)),
    radial-gradient(circle at top left, rgba(22, 245, 199, 0.08), transparent 42%);
  backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  padding: 40px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.8),
    inset 0 0 40px rgba(22, 245, 199, 0.05);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-onboarding__terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg,
      rgba(22, 245, 199, 0.58),
      rgba(22, 245, 199, 0.12) 36%,
      rgba(255, 255, 255, 0.08) 64%,
      rgba(255, 61, 46, 0.38));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.9;
}

.game-onboarding__brand-center {
  margin-bottom: 40px;
  text-align: center;
  animation: logo-float 4s ease-in-out infinite;
}

.game-onboarding__brand-center img {
  width: clamp(240px, 34vw, 360px);
  height: auto;
}

@keyframes logo-float {

  0%,
  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 20px rgba(22, 245, 199, 0.2));
  }

  50% {
    transform: translateY(-10px) scale(1.02);
    filter: drop-shadow(0 0 40px rgba(22, 245, 199, 0.4));
  }
}

.game-onboarding__version {
  font-family: var(--font-body, "Rajdhani"), sans-serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--accent-2);
  margin-top: -10px;
  opacity: 0.8;
}

.game-onboarding__minimal-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.game-onboarding__action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 24px;
  border-radius: 12px;
  color: #fff;
  font-family: var(--font-display, "Rajdhani"), sans-serif;
  font-size: 24px;
  letter-spacing: 2px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.game-onboarding__action-indicator {
  color: var(--accent-2);
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.2s ease;
  font-size: 28px;
  line-height: 1;
}

.game-onboarding__action-btn:hover,
.game-onboarding__action-btn.is-active {
  background: rgba(22, 245, 199, 0.1);
  border-color: rgba(22, 245, 199, 0.4);
  transform: translateX(5px);
  box-shadow: 0 0 20px rgba(22, 245, 199, 0.1);
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.game-onboarding__action-btn:hover .game-onboarding__action-indicator,
.game-onboarding__action-btn.is-active .game-onboarding__action-indicator {
  opacity: 1;
  transform: translateX(0);
}

.game-onboarding__action-btn--disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.game-onboarding__coming-soon {
  margin-left: auto;
  font-family: var(--font-body, "Rajdhani"), sans-serif;
  font-size: 10px;
  letter-spacing: 1px;
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 170, 0, 0.3);
  text-transform: uppercase;
}

.game-onboarding__minimal-hint {
  margin-top: 40px;
  display: flex;
  gap: 30px;
  font-family: var(--font-body, "Rajdhani"), sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 2px;
}

.game-onboarding__modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-onboarding__modal {
  background: linear-gradient(180deg, #111, #0a0a0a);
  border: 1px solid rgba(22, 245, 199, 0.4);
  border-radius: 16px;
  width: min(500px, 100%);
  padding: 40px;
  position: relative;
  box-shadow: 0 0 40px rgba(22, 245, 199, 0.1);
}

.game-onboarding__modal h2 {
  font-family: var(--font-display, "Rajdhani"), sans-serif;
  font-size: 32px;
  color: #fff;
  margin: 0 0 24px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.game-onboarding__modal-content {
  font-family: var(--font-body, "Rajdhani"), sans-serif;
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.6;
}

.game-onboarding__modal-content ol {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-onboarding__modal-content li strong {
  color: var(--accent-2);
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.game-onboarding__jupiter-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 20px;
  background: rgba(22, 245, 199, 0.1);
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.game-onboarding__jupiter-btn:hover {
  background: var(--accent-2);
  color: #000;
}

.game-onboarding__code-block {
  display: block;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 4px;
  margin-top: 8px;
  font-family: monospace;
  color: #ffe279;
  word-break: break-all;
}

.game-onboarding__modal-close {
  margin-top: 30px;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.2s;
}

.game-onboarding__modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}