/* self-hosted arcade font (no external CDN — fully self-contained) */
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/press-start-2p.woff2") format("woff2");
}

:root {
  --bg: #05060a;
  --cyan: #00e5ff;
  --pink: #ff2d95;
  --orange: #ff9d00;
  --gold: #ffcf4a;
  --purple: #7b2ff7;
  --ink: #cfeffb;
  --pixel: "Press Start 2P", "Courier New", monospace;
  --mono: "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* ---------- Synthwave backdrop ---------- */
.sky {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(ellipse 120% 70% at 50% 78%, rgba(123,47,247,0.35), transparent 60%),
    linear-gradient(to bottom, #05060a 0%, #0a0820 45%, #1a0a2e 62%, #2a0a24 74%, #05060a 100%);
}
.sun {
  display: none; /* replaced by the hero halo; kept to avoid mid-page clutter */
  position: fixed; left: 50%; bottom: 34vh; z-index: -2;
  width: 460px; height: 460px; transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--gold), var(--orange) 42%, var(--pink) 72%, var(--purple));
  filter: blur(1px);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 10px, transparent 10px 15px),
                      linear-gradient(to bottom, #000 55%, transparent 92%);
          mask-image: repeating-linear-gradient(to bottom, #000 0 10px, transparent 10px 15px),
                      linear-gradient(to bottom, #000 55%, transparent 92%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  box-shadow: 0 0 120px 40px rgba(255,60,120,0.25);
  opacity: 0.9;
}
.grid-floor {
  position: fixed; left: -25%; right: -25%; bottom: 0; z-index: -2;
  height: 42vh;
  background-image:
    linear-gradient(rgba(0,229,255,0.55) 2px, transparent 2px),
    linear-gradient(90deg, rgba(0,229,255,0.45) 2px, transparent 2px);
  background-size: 48px 48px;
  transform: perspective(320px) rotateX(62deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(to top, #000 8%, transparent 82%);
          mask-image: linear-gradient(to top, #000 8%, transparent 82%);
  animation: grid-scroll 3.2s linear infinite;
}
@keyframes grid-scroll { from { background-position: 0 0; } to { background-position: 0 48px; } }

.scanlines {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.16) 3px 4px);
}
.vignette {
  position: fixed; inset: 0; z-index: 89; pointer-events: none;
  box-shadow: inset 0 0 220px rgba(0,0,0,0.85);
}

/* ---------- Hero ---------- */
.hero { text-align: center; margin-top: 6vh; padding: 0 16px; position: relative; z-index: 1; }
/* soft sunset glow behind the (transparent) logo */
.hero::before {
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 48%; transform: translate(-50%, -50%);
  width: min(760px, 96vw); height: 480px; border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(255,120,60,0.32), rgba(255,45,149,0.26) 42%, rgba(123,47,247,0.20) 64%, transparent 78%);
  filter: blur(14px);
}
.logo {
  position: relative;
  width: min(560px, 82vw);
  height: auto;
  filter: drop-shadow(0 0 18px rgba(123,47,247,0.55)) drop-shadow(0 0 40px rgba(255,45,149,0.35));
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.subtitle {
  margin-top: 18px;
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  animation: hue 6s linear infinite;
}
@keyframes hue { 0%,100% { color: var(--cyan); text-shadow: 0 0 10px var(--cyan);} 50% { color: var(--pink); text-shadow: 0 0 10px var(--pink);} }

/* ---------- Section label ---------- */
.section-label {
  text-align: center;
  margin: 7vh 0 26px;
  font-family: var(--pixel);
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--gold);
}
.section-label span {
  position: relative;
  padding: 0 18px;
  text-shadow: 0 0 8px rgba(255,207,74,0.6);
}
.section-label span::before, .section-label span::after {
  content: ""; position: absolute; top: 50%; width: 60px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.section-label span::before { right: 100%; transform: scaleX(-1); }
.section-label span::after { left: 100%; }

/* ---------- Games grid ---------- */
main { z-index: 1; width: 100%; display: flex; flex-direction: column; align-items: center; padding: 0 20px 4vh; }
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 280px));
  gap: 26px;
  justify-content: center;
  width: 100%;
  max-width: 960px;
}

.card {
  display: flex; flex-direction: column;
  background: rgba(8, 10, 22, 0.72);
  border: 2px solid rgba(0, 229, 255, 0.25);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}
.card.live:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--cyan);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.45);
}
.thumb {
  height: 150px;
  background-size: cover;
  background-position: center 30%;
  position: relative;
  border-bottom: 2px solid rgba(0,229,255,0.25);
}
.thumb.locked {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #10131f 0 12px, #0b0e18 12px 24px);
}
.qmark { font-family: var(--pixel); font-size: 40px; color: rgba(207,239,251,0.25); }
.badge {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--pixel); font-size: 8px; letter-spacing: 1px;
  color: #001015; background: var(--cyan);
  padding: 5px 7px; border-radius: 4px;
  box-shadow: 0 0 12px var(--cyan);
}
.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.card-body h2 {
  font-family: var(--pixel); font-size: 15px; color: #fff;
  text-shadow: 0 0 10px rgba(0,229,255,0.7); letter-spacing: 1px;
}
.card.soon .card-body h2 { color: #6f7a90; text-shadow: none; }
.card-body p { font-size: 13px; line-height: 1.5; color: #9fc6d6; min-height: 39px; }
.meta { font-size: 10px; letter-spacing: 2px; color: #6f96a6; }
.play {
  margin-top: 6px;
  font-family: var(--pixel); font-size: 10px; letter-spacing: 1px;
  color: var(--gold); text-shadow: 0 0 8px rgba(255,207,74,0.6);
}
.play.locked { color: #5a6272; text-shadow: none; }
.card.soon { opacity: 0.72; }

/* ---------- Press start / footer ---------- */
.press-start {
  margin-top: 6vh;
  font-family: var(--pixel); font-size: 14px; letter-spacing: 3px;
  color: #fff; text-shadow: 0 0 12px var(--pink);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 0%, 55% { opacity: 1; } 55.01%, 100% { opacity: 0; } }

footer {
  z-index: 1; margin-top: auto; padding: 26px 16px 22px;
  font-family: var(--pixel); font-size: 9px; letter-spacing: 2px;
  color: #5f7688; display: flex; gap: 12px; align-items: center;
}
footer .dot { color: var(--pink); }

/* Respect the OS "reduce motion" preference: calm the scanlines, grid scroll,
   logo float, hue shift and blinking. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
