:root {
  --bg: #0a0e27;
  --bg-2: #11163a;
  --card: #151b45;
  --card-hi: #1c2457;
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef1ff;
  --muted: #9aa3d0;
  --blue: #6c7bff;
  --cyan: #34c6ff;
  --yellow: #ffd23f;
  --orange: #ff7a1a;
  --grad-cool: linear-gradient(135deg, var(--blue), var(--cyan));
  --grad-warm: linear-gradient(135deg, var(--yellow), var(--orange));
  --radius: 20px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 39, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 20px; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.brand span b { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--muted); font-weight: 500; padding: 8px 14px; border-radius: 999px; transition: .2s; }
.nav a:hover { color: var(--text); background: var(--line); text-decoration: none; }
@media (max-width: 640px) { .nav a.hide-sm { display: none; } .nav a { padding: 8px 10px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 820px);
  display: grid; place-items: center; text-align: center;
  padding: 80px 0 100px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -2;
  background:
    radial-gradient(40% 40% at 50% 45%, rgba(108, 123, 255, .35), transparent 70%),
    radial-gradient(30% 30% at 80% 80%, rgba(255, 122, 26, .16), transparent 70%),
    radial-gradient(30% 30% at 15% 20%, rgba(52, 198, 255, .14), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 180px; z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.stars, .stars::after {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 120px 80px, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 200px 160px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 300px 40px, #fff, transparent),
    radial-gradient(1px 1px at 360px 210px, rgba(255,255,255,.6), transparent);
  background-size: 400px 260px;
  animation: drift 120s linear infinite;
  opacity: .55;
}
.stars::after { content: ""; background-size: 560px 340px; animation-duration: 200s; opacity: .7; }
@keyframes drift { to { background-position: -400px 260px; } }
.streak {
  position: absolute; z-index: -1; width: 2px; height: 140px;
  background: linear-gradient(to bottom, transparent, rgba(255, 180, 80, .7));
  transform: rotate(35deg); opacity: 0;
  animation: shoot 7s ease-in infinite;
}
.streak:nth-child(2) { left: 72%; top: 10%; animation-delay: 1.5s; }
.streak:nth-child(3) { left: 20%; top: 50%; animation-delay: 3.8s; }
.streak:nth-child(4) { left: 88%; top: 55%; animation-delay: 5.2s; }
@keyframes shoot {
  0% { opacity: 0; translate: 0 0; }
  6% { opacity: 1; }
  18% { opacity: 0; translate: -220px 320px; }
  100% { opacity: 0; translate: -220px 320px; }
}
.hero-logo { width: min(560px, 86vw); margin: 0 auto 28px; filter: drop-shadow(0 20px 60px rgba(108,123,255,.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.1; font-weight: 800; letter-spacing: -.5px; }
.hero h1 .warm { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: clamp(17px, 2vw, 20px); max-width: 620px; margin: 18px auto 34px; }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 16px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--grad-warm); color: #1a1030; box-shadow: 0 10px 30px rgba(255, 122, 26, .35); }
.btn-primary:hover { box-shadow: 0 14px 40px rgba(255, 122, 26, .5); }
.btn-ghost { color: var(--text); border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn svg { width: 20px; height: 20px; }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2.5px; text-transform: uppercase; background: var(--grad-cool); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 800; line-height: 1.15; letter-spacing: -.3px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-head p { color: var(--muted); margin-top: 12px; }

/* ---------- Games ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.game {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .25s, border-color .25s, background .25s;
}
.game:hover { transform: translateY(-6px); border-color: rgba(108, 123, 255, .5); background: var(--card-hi); }
.game-icon {
  aspect-ratio: 1; border-radius: 22%; overflow: hidden;
  display: grid; place-items: center;
  font-size: 54px; font-weight: 800; color: rgba(255,255,255,.95);
  text-shadow: 0 4px 20px rgba(0,0,0,.25);
  box-shadow: inset 0 -10px 30px rgba(0,0,0,.2);
}
.game-icon img { width: 100%; height: 100%; object-fit: cover; }
.game h3 { font-size: 20px; font-weight: 700; }
.game p { color: var(--muted); font-size: 15px; flex: 1; }
.game .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--muted); }
.tag.soon { background: rgba(255, 210, 63, .14); color: var(--yellow); }
.game .play { margin-top: 4px; justify-content: center; padding: 11px 18px; font-size: 15px; }
.game .play[aria-disabled="true"] { pointer-events: none; opacity: .45; }
.game-body { display: flex; flex-direction: column; gap: 12px; flex: 1; }

/* Featured layout when there is only one game */
.games.single { grid-template-columns: 1fr; max-width: 860px; margin-inline: auto; }
.games.single .game {
  flex-direction: row; align-items: center; gap: clamp(20px, 4vw, 44px);
  padding: clamp(20px, 3vw, 32px);
  background: linear-gradient(135deg, #1b2160, #2a1a5e 55%, #3d1a4f);
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 30px 80px rgba(108,123,255,.18);
}
.games.single .game-icon { width: clamp(180px, 32vw, 300px); flex-shrink: 0; box-shadow: 0 20px 50px rgba(0,0,0,.45); }
.games.single .game h3 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.1; }
.games.single .game p { font-size: 17px; color: #c4caf0; flex: 0; }
.games.single .game .play { align-self: flex-start; padding: 13px 26px; }
@media (max-width: 640px) {
  .games.single .game { flex-direction: column; text-align: center; }
  .games.single .game-icon { width: 70%; }
  .games.single .tags { justify-content: center; }
  .games.single .game .play { align-self: stretch; }
}

/* ---------- Features ---------- */
.about { background: linear-gradient(to bottom, transparent, var(--bg-2) 30%, var(--bg-2) 70%, transparent); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.feature { padding: 28px; border-radius: var(--radius); background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.feature .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; font-size: 26px; }
.feature:nth-child(1) .ic { background: rgba(108,123,255,.18); }
.feature:nth-child(2) .ic { background: rgba(52,198,255,.16); }
.feature:nth-child(3) .ic { background: rgba(255,210,63,.16); }
.feature:nth-child(4) .ic { background: rgba(255,122,26,.16); }
.feature h3 { font-size: 19px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 15px; }

/* ---------- Contact ---------- */
.contact-card {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: clamp(32px, 6vw, 64px);
  background: linear-gradient(135deg, #1d2366, #2a1a5e 60%, #3a1f4f);
  border: 1px solid rgba(255,255,255,.1);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
}
.contact-card::after {
  content: ""; position: absolute; right: -80px; bottom: -80px; width: 320px; height: 320px;
  background: url("symbol-512.png") center/contain no-repeat; opacity: .12; transform: rotate(-12deg);
}
.contact-card p { color: #c4caf0; margin-top: 12px; }
.contact-list { display: grid; gap: 12px; position: relative; z-index: 1; }
.contact-list a {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px;
  background: rgba(10,14,39,.45); border: 1px solid rgba(255,255,255,.1); color: var(--text); font-weight: 600;
  transition: background .2s;
}
.contact-list a:hover { background: rgba(10,14,39,.7); text-decoration: none; }
.contact-list small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.contact-list .ic { font-size: 22px; }
@media (max-width: 760px) { .contact-card { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 20px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 96px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; letter-spacing: -.4px; }
.legal .updated { color: var(--muted); margin: 8px 0 36px; }
.legal .toc { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin-bottom: 40px; }
.legal .toc ol { padding-left: 20px; columns: 2; column-gap: 32px; }
.legal .toc li { margin: 4px 0; }
@media (max-width: 640px) { .legal .toc ol { columns: 1; } }
.legal h2 { font-size: 24px; margin: 44px 0 12px; scroll-margin-top: 90px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { color: #c9cff0; }
.legal p { margin: 10px 0; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 6px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--text); background: var(--card); }
.legal td { color: #c9cff0; }
.callout { border-left: 3px solid var(--yellow); background: rgba(255,210,63,.07); padding: 14px 18px; border-radius: 0 12px 12px 0; margin: 18px 0; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
