:root {
  --bg-0: #050816;
  --bg-1: #0b1630;
  --bg-2: #14264b;
  --text: #f4f7fb;
  --muted: #b9c8dd;
  --cool: #67e8f9;
  --cool-strong: #32c5ff;
  --warm: #ff8a4c;
  --warm-soft: #ffb15d;
  --surface: rgba(9, 17, 36, 0.72);
  --surface-strong: rgba(8, 12, 28, 0.84);
  --line: rgba(137, 194, 255, 0.22);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(80, 126, 255, 0.12), transparent 38%),
    linear-gradient(180deg, #040611 0%, #07101f 45%, #040714 100%);
  color: var(--text);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}

body {
  position: relative;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(5, 8, 22, 0.78), rgba(5, 8, 22, 0.28)),
    url("./assets/nebula-bg.png") center/cover no-repeat;
  filter: saturate(0.95) brightness(0.55);
  transform: scale(1.04);
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#game-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.hud {
  position: absolute;
  left: 0;
  width: 100%;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 3;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.menu-open .hud {
  opacity: 0;
  transform: translateY(-10px);
}

.hud-top {
  top: 0;
  gap: 20px;
}

.hud-bottom {
  bottom: 0;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-cluster {
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.brand {
  flex-direction: column;
  gap: 6px;
}

.eyebrow {
  color: var(--cool);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.68rem;
}

.brand h1,
.overlay-copy h2 {
  margin: 0;
}

.brand h1 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  letter-spacing: 0.08em;
}

.overlay-copy h2 {
  font-family: "Noto Sans SC", "Orbitron", sans-serif;
  font-weight: 800;
}

.stats {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-card,
.hint-pill {
  min-width: 106px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.stat-card span,
.hint-pill,
.micro-copy,
#overlay-body,
.feature-list {
  color: var(--muted);
}

.stat-card span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-card strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
}

.hint-pill {
  min-width: 0;
  padding: 10px 14px;
  font-size: 0.92rem;
}

kbd {
  display: inline-flex;
  min-width: 1.45rem;
  justify-content: center;
  padding: 0.12rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: linear-gradient(180deg, rgba(3, 5, 14, 0.26), rgba(3, 5, 14, 0.7));
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 4;
}

.overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.overlay-card {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(148, 198, 255, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(9, 17, 36, 0.92), rgba(7, 11, 26, 0.86)),
    radial-gradient(circle at top left, rgba(103, 232, 249, 0.08), transparent 35%);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(14px);
}

.overlay-copy {
  padding: 18px 12px 18px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overlay-copy h2 {
  margin-top: 14px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.02;
}

#overlay-body {
  margin: 0 0 20px;
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.feature-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature-list li {
  position: relative;
  padding-left: 18px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cool), var(--warm));
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.7);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 15px 26px;
  background: linear-gradient(135deg, var(--cool), var(--cool-strong));
  color: #02101c;
  font: 700 0.98rem/1 "Space Grotesk", "Noto Sans SC", sans-serif;
  cursor: pointer;
  box-shadow:
    0 8px 24px rgba(50, 197, 255, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 16px 36px rgba(50, 197, 255, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.overlay-visual {
  position: relative;
  min-height: 320px;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 980px) {
  .hud {
    padding: 20px 18px;
  }

  .overlay-card {
    grid-template-columns: 1fr;
  }

  .overlay-visual {
    min-height: 240px;
    order: -1;
  }
}

@media (max-width: 720px) {
  .hud-top,
  .hud-bottom {
    flex-direction: column;
    align-items: stretch;
  }

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

  .overlay {
    padding: 14px;
  }

  .overlay-card {
    gap: 18px;
    padding: 16px;
    border-radius: 22px;
  }

  .overlay-copy {
    padding: 4px;
  }

  #overlay-body {
    font-size: 0.98rem;
  }

  .hint-pill,
  .stat-card {
    width: 100%;
  }
}
