:root {
  color-scheme: dark;
  --sky: #63c7ff;
  --ink: #182235;
  --cream: #fff2c0;
  --gold: #ffd447;
  --red: #f25d50;
  --green: #55d66b;
  --blue: #3265ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    ui-rounded, "SF Pro Rounded", "Trebuchet MS", system-ui, sans-serif;
  color: white;
  background:
    radial-gradient(circle at 20% 5%, rgba(255, 255, 255, 0.18), transparent 28rem),
    linear-gradient(135deg, #143c70, #0f1528 58%, #26164e);
}

.shell {
  width: min(1100px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  line-height: 0.92;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.28);
}

.hero p {
  max-width: 680px;
  font-size: 1.06rem;
  color: rgba(255, 255, 255, 0.82);
}

.controls-card,
.tips,
.panel {
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: rgba(10, 16, 32, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.controls-card {
  min-width: 285px;
  padding: 18px;
}

.controls-card h2 {
  margin-bottom: 10px;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 28px;
  margin: 0 3px;
  padding: 0 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: inset 0 -3px rgba(0, 0, 0, 0.16);
  font-weight: 900;
}

.game-wrap {
  position: relative;
  overflow: hidden;
  border: 5px solid #fff0b0;
  border-radius: 26px;
  background: var(--sky);
  box-shadow:
    0 24px 0 rgba(0, 0, 0, 0.18),
    0 32px 80px rgba(0, 0, 0, 0.35);
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  image-rendering: pixelated;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(8, 13, 30, 0.4);
}

.overlay.hidden {
  pointer-events: none;
  opacity: 0;
}

.panel {
  width: min(430px, 100%);
  padding: 28px;
  text-align: center;
}

.panel h2 {
  margin-bottom: 8px;
  font-size: 2rem;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  color: #3a1900;
  background: linear-gradient(#ffe881, #ffae2b);
  box-shadow: 0 7px 0 #a84f12;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

button:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 #a84f12;
}

.tips {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .controls-card {
    min-width: 0;
  }
}
