:root {
  --bg: #0b0f1a;
  --bg-2: #111827;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #eef2ff;
  --muted: #9aa4bf;
  --accent: #7c5cff;
  --accent-2: #ffb84d;
  --ok: #4ade80;
  --err: #fb7185;
  --radius: 20px;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px;
}
.skip:focus { left: 8px; z-index: 100; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 20px;
  background: rgba(11, 15, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em;
  text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 20px; margin-left: auto; }
.nav a {
  text-decoration: none; color: var(--muted); font-weight: 500;
}
.nav a:hover { color: var(--text); }
.downloads-pill {
  padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.25), rgba(255, 184, 77, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem; color: var(--text); white-space: nowrap;
}
.downloads-pill strong { color: var(--accent-2); font-weight: 800; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  max-width: var(--maxw); margin: 0 auto;
  padding: 96px 20px 64px; text-align: center;
}
.hero-glow {
  position: absolute; inset: -40% -20% auto; height: 120%;
  background:
    radial-gradient(600px 320px at 50% 20%, rgba(124, 92, 255, 0.35), transparent 70%),
    radial-gradient(420px 260px at 70% 10%, rgba(255, 184, 77, 0.18), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem;
  color: var(--accent-2); font-weight: 600;
}
h1 {
  margin: 0 auto 20px; max-width: 14ch;
  font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.05;
  font-weight: 800; letter-spacing: -0.02em;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1;
  font-weight: 800; letter-spacing: -0.02em;
}
h3 { margin: 0; font-size: 1.45rem; font-weight: 700; }
.lede {
  margin: 0 auto; max-width: 58ch;
  font-size: 1.15rem; color: var(--muted);
}
.lede strong { color: var(--text); }
.hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin: 32px 0 48px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 12px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.12s ease, background 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #8f73ff; }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { background: var(--panel); border-color: var(--panel-border); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }

.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 0 auto; max-width: 720px;
}
.stats div {
  padding: 18px 12px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--panel-border);
}
.stats dt { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.stats dd { margin: 4px 0 0; font-size: 1.7rem; font-weight: 800; }

/* Sections */
.section {
  max-width: var(--maxw); margin: 0 auto; padding: 72px 20px;
}
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head .lede { margin: 12px 0 0; }

/* Games */
.games { display: grid; gap: 28px; }
.game {
  display: grid; grid-template-columns: 320px 1fr; gap: 0;
  overflow: hidden; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--panel-border);
}
.game-media { background: #0a0d16; }
.game-media img { width: 100%; height: 100%; object-fit: cover; }
.game-media-portrait { min-height: 360px; }
.game-media-portrait img { object-position: center 30%; }
.game-media-wide img { object-position: center; }
.game-body { padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.game-title { display: flex; align-items: center; gap: 16px; }
.game-icon {
  width: 72px; height: 72px; border-radius: 18px; flex: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.game-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; }
.game-body > p { margin: 0; color: var(--muted); font-size: 1.05rem; }
.store-links { display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 12px; text-decoration: none;
  background: #000; border: 1px solid rgba(255, 255, 255, 0.18);
  transition: border-color 0.2s, transform 0.12s;
}
.store:hover { border-color: rgba(255, 255, 255, 0.5); transform: translateY(-1px); }
.store svg { width: 26px; height: 26px; }
.store span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 1.05rem; }
.store small { font-size: 0.65rem; font-weight: 500; color: var(--muted); letter-spacing: 0.02em; }

/* About */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px;
  padding: 40px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--panel-border);
}
.about-text p { margin: 0 0 16px; color: var(--muted); font-size: 1.1rem; }
.about-text p:last-child { margin-bottom: 0; }
.about-text strong { color: var(--text); }

/* Contact */
.contact-form { max-width: 720px; display: grid; gap: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--panel-border);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.25);
}
.field textarea { resize: vertical; min-height: 140px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-note { margin: 0; color: var(--muted); font-size: 0.95rem; }
.form-status { margin: 0; min-height: 1.4em; font-weight: 500; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }

/* Footer */
.footer {
  max-width: var(--maxw); margin: 0 auto; padding: 32px 20px 48px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); border-top: 1px solid var(--panel-border);
}
.footer p { margin: 0; }

/* 404 */
.page-404 { display: grid; place-items: center; min-height: 100vh; text-align: center; padding: 20px; }
.notfound h1 { max-width: none; }
.notfound p { color: var(--muted); margin: 0 0 24px; }

/* Responsive */
@media (max-width: 840px) {
  .game { grid-template-columns: 1fr; }
  .game-media-portrait { min-height: 0; max-height: 360px; }
  .about-grid { grid-template-columns: 1fr; padding: 28px; }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .downloads-pill { margin-left: auto; }
  .hero { padding: 64px 16px 48px; }
  .section { padding: 56px 16px; }
  .stats { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .game-body { padding: 22px; }
  .game-media-portrait { max-height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .store { transition: none; }
}
