:root {
  --bg: #090414;
  --bg-alt: #130824;
  --panel: rgba(18, 10, 37, 0.9);
  --panel-strong: rgba(24, 13, 49, 0.96);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f5edff;
  --muted: #b8a7d9;
  --pink: #ff4fd8;
  --blue: #37d7ff;
  --yellow: #ffd65a;
  --green: #6cffb8;
  --red: #ff6a8f;
  --shadow: 0 0 30px rgba(55, 215, 255, 0.14), 0 0 60px rgba(255, 79, 216, 0.1);
  --radius: 18px;
  --radius-lg: 28px;
  --max-width: 1180px;
  --mono: "Courier New", Courier, monospace;
  --sans: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  background:
    radial-gradient(circle at top, rgba(255, 79, 216, 0.12), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(55, 215, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #06030d 0%, #0c0518 40%, #120823 100%);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body.crt-mode {
  filter: contrast(1.03) saturate(1.08);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  color: var(--pink);
}

.hidden {
  display: none !important;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.scanlines,
.screen-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.28;
}

.screen-glow {
  background:
    radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.28) 100%);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-text {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-weight: 700;
}

.nav-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 0.9rem 1.2rem;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.button:hover,
.nav-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  border-color: rgba(255,255,255,0.32);
}

.button-primary {
  background: linear-gradient(135deg, rgba(255,79,216,0.24), rgba(55,215,255,0.18));
  border-color: rgba(255,79,216,0.5);
}

.button-secondary {
  background: rgba(255,255,255,0.05);
}

.button-ghost {
  background: transparent;
}

.button-danger {
  border-color: rgba(255, 106, 143, 0.45);
}

.button-small {
  font-size: 0.8rem;
  padding: 0.7rem 1rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 1.5rem;
  align-items: center;
  padding: 3rem 0 2rem;
}

.eyebrow,
.panel-label {
  color: var(--yellow);
  font-family: var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero-title,
.neon-title {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(2.8rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow:
    0 0 8px rgba(255, 79, 216, 0.85),
    0 0 18px rgba(255, 79, 216, 0.65),
    0 0 28px rgba(55, 215, 255, 0.35);
}

.neon-subtitle {
  color: var(--blue);
  text-shadow: 0 0 12px rgba(55, 215, 255, 0.55);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 48rem;
}

.hero-body,
.title-copy,
.content-section p,
#event-text,
#ending-text,
.log-item p {
  line-height: 1.65;
  color: #efe7fb;
}

.hero-actions,
.title-actions,
.action-row,
.hud-actions,
.game-over-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
}

.feature-pills li {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.arcade-panel {
  background: linear-gradient(180deg, rgba(28,15,51,0.92), rgba(14,8,28,0.96));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.2rem;
  position: relative;
  overflow: hidden;
}

.arcade-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 30%),
    linear-gradient(90deg, rgba(255,79,216,0.06), rgba(55,215,255,0.03));
  pointer-events: none;
}

.hero-panel-inner {
  position: relative;
  z-index: 1;
}

.stat-list {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.stat-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
  padding-bottom: 0.55rem;
}

.stat-list span {
  color: var(--muted);
}

.mini-marquee {
  margin-top: 1rem;
  border: 1px solid rgba(255,255,255,0.14);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  overflow: hidden;
  white-space: nowrap;
  color: var(--yellow);
  font-family: var(--mono);
}

.content-section {
  padding: 1rem 0 2.5rem;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.boot-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #05020c;
  display: grid;
  place-items: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.boot-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.boot-box {
  width: min(92vw, 520px);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 24px;
  background: rgba(12,7,23,0.98);
  padding: 1.4rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.boot-logo {
  width: 78px;
  margin: 0 auto 1rem;
}

.boot-line,
.boot-small {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boot-small {
  color: var(--muted);
  font-size: 0.85rem;
}

.boot-progress {
  margin: 1rem 0;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}

.boot-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--blue), var(--yellow));
  transition: width 0.24s ease;
}

.game-layout {
  padding-bottom: 3rem;
}

.title-screen,
.game-over-screen {
  margin-top: 1rem;
  text-align: center;
  padding: 2rem;
}

.game-shell {
  display: grid;
  gap: 1.25rem;
}

.game-top-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.panel-title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hud-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.hud-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0.85rem;
}

.hud-stat span {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hud-stat strong {
  display: block;
  margin-top: 0.3rem;
  font-size: 1.15rem;
}

.hud-stat-wide {
  grid-column: span 2;
}

.progress-wrap {
  margin-top: 1rem;
}

.progress-wrap label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.progress-bar {
  height: 16px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink), var(--blue), var(--green));
  transition: width 0.35s ease;
}

