:root {
  --blue: #3aa7ff;
  --gold: #ffd166;
  --pink: #ff5f8f;
  --mint: #58f29f;
  --ink: #080b12;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: #f7fbff;
  background:
    radial-gradient(circle at 18% 16%, rgba(58, 167, 255, 0.26), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(255, 95, 143, 0.18), transparent 28%),
    linear-gradient(135deg, #101522, #08111d 54%, #1b1024);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.home-link {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 20;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #f7fbff;
  background: rgba(8, 11, 18, 0.78);
  text-decoration: none;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.game-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 72px 18px 28px;
}

.cabinet {
  width: min(100%, 1080px);
  border: 10px solid #05070c;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(58, 167, 255, 0.18), transparent 28%),
    #05070c;
  box-shadow:
    0 28px 82px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(255, 209, 102, 0.42),
    inset 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.hud,
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  color: var(--gold);
  background:
    linear-gradient(180deg, #101a2c, #05070c);
  text-transform: uppercase;
}

.hud div { display: grid; gap: 2px; }
.hud span { color: var(--blue); font-size: clamp(0.68rem, 1.8vw, 0.86rem); font-weight: 900; }
.hud strong { font-size: clamp(1.05rem, 3vw, 1.75rem); line-height: 1; }
.build-version { color: #ffd2e0; font-size: clamp(0.82rem, 2vw, 1.1rem); }

.screen-wrap { position: relative; background: #03050a; }
canvas {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  image-rendering: pixelated;
  background: #03050a;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: rgba(3, 5, 10, 0.84);
}

.overlay.hidden { display: none; }
.overlay h1 { margin: 0; color: var(--gold); font-size: clamp(2.2rem, 7vw, 5rem); line-height: 1; }
.overlay p { max-width: 560px; margin: 0; color: #dce8f2; line-height: 1.5; font-weight: 750; }

button {
  min-width: 48px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  color: #051018;
  background: linear-gradient(180deg, #ffe47a, #c58a22);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
}

button:active { transform: translateY(2px); }
.controls button:last-child { min-width: 92px; background: linear-gradient(180deg, #3aa7ff, #1559a8); color: #fff; }

@media (max-width: 680px) {
  .game-shell { padding-inline: 8px; }
  .cabinet { border-width: 6px; }
  .hud, .controls { padding: 8px; flex-wrap: wrap; }
}
