:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #02030a;
  color: #f4f8ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(circle at top, rgba(64, 175, 255, 0.12), transparent 30%),
    radial-gradient(circle at bottom, rgba(255, 52, 153, 0.08), transparent 30%),
    #02030a;
}
code { font-family: "JetBrains Mono", "Fira Code", monospace; }
#starfield, .crt-overlay, .noise-overlay, .retro-grid {
  position: fixed; inset: 0; pointer-events: none;
}
.retro-grid {
  background:
    linear-gradient(rgba(0, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, transparent, rgba(0,0,0,0.85) 30%, rgba(0,0,0,1));
  transform: perspective(700px) rotateX(76deg) translateY(35vh);
  opacity: 0.25;
}
.crt-overlay {
  background:
    linear-gradient(rgba(255,255,255,0.02) 50%, rgba(0,0,0,0.18) 50%),
    linear-gradient(90deg, rgba(255, 0, 128, 0.035), rgba(0, 255, 255, 0.035));
  background-size: 100% 5px, 6px 100%;
  mix-blend-mode: screen;
  opacity: 0.55;
}
.noise-overlay {
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.6) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.4) 0 1px, transparent 1px),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,0.4) 0 1px, transparent 1px);
  background-size: 140px 140px;
}
.launcher-ui {
  position: relative; z-index: 2; width: min(1400px, calc(100vw - 32px)); margin: 0 auto; padding: 28px 0 40px;
}
.panel-glass {
  background: rgba(3, 7, 18, 0.62);
  border: 1px solid rgba(125, 211, 252, 0.15);
  border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03) inset, 0 20px 60px rgba(2, 6, 23, 0.65), 0 0 40px rgba(14, 165, 233, 0.08);
  backdrop-filter: blur(18px);
}
.hero-panel, .launcher-toolbar {
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.hero-panel h1 {
  margin: 6px 0 10px; font-size: clamp(2.6rem, 6vw, 5rem); line-height: 0.94; letter-spacing: 0.04em; text-transform: uppercase;
  text-shadow: 0 0 10px rgba(96, 165, 250, 0.5), 0 0 25px rgba(244, 114, 182, 0.2);
}
.eyebrow { margin: 0; color: #7dd3fc; letter-spacing: 0.28em; text-transform: uppercase; font-size: 0.76rem; }
.hero-copy, .detail-description, .card-body p, .detail-tagline, .toolbar-note, .detail-meta span { color: #d4ddf4; }
.hero-copy { max-width: 760px; line-height: 1.6; }
.hero-stats { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.stat-chip {
  min-width: 132px; padding: 14px 16px; border-radius: 18px; background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(99, 102, 241, 0.2); font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.1em;
}
.stat-chip span { display: block; font-size: 1.5rem; color: #7cf2ff; margin-bottom: 4px; }
.launcher-toolbar input {
  flex: 1; min-width: 240px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(2, 6, 23, 0.65); color: white; font-size: 1rem;
}
.launcher-content { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr); gap: 20px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.game-card {
  position: relative; min-height: 250px; padding: 18px; border: 1px solid rgba(255,255,255,0.08); border-radius: 24px;
  color: #fff; text-align: left; background-size: cover; background-position: center; overflow: hidden; cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.game-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--accent-a) 55%, transparent), transparent 35%),
    linear-gradient(220deg, color-mix(in srgb, var(--accent-b) 35%, transparent), transparent 45%);
  opacity: 0.82;
}
.game-card::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,0.12); border-radius: 18px; }
.game-card:hover, .game-card.active {
  transform: translateY(-6px) scale(1.01); border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.6), 0 0 22px color-mix(in srgb, var(--accent-a) 25%, transparent);
}
.card-topline, .card-body, .card-footer { position: relative; z-index: 1; }
.card-topline, .card-footer { display: flex; justify-content: space-between; gap: 10px; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.12em; }
.card-topline { margin-bottom: 22px; }
.status-pill, .genre-pill { padding: 6px 10px; border-radius: 999px; background: rgba(2, 6, 23, 0.5); border: 1px solid rgba(255,255,255,0.1); }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-body h2 { margin: 0; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.03em; }
.card-body p { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.card-footer { position: absolute; left: 18px; right: 18px; bottom: 18px; color: rgba(255,255,255,0.8); }
.detail-panel { padding: 24px; min-height: 420px; position: sticky; top: 24px; }
.detail-heading h2 { margin: 6px 0 10px; font-size: 2rem; text-transform: uppercase; }
.detail-description { line-height: 1.7; }
.detail-meta { display: grid; gap: 12px; margin-top: 22px; }
.detail-meta div { display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; background: rgba(15, 23, 42, 0.55); }
.detail-meta strong { color: #7dd3fc; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
.detail-actions { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.launch-btn, .subtle-btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 18px; border-radius: 14px; text-decoration: none; font-weight: 700; }
.launch-btn { background: linear-gradient(135deg, #22d3ee, #6366f1, #ec4899); color: white; box-shadow: 0 10px 25px rgba(56, 189, 248, 0.25); }
.subtle-btn { background: rgba(15, 23, 42, 0.7); color: #d6e4ff; border: 1px solid rgba(255,255,255,0.1); }
.detail-empty, .error-banner { padding: 18px 20px; }
.error-banner { margin-top: 16px; color: #fecaca; border-color: rgba(248, 113, 113, 0.4); }
.hidden { display: none; }
@media (max-width: 1100px) { .launcher-content { grid-template-columns: 1fr; } .detail-panel { position: static; } }
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(12px);
}

.gate-card {
  width: min(560px, calc(100vw - 24px));
  padding: 28px;
}

.gate-card h2 {
  margin: 8px 0 10px;
  font-size: 2.2rem;
  text-transform: uppercase;
}

.gate-copy {
  color: #d4ddf4;
  line-height: 1.6;
}

.unlock-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.unlock-form input {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(2, 6, 23, 0.75);
  color: white;
  font-size: 1rem;
}

.access-locked {
  color: #fecaca;
}

.access-unlocked {
  color: #86efac;
}

@media (max-width: 720px) {
  .launcher-ui { width: min(100vw - 18px, 1400px); padding-top: 16px; }
  .hero-panel, .launcher-toolbar { padding: 18px; flex-direction: column; align-items: flex-start; }
  .cards-grid { grid-template-columns: 1fr; }
}
