/* ==========================================================================
   THE ARCADE — shared stylesheet
   Design concept: stepping into an arcade at night. Cabinets glow in the
   dark, screens hum with scanlines, a marquee strip lights the way in.
   Variable names kept from the previous felt-table theme so every page's
   inline styles repaint automatically — only the values changed worlds.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Rubik:wght@400;500;600;700&family=VT323&display=swap');

:root {
  /* Arcade — daylight mode (still arcade, sunlit shopfront) */
  --felt: #EDE9FF;
  --felt-deep: #CFC5F5;
  --felt-line: #C3BBEE;
  --ivory: #FFFFFF;
  --ivory-shade: #F1ECFF;
  --ink: #16123A;
  --ink-soft: #5C5490;
  --red: #E0157F;
  --red-deep: #B01067;
  --gold: #00AEBB;
  --gold-deep: #00838D;

  --shadow-box: 0 8px 22px rgba(30, 10, 60, 0.14);
  --shadow-lift: 0 16px 32px rgba(30, 10, 60, 0.22);
  --radius-box: 6px;
  --font-display: 'Press Start 2P', 'Segoe UI', sans-serif;
  --font-body: 'Rubik', 'Segoe UI', sans-serif;
  --font-mono: 'VT323', monospace;

  color-scheme: light;
}

html[data-theme="dark"] {
  /* Arcade — cabinet mode (the real one: after dark, screens glowing) */
  --felt: #0A0D22;
  --felt-deep: #050614;
  --felt-line: #2A2F5C;
  --ivory: #12163A;
  --ivory-shade: #1B2050;
  --ink: #EAF6FF;
  --ink-soft: #8B93C9;
  --red: #FF2E9A;
  --red-deep: #C2116E;
  --gold: #35F2E0;
  --gold-deep: #17C7B6;

  --shadow-box: 0 0 0 1px rgba(255, 46, 154, 0.15), 0 10px 30px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 0 0 1px rgba(53, 242, 224, 0.35), 0 0 34px rgba(53, 242, 224, 0.25), 0 18px 40px rgba(0,0,0,0.65);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

html.gn-loading, html.gn-loading body { overflow: hidden; height: 100%; }

body {
  background:
    radial-gradient(ellipse at 50% -10%, var(--felt-line) 0%, transparent 55%),
    var(--felt);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 0px,
    rgba(0,0,0,0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.35;
  z-index: 500;
  mix-blend-mode: multiply;
}
html[data-theme="dark"] body::after { mix-blend-mode: overlay; opacity: 0.5; }

a { color: inherit; }

.gn-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  border-bottom: 2px solid var(--felt-line);
  position: relative;
  background: var(--felt-deep);
}

.gn-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--red));
  background-size: 200% 100%;
  animation: gn-marquee 3.5s linear infinite;
}

@keyframes gn-marquee {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.gn-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-display);
}

.gn-brand .mark {
  display: inline-block;
  width: 26px;
  height: 26px;
  background: var(--red);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--red), 0 0 22px var(--red);
  flex-shrink: 0;
  animation: gn-blink-mark 1.6s steps(1) infinite;
}
@keyframes gn-blink-mark {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.35; }
}

.gn-brand .name {
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 0 12px rgba(255, 46, 154, 0.35);
}

.gn-brand .tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  opacity: 0.9;
}

.gn-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
}

.gn-nav a {
  text-decoration: none;
  color: var(--ink);
  opacity: 0.82;
  transition: opacity 0.15s ease, text-shadow 0.15s ease;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gn-nav a:hover { opacity: 1; text-shadow: 0 0 10px var(--gold); }

.gn-theme-toggle {
  border: 2px solid var(--felt-line);
  background: var(--ivory);
  color: var(--ink);
  border-radius: 4px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gn-theme-toggle:hover { box-shadow: 0 0 12px var(--gold); border-color: var(--gold); }
.gn-theme-toggle:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.gn-footer {
  margin-top: auto;
  padding: 26px clamp(20px, 5vw, 56px) 34px;
  border-top: 2px solid var(--felt-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  gap: 10px;
  background: var(--felt-deep);
}
.gn-footer a { color: var(--gold); text-decoration: none; }
.gn-footer a:hover { text-decoration: underline; }

.gn-hero {
  padding: clamp(40px, 8vw, 84px) clamp(20px, 5vw, 56px) 20px;
  max-width: 820px;
}

.gn-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  margin: 0 0 18px;
  color: var(--ink);
  line-height: 1.5;
  text-shadow: 0 0 18px rgba(255, 46, 154, 0.25);
}

.gn-hero h1 span {
  color: var(--gold);
  text-shadow: 0 0 18px rgba(53, 242, 224, 0.45);
}

.gn-hero p {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0;
}

.gn-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 30px;
  padding: 30px clamp(20px, 5vw, 56px) clamp(50px, 8vw, 90px);
}

.gn-box {
  --tilt: 0deg;
  position: relative;
  display: block;
  text-decoration: none;
  background: var(--ivory);
  color: var(--ink);
  border-radius: var(--radius-box);
  padding: 30px 22px 24px;
  min-height: 210px;
  box-shadow: var(--shadow-box);
  border: 2px solid var(--felt-line);
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.gn-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}

.gn-box:hover, .gn-box:focus-visible {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: var(--gold);
}

.gn-box .spine {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.gn-box .kicker {
  font-family: var(--font-mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red);
  margin: 6px 0 10px;
}

.gn-box h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.4;
}

.gn-box p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0 0 20px;
}

