:root {
  --bg: #0a0e1a;
  --bg-2: #11182b;
  --panel: #1a2238;
  --border: #2a3550;
  --text: #e6ecff;
  --muted: #93a0c4;
  --accent: #ff5b3a;
  --accent-2: #ffd23f;
  --green: #38e07a;
  --red: #ff5b6e;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, #1b2a4a 0%, transparent 60%),
              radial-gradient(900px 500px at 100% 0%, #2a1420 0%, transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 72px 0 40px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,91,58,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,91,58,.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid rgba(255,210,63,.35);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,210,63,.06);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 84px);
  margin: 0 0 18px;
  letter-spacing: -.02em;
  line-height: 1.02;
  background: linear-gradient(180deg, #fff 0%, #c8d2ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .accent { color: var(--accent); -webkit-text-fill-color: var(--accent); }
.hero p.lead {
  max-width: 680px;
  margin: 0 auto 30px;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--muted);
}
.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), #e0482a);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(255,91,58,.6);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* ── Game stage ───────────────────────────────────────── */
/* The demo page is wider than tall: canvas (600) + right sidebar (260).
   A square 600px frame only ever shows the canvas, so give it the width the
   layout actually needs. On small screens the demo stacks them vertically. */
#game {
  margin: 18px auto 0;
  display: block;
  width: 100%;
  max-width: 880px;
  height: 640px;
  background: #000;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
  touch-action: none;
}
@media (max-width: 900px) {
  #game {
    height: 82vh;
  }
}

/* ── Sections ─────────────────────────────────────────── */
section.block {
  padding: 64px 0;
}
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 12px;
  letter-spacing: -.01em;
}
.section-head p { color: var(--muted); max-width: 620px; margin: 0 auto; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.feature {
  background: linear-gradient(180deg, var(--panel), #141b30);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  transition: transform .15s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-3px); border-color: rgba(255,91,58,.45); }
.feature .icon { font-size: 30px; margin-bottom: 12px; }
.feature h3 { margin: 0 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* How to play */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 24px 24px 56px;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 16px; top: 16px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent), #e0482a);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin: 0 0 6px; font-size: 17px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* Platforms */
.platforms {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 15px;
}
.platform .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

/* CTA band */
.cta-band {
  margin: 32px auto 0;
  max-width: 760px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255,91,58,.12), rgba(255,210,63,.06));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 24px;
}
.cta-band h2 { margin: 0 0 10px; font-size: clamp(24px, 3vw, 34px); }
.cta-band p { color: var(--muted); margin: 0 0 22px; }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
footer .brand { color: var(--text); font-weight: 700; }
footer a { color: var(--accent-2); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 720px) {
  .hero { padding: 40px 0 24px; }
  section.block { padding: 48px 0; }
  .container { padding: 0 16px; }
}

/* ── Language switcher (fixed top-right) ───────────────── */
.lang-switch {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(17, 24, 43, .85);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}
.lang-switch:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: rgba(255, 91, 58, .12);
}
.lang-flag { font-size: 16px; line-height: 1; }
.lang-label { letter-spacing: .02em; }
@media (max-width: 560px) {
  .lang-switch { top: 12px; right: 12px; padding: 7px 11px; font-size: 13px; }
  .lang-label { display: none; }
}
