:root {
  --bg: #12071e;
  --panel: rgba(31, 14, 55, 0.86);
  --panel-strong: rgba(40, 18, 69, 0.94);
  --line: rgba(255, 98, 193, 0.24);
  --text: #fff5fd;
  --muted: #e8b4d7;
  --pink: #ff62c1;
  --cyan: #4be7ff;
  --yellow: #ffe368;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Space Grotesk", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 98, 193, 0.22), transparent 24rem),
    radial-gradient(circle at 86% 16%, rgba(75, 231, 255, 0.18), transparent 22rem),
    linear-gradient(180deg, #0b0414 0%, var(--bg) 100%);
}

.game-shell {
  width: min(1240px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.hero-panel,
.arena-panel,
.unlock-section {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1.2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
}

.eyebrow,
.hero-stats span,
.hud-chip,
.overlay-title {
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  line-height: 1.7;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  line-height: 1.35;
}

h1 {
  max-width: 16ch;
  font-size: clamp(1.5rem, 2.3vw, 2.4rem);
}

.lede,
.unlock-section p,
.overlay-copy {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.lede {
  max-width: 38rem;
  margin-top: 1rem;
}

.hero-stats {
  display: grid;
  gap: 1rem;
}

.hero-stats article {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats strong {
  display: block;
  margin-top: 0.55rem;
}

.arena-panel {
  margin-top: 1rem;
  padding: 1rem;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.hud-chip {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.canvas-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  background: #0d0619;
}

#arena {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.8rem;
  background: rgba(8, 4, 16, 0.6);
  text-align: center;
  border: 0;
  color: inherit;
  cursor: pointer;
  transition: opacity 220ms ease;
}

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

.unlock-sections {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.unlock-section {
  min-height: 0;
  padding: 1.4rem;
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    border-color 240ms ease,
    background 240ms ease,
    max-height 320ms ease,
    padding 240ms ease,
    margin 240ms ease;
  overflow: hidden;
}

h2 {
  max-width: 16ch;
  font-size: clamp(1.4rem, 2vw, 2rem);
  margin: 0.6rem 0 0.8rem;
}

.unlock-section.locked {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  margin: 0;
  pointer-events: none;
}

.unlock-section.is-unlocked {
  opacity: 1;
  transform: translateY(-6px);
  border-color: rgba(75, 231, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(75, 231, 255, 0.12), rgba(255, 98, 193, 0.12)),
    var(--panel-strong);
  max-height: 420px;
}

@media (max-width: 960px) {
  .hero-panel,
  .hud {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .game-shell {
    width: min(100vw - 1rem, 1240px);
  }

  .hero-panel,
  .arena-panel,
  .unlock-section {
    border-radius: 22px;
  }

  h1 {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
  }

  h2 {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
  }
}
