:root {
  --neon-blue:   #00d4ff;
  --neon-purple: #b24bff;
  --neon-green:  #00ff88;
  --neon-pink:   #ff2d7a;
}

/* ── Theme tokens ── */
html[data-theme="dark"] {
  --bg-base:   #03050f;
  --bg-card:   rgba(13,21,40,0.7);
  --text-main: #e8f0fe;
  --text-mute: #7a8fb5;
  --border:    rgba(0,212,255,0.15);
}
html[data-theme="light"] {
  --bg-base:   #e8f0fe;
  --bg-card:   rgba(255,255,255,0.75);
  --text-main: #07131f;
  --text-mute: #3a5070;
  --border:    rgba(0,100,180,0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}

/* ── Starfield background ── */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
html[data-theme="light"] #starfield { opacity: 0.15; }

/* ── Scanline effect (dark only) ── */
.scanline {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.4), transparent);
  animation: scan 5s linear infinite;
  pointer-events: none;
  z-index: 1;
}
html[data-theme="light"] .scanline { display: none; }

/* ── Grid overlay ── */
.grid-overlay {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
  pointer-events: none;
}
html[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(rgba(0,100,180,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,100,180,0.06) 1px, transparent 1px);
}

/* ── Glassmorphism card ── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: transform 0.35s cubic-bezier(.22,.68,0,1.2),
              box-shadow 0.35s ease,
              border-color 0.35s ease;
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* ── Game cards: per-card neon accent ── */
.card-blue:hover  { transform: translateY(-10px); box-shadow: 0 0 30px rgba(0,212,255,0.4), 0 20px 60px rgba(0,212,255,0.1); border-color: var(--neon-blue); }
.card-purple:hover{ transform: translateY(-10px); box-shadow: 0 0 30px rgba(178,75,255,0.4), 0 20px 60px rgba(178,75,255,0.1); border-color: var(--neon-purple); }
.card-green:hover { transform: translateY(-10px); box-shadow: 0 0 30px rgba(0,255,136,0.4), 0 20px 60px rgba(0,255,136,0.1); border-color: var(--neon-green); }
.card-pink:hover  { transform: translateY(-10px); box-shadow: 0 0 30px rgba(255,45,122,0.4), 0 20px 60px rgba(255,45,122,0.1); border-color: var(--neon-pink); }

/* ── Thumbnail zoom on hover ── */
.thumb-wrap { overflow: hidden; }
.thumb-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(.22,.68,0,1.1);
  display: block;
}
.glass-card:hover .thumb-wrap img { transform: scale(1.08); }

/* ── Thumbnail fallback gradient ── */
.thumb-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
}

/* ── Neon text ── */
.text-neon-blue   { color: var(--neon-blue); }
.text-neon-purple { color: var(--neon-purple); }
.text-neon-green  { color: var(--neon-green); }
.text-neon-pink   { color: var(--neon-pink); }

/* ── Play buttons ── */
.btn-play {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.05em;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  position: relative; z-index: 2;
}
.btn-play:hover { transform: translateY(-2px) scale(1.03); filter: brightness(1.15); }
.btn-play:active { transform: scale(0.97); }

.btn-blue   { background: linear-gradient(135deg,#003a52,#006680); color: var(--neon-blue);   box-shadow: 0 0 14px rgba(0,212,255,0.35); border: 1px solid rgba(0,212,255,0.4); }
.btn-purple { background: linear-gradient(135deg,#2a0050,#5a0096); color: var(--neon-purple); box-shadow: 0 0 14px rgba(178,75,255,0.35); border: 1px solid rgba(178,75,255,0.4); }
.btn-green  { background: linear-gradient(135deg,#003320,#006640); color: var(--neon-green);  box-shadow: 0 0 14px rgba(0,255,136,0.35); border: 1px solid rgba(0,255,136,0.4); }
.btn-pink   { background: linear-gradient(135deg,#3a0020,#780040); color: var(--neon-pink);   box-shadow: 0 0 14px rgba(255,45,122,0.35); border: 1px solid rgba(255,45,122,0.4); }

/* ── Header glow logo ── */
.logo-glow {
  text-shadow: 0 0 12px var(--neon-blue), 0 0 30px rgba(0,212,255,0.3);
  animation: pulseNeon 3s ease-in-out infinite;
}

/* ── Hero title ── */
.hero-title {
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 50%, var(--neon-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px;
  border-radius: 999px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── Theme toggle ── */
.theme-btn {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  color: var(--text-main);
}
.theme-btn:hover { border-color: var(--neon-blue); box-shadow: 0 0 10px rgba(0,212,255,0.3); }

/* ── Content above backdrop ── */
.z-content { position: relative; z-index: 2; }

/* ── Decorative corner lines on cards ── */
.corner-tl, .corner-br {
  position: absolute; width: 20px; height: 20px;
  pointer-events: none; z-index: 3;
}
.corner-tl { top: 10px; left: 10px; border-top: 2px solid; border-left: 2px solid; border-radius: 4px 0 0 0; }
.corner-br { bottom: 10px; right: 10px; border-bottom: 2px solid; border-right: 2px solid; border-radius: 0 0 4px 0; }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #03050f; }
::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.3); border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}