:root {
  --night: #0b1440;
  --night-2: #172a7a;
  --dusk: #ff9a6b;
  --brand: #2b5cff;
  --brand-ink: #1636b8;
  --sun: #ffc83d;
  --sun-ink: #3a2a00;
  --bezel: #f4f7ff;
  --bezel-edge: #c9d6ff;
  --bg: #f5f7fc;
  --card: #ffffff;
  --ink: #141a33;
  --ink-2: #4a5478;
  --line: #e2e7f5;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(20, 34, 102, .35);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f2a; --card: #121a42; --ink: #eef2ff; --ink-2: #a9b4dd; --line: #233064;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0f2a; --card: #121a42; --ink: #eef2ff; --ink-2: #a9b4dd; --line: #233064;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px;
  padding: 12px max(16px, calc((100vw - 1180px) / 2)); padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(11, 20, 64, .72); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; }
.brand img { border-radius: 10px; }
.brand b { color: var(--sun); font-weight: 800; margin-left: 1px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { text-decoration: none; opacity: .8; font-weight: 600; font-size: 15px; }
.nav nav a:hover { opacity: 1; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border-radius: 999px; background: var(--sun); color: var(--sun-ink); font-weight: 800; font-size: 17px;
  text-decoration: none; box-shadow: 0 6px 0 #d99a00, 0 14px 24px -10px rgba(255, 200, 61, .7);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #d99a00; }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.btn-ghost:active { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; box-shadow: 0 4px 0 #d99a00; }

/* hero */
.hero {
  position: relative; display: grid; grid-template-columns: 1fr 1.1fr; align-items: center; gap: 40px;
  padding: 72px max(16px, calc((100vw - 1180px) / 2)) 96px; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, var(--night) 0%, var(--night-2) 58%, #6c4fc4 84%, var(--dusk) 100%);
}
.sky { position: absolute; inset: 0; pointer-events: none; }
.star { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .7; animation: twinkle 3.2s ease-in-out infinite; }
.star:nth-child(2n) { animation-delay: -1.4s; width: 2px; height: 2px; }
.star:nth-child(3n) { animation-delay: -2.2s; }
@keyframes twinkle { 50% { opacity: .15; } }
.clouds {
  position: absolute; left: -10%; right: -10%; bottom: -30px; height: 180px;
  background:
    radial-gradient(60px 40px at 8% 70%, #fff 98%, transparent), radial-gradient(90px 60px at 18% 80%, #fff 98%, transparent),
    radial-gradient(70px 46px at 30% 74%, #fff 98%, transparent), radial-gradient(110px 70px at 44% 86%, #fff 98%, transparent),
    radial-gradient(80px 52px at 58% 76%, #fff 98%, transparent), radial-gradient(120px 74px at 72% 88%, #fff 98%, transparent),
    radial-gradient(70px 48px at 86% 74%, #fff 98%, transparent), radial-gradient(100px 66px at 97% 84%, #fff 98%, transparent);
  opacity: .9; animation: drift 40s linear infinite alternate;
}
@keyframes drift { to { transform: translateX(-6%); } }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 12px; font-size: 14px; font-weight: 800; letter-spacing: .16em; color: var(--sun); }
.hero h1 { font-size: clamp(36px, 4.6vw, 62px); font-weight: 900; }
.hl { background: linear-gradient(transparent 62%, rgba(255, 200, 61, .55) 0); padding: 0 .05em; white-space: nowrap; }
.lead { margin: 20px 0 30px; font-size: clamp(16px, 1.5vw, 19px); color: rgba(255, 255, 255, .82); max-width: 32em; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.cta.center { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .85); }

/* cabin windows */
.cabin { position: relative; z-index: 2; display: grid; grid-template-columns: .8fr 1.25fr .8fr; align-items: center; gap: 18px; }
.window {
  margin: 0; position: relative; aspect-ratio: 3 / 4.2; border-radius: 46% / 34%; overflow: hidden;
  background: #0d1b4d; border: 14px solid var(--bezel);
  box-shadow: inset 0 0 0 3px var(--bezel-edge), 0 0 0 4px rgba(255, 255, 255, .12), 0 26px 50px -20px rgba(0, 0, 0, .6);
}
.window::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, .28) 0 18%, transparent 30% 100%);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .45);
}
.window img { width: 100%; height: 100%; object-fit: cover; }
.window.w1, .window.w3 { transform: translateY(26px) scale(.92); opacity: .9; }
.window.big { aspect-ratio: 3 / 4.4; }
.reel { position: absolute; inset: 0; }
.reel img { position: absolute; inset: 0; opacity: 0; animation: reel 16s infinite; }
.reel img:nth-child(1) { animation-delay: 0s; }
.reel img:nth-child(2) { animation-delay: 4s; }
.reel img:nth-child(3) { animation-delay: 8s; }
.reel img:nth-child(4) { animation-delay: 12s; }
@keyframes reel { 0%, 22% { opacity: 1; transform: scale(1.06); } 27%, 100% { opacity: 0; transform: scale(1); } }
.reel img:nth-child(1) { opacity: 1; }

/* stats strip */
.strip {
  position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; max-width: 1080px;
  margin: -44px auto 0; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.strip div { background: var(--card); padding: 22px 16px; text-align: center; }
.strip b { display: block; font-size: 34px; font-weight: 900; color: var(--brand); line-height: 1.1; }
.strip span { font-size: 14px; color: var(--ink-2); font-weight: 600; }

/* sections */
section.games, section.how, section.features, section.download { padding: 96px max(16px, calc((100vw - 1180px) / 2)) 0; }
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.sec-head .eyebrow { color: var(--brand); }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 900; }
.sec-head p:not(.eyebrow) { color: var(--ink-2); margin: 12px 0 0; font-size: 17px; }

.game-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.game { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 20px; box-shadow: var(--shadow); transition: transform .2s ease; }
.game:hover { transform: translateY(-4px); }
.shot { border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: #0d1b4d; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.game:hover .shot img { transform: scale(1.05); }
.meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 16px 8px 6px; }
.meta h3 { font-size: 22px; font-weight: 900; }
.tag { font-size: 13px; font-weight: 800; color: var(--brand); background: rgba(43, 92, 255, .1); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.game p { margin: 0 8px; color: var(--ink-2); font-size: 15px; }

.how-wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 18px; }
.steps li { counter-increment: s; position: relative; padding: 20px 20px 20px 78px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before {
  content: counter(s); position: absolute; left: 20px; top: 20px; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 900; font-size: 20px;
}
.steps b { display: block; font-size: 19px; margin-bottom: 4px; }
.steps span { color: var(--ink-2); font-size: 15px; }
.phone { margin: 0; border-radius: 30px; overflow: hidden; border: 10px solid #141a33; box-shadow: var(--shadow); background: #141a33; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 22px; }
.feat i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: rgba(43, 92, 255, .1); color: var(--brand); font-style: normal; font-size: 22px; font-weight: 900; margin-bottom: 14px; }
.feat h3 { font-size: 18px; margin-bottom: 6px; }
.feat p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

.download { padding-bottom: 96px !important; }
.dl-card {
  text-align: center; color: #fff; border-radius: 32px; padding: 56px 24px;
  background: radial-gradient(120% 90% at 50% 0%, #3a59ff 0%, var(--night-2) 55%, var(--night) 100%);
  box-shadow: var(--shadow);
}
.dl-logo { margin: 0 auto 20px; border-radius: 24px; box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .5); }
.dl-card h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; }
.dl-card p { color: rgba(255, 255, 255, .8); margin: 12px auto 28px; max-width: 30em; }

.foot { text-align: center; padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); color: var(--ink-2); font-size: 13px; border-top: 1px solid var(--line); }
.foot p { margin: 4px 0; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; text-align: left; }
  .cabin { max-width: 560px; margin: 0 auto; width: 100%; }
  .game-grid { grid-template-columns: repeat(2, 1fr); }
  .how-wrap { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .nav { gap: 12px; }
  .nav nav { display: none; }
  .nav .btn-sm { margin-left: auto; }
  .hero { padding-bottom: 80px; }
  .cta .btn { flex: 1 1 100%; }
  .cabin { gap: 10px; }
  .window { border-width: 9px; }
  .strip { grid-template-columns: repeat(2, 1fr); margin: -36px 16px 0; }
  .strip b { font-size: 28px; }
  .game-grid, .features { grid-template-columns: 1fr; }
  section.games, section.how, section.features, section.download { padding-top: 64px; }
  .steps li { padding-left: 70px; }
}
@media (prefers-reduced-motion: reduce) {
  .star, .clouds, .reel img { animation: none; }
  .btn, .game, .shot img { transition: none; }
}
