:root {
  --bg: #120c1f;
  --bg-alt: #22133d;
  --panel: #2a1d4f;
  --panel-edge: #fff3bf;
  --text: #fff8d6;
  --accent: #ffcf40;
  --accent-2: #59f3c1;
  --accent-3: #ff7a90;
  --shadow: #0a0612;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "DotGothic16", monospace;
  background:
    radial-gradient(circle at top, rgba(108, 65, 183, 0.35), transparent 36%),
    linear-gradient(180deg, #29174d 0%, #120c1f 68%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
}

a {
  color: inherit;
  text-decoration: none;
}

.arcade-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.hero-shell {
  width: min(100%, 980px);
  padding: 24px;
  border: 4px solid var(--panel-edge);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 18%),
    var(--panel);
  box-shadow:
    0 0 0 6px #4b3784,
    0 0 0 10px var(--shadow),
    14px 14px 0 0 rgba(0, 0, 0, 0.35);
}

.hero-tag,
.cabinet-label,
.score-pill,
.email-link {
  font-family: "Press Start 2P", monospace;
}

.hero-tag {
  margin: 0 0 18px;
  color: var(--accent-2);
  font-size: 0.8rem;
  line-height: 1.8;
}

.hero-shell h1 {
  margin: 0;
  color: var(--accent);
  font-family: "Press Start 2P", monospace;
  font-size: clamp(2rem, 7vw, 4.8rem);
  line-height: 1.15;
  text-shadow: 4px 4px 0 #7d4d00;
}

.hero-copy {
  max-width: 42rem;
  margin: 20px 0 28px;
  font-size: 1.15rem;
  line-height: 1.8;
}

.hero-copy span {
  display: inline-block;
  min-width: 2.4em;
  padding: 0.12em 0.3em;
  color: #1a102e;
  background: var(--accent);
}

.game-cabinet {
  padding: 18px;
  border: 4px solid #111;
  background: #1a102e;
  box-shadow:
    inset 0 0 0 4px #5b46a0,
    inset 0 0 0 8px #0a0612;
}

.cabinet-top,
.game-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cabinet-label {
  margin: 0 0 10px;
  color: var(--accent-3);
  font-size: 0.72rem;
}

.game-cabinet h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
}

.scoreboard {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #1a102e;
  background: var(--accent);
  font-size: 0.72rem;
}

.score-pill strong {
  font-size: 1rem;
}

.canvas-frame {
  margin: 18px 0 16px;
  padding: 12px;
  border: 4px solid #51388d;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 2px,
      transparent 2px,
      transparent 4px
    ),
    #130b26;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  background: #20123e;
}

.control-strip {
  margin: 0 0 16px;
}

.control-copy {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.touch-button {
  border: 0;
  padding: 14px 12px;
  color: var(--text);
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 24%),
    #3f2a75;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, 0.28),
    4px 4px 0 rgba(0, 0, 0, 0.35);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.touch-button--jump {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 24%),
    #0f9a76;
}

.game-status {
  flex-wrap: wrap;
}

.touch-button:active,
.touch-button.is-pressed,
.reset-button:active {
  transform: translate(2px, 2px);
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    2px 2px 0 rgba(0, 0, 0, 0.28);
}

.game-status p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.reset-button {
  border: 0;
  padding: 12px 16px;
  color: #1a102e;
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
  background: var(--accent-2);
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.reset-button:hover,
.email-link:hover {
  transform: translate(-2px, -2px);
}

.email-link {
  display: inline-block;
  margin-top: 24px;
  padding: 14px 18px;
  color: var(--bg);
  font-size: 0.8rem;
  line-height: 1.7;
  background: var(--accent);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
  transition: transform 120ms ease;
}

@media (max-width: 720px) {
  .hero-shell {
    padding: 18px;
  }

  .hero-copy {
    font-size: 1rem;
  }

  .cabinet-top,
  .game-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .scoreboard {
    justify-content: flex-start;
  }

  .score-pill,
  .touch-button,
  .reset-button,
  .email-link,
  .hero-tag,
  .cabinet-label {
    font-size: 0.66rem;
  }

  .touch-controls {
    grid-template-columns: repeat(3, minmax(88px, 1fr));
  }
}