.scene-header {
  margin-bottom: 1rem;
}

.scene-header h2 {
  margin: 0.2rem 0 0.25rem;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.scene-location {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
}

.event-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 1rem;
}

.event-card h3 {
  margin-top: 0;
}

.choice-buttons {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.choice-buttons button {
  width: 100%;
}

.bottom-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
}

.log-list,
.leaderboard-list {
  display: grid;
  gap: 0.75rem;
}

.log-item,
.leaderboard-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0.85rem;
}

.log-item h4,
.leaderboard-row h4 {
  margin: 0 0 0.35rem;
}

.log-item p,
.leaderboard-row p {
  margin: 0;
  color: var(--muted);
}

.score-form {
  margin-top: 1rem;
  display: grid;
  gap: 0.8rem;
  max-width: 420px;
  margin-inline: auto;
}

.score-form input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  min-width: 240px;
  max-width: 340px;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(16, 10, 30, 0.96);
  border: 1px solid rgba(255,255,255,0.16);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.confetti-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 16px;
  opacity: 0.9;
  animation: confetti-fall 2.8s linear forwards;
}

@keyframes confetti-fall {
  to {
    transform: translateY(110vh) rotate(700deg);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .hero,
  .game-top-grid,
  .bottom-grid,
  .section-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }

  .hero {
    padding-top: 1.5rem;
  }

  .hero-title,
  .neon-title {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

  .hud-grid {
    grid-template-columns: 1fr 1fr;
  }

  .title-screen,
  .game-over-screen,
  .arcade-panel {
    padding: 1rem;
  }
}
.leaderboard-row + .leaderboard-row {
  margin-top: 0.25rem;
}

.arcade-panel h2 {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.title-inner {
  position: relative;
  z-index: 1;
}

.theme-about .title-screen,
.theme-leaderboard .title-screen {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
}
/* ============================================
   SEO / ALT LANDING PAGE HELPERS
============================================ */

.alt-landing {
  padding-bottom: 3rem;
}

.alt-landing .title-screen {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.alt-landing .title-inner {
  max-width: 860px;
  margin: 0 auto;
}

.alt-landing .hero-subtitle,
.alt-landing .title-copy {
  max-width: 760px;
  margin-inline: auto;
}

.alt-landing .title-actions,
.alt-landing .hero-actions {
  justify-content: center;
}

.alt-landing .feature-panel,
.alt-landing .play-panel,
.alt-landing .featured-panel {
  text-align: center;
}

.alt-landing .feature-panel p,
.alt-landing .play-panel p,
.alt-landing .featured-panel p {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.alt-landing .arcade-panel h2,
.alt-landing .arcade-panel .eyebrow,
.alt-landing .arcade-panel .panel-label {
  position: relative;
  z-index: 1;
}

.alt-landing .section-grid.cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alt-landing .section-grid.cards-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.alt-landing .game-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.alt-landing .game-card p {
  color: #efe7fb;
}

.alt-landing .game-card h2 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alt-landing .featured-panel {
  padding: 1.8rem;
}

.alt-landing .featured-panel h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.alt-landing .play-panel {
  text-align: center;
  padding: 2rem;
}

.alt-landing .play-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 1.15rem 2.4rem;
  min-width: min(100%, 380px);
  border-radius: 999px;
  border: 1px solid rgba(108, 255, 184, 0.55);
  background:
    linear-gradient(135deg, rgba(108,255,184,0.28), rgba(55,215,255,0.22)),
    rgba(255,255,255,0.04);
  color: #f8fffd;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 0 18px rgba(108,255,184,0.24),
    0 0 48px rgba(55,215,255,0.18),
    inset 0 0 20px rgba(255,255,255,0.08);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.alt-landing .play-cta:hover {
  transform: translateY(-2px) scale(1.01);
  color: #ffffff;
  border-color: rgba(108, 255, 184, 0.8);
  box-shadow:
    0 0 24px rgba(108,255,184,0.34),
    0 0 58px rgba(55,215,255,0.24),
    inset 0 0 24px rgba(255,255,255,0.12);
}

.alt-landing .mini-marquee {
  max-width: 900px;
  margin-inline: auto;
}

@media (max-width: 980px) {
  .alt-landing .section-grid.cards-2,
  .alt-landing .section-grid.cards-4 {
    grid-template-columns: 1fr;
  }
}