.gn-box .play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gn-box .play::after { content: "▸"; transition: transform 0.15s ease; }
.gn-box:hover .play::after { transform: translateX(4px); }

.gn-box.coming-soon {
  background: transparent;
  border: 2px dashed var(--felt-line);
  box-shadow: none;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  cursor: default;
}
.gn-box.coming-soon:hover { transform: none; border-color: var(--felt-line); }
.gn-box.coming-soon .kicker { color: var(--gold); }
.gn-box.coming-soon h2 { color: var(--ink); }
.gn-box.coming-soon p { color: var(--ink-soft); }

.gn-game-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 56px) 20px 80px;
  width: 100%;
}

.gn-breadcrumb {
  font-family: var(--font-mono);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.gn-breadcrumb a { color: var(--gold); text-decoration: none; }
.gn-breadcrumb a:hover { text-decoration: underline; }

.gn-game-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  margin: 0 0 14px;
  line-height: 1.5;
  text-shadow: 0 0 16px rgba(255, 46, 154, 0.25);
}

.gn-game-sub {
  color: var(--ink-soft);
  margin: 0 0 30px;
  max-width: 56ch;
}

.gn-panel {
  background: var(--ivory);
  color: var(--ink);
  border-radius: 10px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow-box);
  border: 2px solid var(--felt-line);
  position: relative;
}

.gn-btn {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2px solid var(--red);
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  background: var(--red);
  color: #fff;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.gn-btn:hover { background: var(--red-deep); border-color: var(--red-deep); box-shadow: 0 0 14px var(--red); transform: translateY(-2px); }
.gn-btn.secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}
.gn-btn.secondary:hover { background: rgba(53,242,224,0.1); box-shadow: 0 0 14px var(--gold); }

.gn-stat-row {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.gn-stat-row strong { color: var(--gold); }

#gn-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #050614;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  font-family: var(--font-display);
  color: #EAF6FF;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#gn-preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}

#gn-preloader::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,46,154,0.08), transparent 70%);
  pointer-events: none;
}

.gn-pre-logo {
  font-size: clamp(1.3rem, 5vw, 2.1rem);
  letter-spacing: 0.06em;
  color: #FF2E9A;
  text-shadow: 0 0 10px #FF2E9A, 0 0 26px #FF2E9A, 0 0 40px rgba(255,46,154,0.5);
  animation: gn-flicker 2.6s ease-in-out infinite;
  text-align: center;
}

@keyframes gn-flicker {
  0%, 19%, 21%, 23%, 54%, 56%, 100% { opacity: 1; }
  20%, 22%, 55% { opacity: 0.55; }
}

.gn-pre-bar-track {
  width: min(280px, 70vw);
  height: 14px;
  border: 2px solid #35F2E0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 12px rgba(53,242,224,0.4);
  background: rgba(53,242,224,0.06);
}

.gn-pre-bar-fill {
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(90deg, #35F2E0 0px, #35F2E0 8px, #17C7B6 8px, #17C7B6 16px);
  transition: width 0.18s linear;
}

.gn-pre-status {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  color: #8B93C9;
  text-transform: uppercase;
  min-height: 1.4em;
}

.gn-pre-coin {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD23F, #E0A600);
  box-shadow: 0 0 16px rgba(255, 210, 63, 0.6);
  animation: gn-coin-spin 0.9s linear infinite;
}
@keyframes gn-coin-spin {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(180deg) scale(0.82); }
  100% { transform: rotateY(360deg) scale(1); }
}

#gn-preloader.gn-pre-exit {
  animation: gn-crt-off 0.55s ease-in forwards;
}
@keyframes gn-crt-off {
  0% { opacity: 1; transform: scale(1); filter: brightness(1); }
  60% { opacity: 1; transform: scaleY(0.02) scaleX(1.15); filter: brightness(3); }
  100% { opacity: 0; transform: scaleY(0.001) scaleX(0.4); filter: brightness(4); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  #gn-preloader { display: none !important; }
  html.gn-loading, html.gn-loading body { overflow: auto; height: auto; }
}

@media (max-width: 640px) {
  .gn-nav { gap: 14px; }
  .gn-header { flex-wrap: wrap; gap: 12px; }
}
