:root {
  --bg: #0b0820;
  --bg2: #120c33;
  --navy: #0a1030;
  --ink: #eef0ff;
  --muted: #a7a3d6;
  --green: #14f195;
  --cyan: #00d1ff;
  --violet: #9945ff;
  --red: #ff3d6e;
  --line: rgba(153, 69, 255, 0.35);
  --sol: linear-gradient(90deg, #9945ff 0%, #00d1ff 55%, #14f195 100%);
  --pixel: "Press Start 2P", ui-monospace, monospace;
  --sans: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(153, 69, 255, 0.28), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(0, 209, 255, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--navy) 60%, var(--bg) 100%);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
.bg-scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
a { color: inherit; }
kbd {
  font-family: var(--pixel); font-size: 0.7em; padding: 3px 6px; border-radius: 4px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.06);
}
.grad { background: var(--sol); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hidden { display: none !important; }

/* Solana mark: three slanted bars */
.sol-mark { display: inline-flex; flex-direction: column; gap: 3px; width: 22px; }
.sol-mark i { display: block; height: 4px; background: var(--sol); transform: skewX(-24deg); }
.sol-mark i:nth-child(2) { transform: skewX(24deg); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(11, 8, 32, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-family: var(--pixel); font-size: 14px; letter-spacing: 1px;
  text-shadow: 0 0 12px rgba(0, 209, 255, 0.5);
}
.wordmark b { color: var(--green); margin-left: 4px; text-shadow: 0 0 12px rgba(20, 241, 149, 0.7); }
.wordmark.small { font-size: 11px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a {
  font-family: var(--pixel); font-size: 10px; text-decoration: none; color: var(--muted);
  padding: 8px 2px; transition: color .15s;
}
.nav a:hover, .nav a:focus-visible { color: var(--cyan); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.icon-btn svg { width: 18px; height: 18px; fill: var(--ink); }
.icon-btn:hover, .icon-btn:focus-visible { border-color: var(--cyan); box-shadow: 0 0 14px rgba(0,209,255,0.45); transform: translateY(-1px); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--pixel); font-size: 11px; letter-spacing: 1px;
  border: 0; cursor: pointer; text-decoration: none; color: #0b0820;
  padding: 14px 18px; border-radius: 10px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, box-shadow .15s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(2px) scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn-play {
  background: var(--green);
  box-shadow: 0 4px 0 #0a8f59, 0 0 22px rgba(20, 241, 149, 0.55);
}
.btn-play:hover { filter: brightness(1.1); box-shadow: 0 4px 0 #0a8f59, 0 0 32px rgba(20, 241, 149, 0.8); }
.btn-buy {
  background: var(--sol); color: #0b0820; font-size: 13px; padding: 18px 26px;
  box-shadow: 0 5px 0 #4b1f9a, 0 0 30px rgba(153, 69, 255, 0.6);
}
.btn-buy:hover { filter: brightness(1.12); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--cyan);
  box-shadow: inset 0 0 14px rgba(0, 209, 255, 0.25);
}
.btn-ghost:hover { box-shadow: inset 0 0 14px rgba(0,209,255,.4), 0 0 18px rgba(0,209,255,.4); }
.btn-copy { background: var(--cyan); padding: 10px 14px; font-size: 10px; flex-shrink: 0; }
.btn-copy:disabled { background: #2b2752; color: #6f6aa3; cursor: not-allowed; box-shadow: none; }
.btn-copy.copied { background: var(--green); }
.btn-big { font-size: 14px; padding: 18px 34px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr);
  gap: clamp(20px, 4vw, 48px); align-items: center;
  padding: clamp(24px, 4vw, 52px) clamp(16px, 4vw, 40px) 40px;
  max-width: 1360px; margin: 0 auto;
}
.eyebrow {
  font-family: var(--pixel); font-size: 10px; color: var(--green); margin: 0 0 18px;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .dot { width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
h1 {
  font-family: var(--pixel); font-weight: 400; margin: 0;
  font-size: clamp(22px, 3.4vw, 42px); line-height: 1.35;
  text-shadow: 0 0 24px rgba(153, 69, 255, 0.5);
}
h1 .grad { filter: drop-shadow(0 0 14px rgba(0, 209, 255, 0.45)); }
.lede { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; margin: 18px 0 24px; max-width: 34em; }

.ca-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(153,69,255,0.12), rgba(0,209,255,0.04));
  padding: 14px 16px; max-width: 520px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 0 30px rgba(153, 69, 255, 0.15);
}
.ca-label { font-family: var(--pixel); font-size: 9px; line-height: 1.7; color: var(--cyan); letter-spacing: 2px; margin-bottom: 10px; }
.ca-row { display: flex; align-items: center; gap: 10px; }
.ca-value {
  flex: 1; min-width: 0; font-family: var(--pixel); font-size: 12px; color: var(--green);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 0 10px rgba(20, 241, 149, 0.6);
}
.ca-value.live { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink); text-shadow: none; }
.ca-note { font-size: 12px; color: var(--muted); margin-top: 8px; min-height: 1em; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Game ---------- */
.game-wrap { min-width: 0; }
.game-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 18px; overflow: hidden;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--sol) border-box;
  box-shadow: 0 0 40px rgba(153, 69, 255, 0.45), 0 0 90px rgba(0, 209, 255, 0.18);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.game-frame.shake { animation: shake .35s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translate(-1px, 1px); }
  20%, 80% { transform: translate(3px, -2px); }
  30%, 50%, 70% { transform: translate(-5px, 2px); }
  40%, 60% { transform: translate(5px, -1px); }
}
#game { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.game-frame::after { /* scanlines + vignette over the canvas */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.16) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 60%, rgba(5, 3, 20, 0.6) 100%);
}
.hud { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.hud-score {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  font-family: var(--pixel); font-size: clamp(22px, 4vw, 40px); color: #fff;
  text-shadow: 0 0 12px var(--cyan), 3px 3px 0 #2a0f5c;
}
.hud-score.bump { animation: bump .22s ease-out; }
@keyframes bump { 40% { transform: translateX(-50%) scale(1.25); color: var(--green); } }
.hud-best {
  position: absolute; top: 16px; right: 16px; font-family: var(--pixel); font-size: 10px; color: var(--muted);
  background: rgba(11, 8, 32, 0.6); border: 1px solid var(--line); padding: 7px 10px; border-radius: 8px;
}
.hud-best span { color: var(--green); }

.overlay {
  position: absolute; inset: 0; z-index: 3; display: grid; place-items: center;
  background: radial-gradient(ellipse at center, rgba(11, 8, 32, 0.45), rgba(11, 8, 32, 0.8));
  padding: 16px;
}
.overlay.js-start { /* keep the bobbing car visible above the card */
  align-items: end; padding-bottom: 12%;
  background: linear-gradient(180deg, rgba(11, 8, 32, 0) 30%, rgba(11, 8, 32, 0.7));
}
.overlay.js-start .overlay-card { gap: 10px; }
.overlay-card {
  text-align: center; padding: clamp(18px, 3vw, 30px) clamp(20px, 4vw, 40px);
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(14, 10, 40, 0.82);
  box-shadow: 0 0 40px rgba(153, 69, 255, 0.35);
  display: grid; gap: 14px; justify-items: center;
  animation: pop .3s ease-out;
}
@keyframes pop { from { transform: scale(.9); opacity: 0; } }
.ov-kicker { font-family: var(--pixel); font-size: 10px; color: var(--cyan); letter-spacing: 2px; }
.ov-kicker.crash { color: var(--red); font-size: 14px; text-shadow: 0 0 14px rgba(255, 61, 110, .7); }
.ov-title { font-family: var(--pixel); font-size: clamp(18px, 3vw, 28px); text-shadow: 0 0 18px rgba(153,69,255,.7); }
.ov-title span { color: var(--green); margin-left: 6px; }
.ov-hint { font-size: 13px; color: var(--muted); }
.ov-stats { display: flex; gap: 28px; }
.ov-stats small { display: block; font-family: var(--pixel); font-size: 9px; color: var(--muted); margin-bottom: 8px; }
.ov-stats strong { font-family: var(--pixel); font-size: clamp(20px, 3vw, 28px); color: #fff; }
.ov-new { font-family: var(--pixel); font-size: 11px; color: var(--green); animation: blink .6s steps(2) infinite; }
.game-caption { text-align: center; color: var(--muted); font-size: 13px; margin: 12px 0 0; }

/* ---------- Sections ---------- */
.section { max-width: 1160px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 40px); }
.section-title { font-family: var(--pixel); font-weight: 400; font-size: clamp(16px, 2.2vw, 24px); margin: 0 0 28px; }
.section-title span { color: var(--violet); margin-right: 10px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  background: linear-gradient(180deg, rgba(0, 209, 255, 0.07), rgba(153, 69, 255, 0.04));
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.step:hover { transform: translateY(-4px); border-color: var(--cyan); box-shadow: 0 0 28px rgba(0, 209, 255, 0.25); }
.step-icon {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px;
  font-size: 24px; color: var(--green); background: rgba(20, 241, 149, 0.1); border: 1px solid rgba(20,241,149,.35);
}
.step-icon svg { width: 26px; height: 26px; shape-rendering: crispEdges; }
.step h3 { font-family: var(--pixel); font-weight: 400; font-size: 12px; margin: 18px 0 10px; color: var(--cyan); }
.step p { margin: 0; color: var(--ink); line-height: 1.55; font-size: 16px; }

.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.about-copy p { color: var(--muted); line-height: 1.7; font-size: 17px; margin: 0 0 14px; }
.about-copy strong { color: var(--ink); }
.about-stats { display: grid; gap: 12px; }
.stat {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: rgba(255,255,255,0.03);
}
.stat small { font-family: var(--pixel); font-size: 9px; color: var(--muted); }
.stat strong { font-family: var(--pixel); font-size: 14px; color: var(--green); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 30px clamp(16px, 4vw, 40px) 40px;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between;
  max-width: 1360px; margin: 0 auto;
}
.footer-links { display: flex; gap: 10px; }
.built { width: 100%; text-align: center; margin: 6px 0 0; font-family: var(--pixel); font-size: 9px; color: var(--muted); letter-spacing: 1px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  /* Mobile order: headline → game → contract → buy → copy */
  .hero { grid-template-columns: minmax(0, 1fr); gap: 18px; text-align: center; padding-top: 20px; }
  .hero-copy { display: contents; }
  .eyebrow { order: 1; margin: 0 auto -6px; }
  .hero h1 { order: 2; font-size: clamp(16px, 5vw, 30px); }
  .game-wrap { order: 3; }
  .ca-card { order: 4; width: 100%; text-align: left; }
  .cta-row { order: 5; justify-content: center; margin-top: 0; }
  .lede { order: 6; margin: 0 auto; }
  .lede, .ca-card { margin-left: auto; margin-right: auto; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .steps { grid-template-columns: 1fr; }
  .game-frame { aspect-ratio: 4 / 5; max-height: 72vh; }
}
@media (max-width: 420px) {
  .site-header { gap: 10px; }
  .wordmark { font-size: 11px; }
  .wordmark .sol-mark { width: 16px; }
  .header-actions .icon-btn { display: none; } /* still in the footer */
  .btn-play.js-play-now { padding: 10px 12px; font-size: 9px; }
  .btn-buy { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* Narrow-screen polish */
.btn { white-space: nowrap; }
@media (max-width: 520px) {
  .ov-title { display: none; }
  .ca-value { white-space: normal; font-size: 11px; line-height: 1.5; }
  .ca-value.live { word-break: break-all; font-size: 12px; }
}

/* Logo + ticker */
.wordmark .logo { width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(0, 209, 255, 0.5); box-shadow: 0 0 14px rgba(0, 209, 255, 0.45); object-fit: cover; }
.wordmark.small .logo { width: 32px; height: 32px; border-radius: 8px; }
.ticker-chip {
  font-size: 9px; color: #0b0820; background: var(--sol); padding: 5px 7px; border-radius: 6px;
  text-shadow: none; letter-spacing: 0.5px;
}
@media (max-width: 420px) {
  .wordmark .logo { width: 32px; height: 32px; }
  .site-header .ticker-chip { display: none; }
}
@media (max-width: 360px) {
  .site-header { padding-left: 12px; padding-right: 12px; }
  .wordmark { gap: 7px; font-size: 10px; }
  .wordmark .logo { width: 28px; height: 28px; }
}

/* Live contract: full address on its own line, COPY CA below */
.ca-row.live { flex-wrap: wrap; }
.ca-value.live {
  flex: 1 1 100%; white-space: normal; overflow: visible; text-overflow: clip;
  word-break: break-all; line-height: 1.5; user-select: all; -webkit-user-select: all;
  font-size: 14px; color: var(--green); text-shadow: 0 0 10px rgba(20, 241, 149, 0.35);
}
@media (max-width: 520px) { .ca-value.live { font-size: 13px; } }
