:root {
    color-scheme: dark;
    --bg: #090611;
    --surface: rgba(20, 14, 36, .72);
    --surface-strong: #171025;
    --line: rgba(255, 255, 255, .1);
    --text: #f8f4ff;
    --muted: #aaa0bd;
    --violet: #a78bfa;
    --pink: #f472b6;
    --cyan: #22d3ee;
    --lime: #a3e635;
    --radius: 28px;
    --header-height: 84px;
    font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 50% -20%, rgba(124, 58, 237, .26), transparent 42rem),
        linear-gradient(180deg, #0d0718 0%, var(--bg) 45%, #07050d 100%);
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.noise {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
.ambient {
    position: fixed;
    z-index: -2;
    width: 32rem;
    height: 32rem;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .18;
    pointer-events: none;
}
.ambient-one { top: 30%; left: -16rem; background: #9333ea; }
.ambient-two { top: 60%; right: -17rem; background: #0891b2; }
.site-header, .site-footer, main { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 20;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #120722;
    background: linear-gradient(135deg, #f0abfc, #67e8f9);
    box-shadow: 0 10px 34px rgba(167, 139, 250, .26);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -.04em;
}
.brand-copy { display: grid; line-height: 1; }
.brand-copy strong { font-size: 16px; letter-spacing: -.03em; }
.brand-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.header-nav { display: flex; align-items: center; gap: 28px; font-size: 13px; color: #d9d1e8; }
.header-nav > a { transition: color .2s ease; }
.header-nav > a:hover { color: #fff; }
.runtime-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: var(--muted);
    font-size: 11px;
    letter-spacing: .03em;
}
.runtime-pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 12px currentColor;
}
.runtime-pill.is-ready { color: #d9f99d; border-color: rgba(163, 230, 53, .25); }
.runtime-pill.is-ready i { background: var(--lime); }
.runtime-pill.is-fallback { color: #fde68a; }
.hero {
    min-height: min(720px, calc(100vh - var(--header-height)));
    padding: 90px 0 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 3rem;
    left: 50%;
    width: min(780px, 88vw);
    aspect-ratio: 1.8;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(168, 85, 247, .2), rgba(34, 211, 238, .06) 42%, transparent 70%);
    filter: blur(16px);
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .045);
    color: #cfc6dc;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.hero-kicker b { color: var(--violet); font-size: 14px; }
.hero h1 {
    max-width: 960px;
    margin: 0;
    font-size: clamp(54px, 8vw, 104px);
    line-height: .94;
    letter-spacing: -.075em;
    text-wrap: balance;
}
.hero h1 em {
    font-style: normal;
    color: transparent;
    background: linear-gradient(100deg, #e9d5ff 5%, #c084fc 32%, #67e8f9 72%, #a3e635);
    -webkit-background-clip: text;
    background-clip: text;
}
.hero-copy {
    max-width: 670px;
    margin: 30px auto 0;
    color: var(--muted);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.65;
    text-wrap: balance;
}
.hero-actions { margin-top: 38px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.button {
    min-height: 50px;
    padding: 0 22px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 750;
    transition: transform .2s ease, box-shadow .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary {
    color: #14081f;
    background: linear-gradient(120deg, #e9d5ff, #a5f3fc);
    box-shadow: 0 18px 50px rgba(139, 92, 246, .28);
}
.button-primary svg { width: 18px; }
.tech-stack { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.tech-stack span, .tag-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #bdb4cd;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .075);
    font-size: 10px;
    letter-spacing: .04em;
}
.hero-orbit {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    background: rgba(19, 12, 33, .72);
    backdrop-filter: blur(12px);
    color: var(--cyan);
    box-shadow: 0 15px 45px rgba(0, 0, 0, .28);
    animation: hover-orbit 5s ease-in-out infinite;
}
.orbit-a { top: 22%; left: 8%; transform: rotate(-12deg); color: #f0abfc; }
.orbit-b { top: 17%; right: 9%; animation-delay: -1.8s; color: #67e8f9; }
.orbit-c { bottom: 20%; right: 16%; animation-delay: -3s; color: #bef264; }
@keyframes hover-orbit { 50% { translate: 0 -13px; rotate: 7deg; } }
.games-section, .how-section { padding: 80px 0 100px; scroll-margin-top: 40px; }
.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}
.eyebrow { color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.section-heading h2 { margin: 9px 0 0; font-size: clamp(34px, 5vw, 58px); line-height: 1; letter-spacing: -.055em; }
.section-heading > p { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.game-card {
    --mx: 50%;
    --my: 50%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at var(--mx) var(--my), color-mix(in srgb, var(--card-a) 13%, transparent), transparent 42%),
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
    transition: transform .3s ease, border-color .3s ease;
}
.game-card:hover { transform: translateY(-7px); border-color: color-mix(in srgb, var(--card-a) 45%, transparent); }
.game-visual {
    min-height: 250px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 32% 30%, color-mix(in srgb, var(--card-a) 42%, transparent), transparent 30%),
        linear-gradient(140deg, color-mix(in srgb, var(--card-a) 26%, #0b0713), color-mix(in srgb, var(--card-b) 20%, #090611));
}
.game-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .2;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 25px 25px;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.game-planet {
    width: 122px;
    aspect-ratio: 1;
    border-radius: 48% 52% 58% 42%;
    position: relative;
    z-index: 1;
    background: linear-gradient(145deg, var(--card-b), var(--card-a));
    box-shadow:
        inset -20px -25px 44px rgba(14, 5, 26, .3),
        0 0 65px color-mix(in srgb, var(--card-a) 48%, transparent);
    transform: rotate(-14deg);
}
.game-planet::before, .game-planet::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
}
.game-planet::before { width: 26px; height: 17px; top: 23px; left: 24px; transform: rotate(-18deg); }
.game-planet::after { width: 18px; height: 18px; right: 23px; bottom: 27px; }
.play-bubble {
    position: absolute;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #130820;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 15px 35px rgba(0,0,0,.28);
    opacity: 0;
    transform: scale(.82);
    transition: opacity .25s ease, transform .25s ease;
}
.game-visual:hover .play-bubble { opacity: 1; transform: scale(1); }
.play-bubble svg { width: 24px; fill: currentColor; stroke: none; margin-left: 3px; }
.featured-badge {
    position: absolute;
    z-index: 3;
    top: 17px;
    left: 17px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #160b20;
    background: #f5d0fe;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.game-body { padding: 24px; }
.game-meta { display: flex; justify-content: space-between; color: #887e9a; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.game-body h3 { margin: 13px 0 10px; font-size: 25px; letter-spacing: -.035em; }
.game-body p { min-height: 48px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.game-footer { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.round-link {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    transition: background .2s ease, color .2s ease;
}
.round-link:hover { color: #12091c; background: #fff; }
.round-link svg { width: 17px; }
.how-section { padding-bottom: 130px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step {
    min-height: 250px;
    padding: 28px;
    position: relative;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
}
.step-number { position: absolute; top: 26px; right: 28px; color: #4d435d; font-size: 11px; font-weight: 800; }
.step-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #170a25;
    background: linear-gradient(135deg, #e9d5ff, #a5f3fc);
    font-size: 20px;
}
.step h3 { margin: 34px 0 10px; font-size: 21px; letter-spacing: -.025em; }
.step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.site-footer {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    color: #786e88;
    font-size: 11px;
}
.footer-brand { transform: scale(.84); transform-origin: left center; }
.site-footer p { margin: 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

.player-page { height: 100vh; overflow: hidden; background: #050309; }
.player-header {
    height: 68px;
    padding: 0 18px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: rgba(8, 5, 15, .94);
    backdrop-filter: blur(18px);
}
.player-back { justify-self: start; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.player-back:hover { color: #fff; }
.player-title { display: grid; text-align: center; }
.player-title strong { font-size: 14px; }
.player-title small { margin-top: 3px; color: #756b84; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.player-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.player-actions button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    cursor: pointer;
}
.player-actions button:hover { background: rgba(255,255,255,.1); }
.score-chip {
    min-height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: #d9f99d;
    background: rgba(163,230,53,.08);
    border: 1px solid rgba(163,230,53,.18);
    font-size: 11px;
}
.player-shell { height: calc(100vh - 68px); position: relative; background: #020204; }
.game-frame { width: 100%; height: 100%; display: block; border: 0; background: #08050f; }
.player-loader {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #08050f;
    transition: opacity .35s ease, visibility .35s ease;
}
.player-loader.is-hidden { opacity: 0; visibility: hidden; }
.player-loader span { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: loader .9s ease-in-out infinite alternate; }
.player-loader span:nth-child(2) { animation-delay: -.3s; background: var(--pink); }
.player-loader span:nth-child(3) { animation-delay: -.6s; background: var(--cyan); }
.player-loader p { margin-left: 8px; color: var(--muted); font-size: 11px; }
@keyframes loader { to { translate: 0 -8px; opacity: .35; } }

.not-found-page { display: grid; place-items: center; padding: 24px; }
.not-found-card {
    width: min(560px, 100%);
    padding: 55px 32px;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--surface);
}
.not-found-code { color: var(--violet); font-size: 12px; font-weight: 900; letter-spacing: .28em; }
.not-found-card h1 { margin: 14px 0 8px; font-size: clamp(34px, 8vw, 58px); letter-spacing: -.055em; }
.not-found-card p { margin: 0 0 28px; color: var(--muted); }

@media (max-width: 900px) {
    .game-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .game-card:last-child:nth-child(odd), .step:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .hero-orbit { display: none; }
}
@media (max-width: 680px) {
    :root { --header-height: 72px; }
    .site-header, .site-footer, main { width: min(100% - 26px, 1180px); }
    .header-nav > a { display: none; }
    .runtime-pill { padding: 0 10px; }
    .hero { padding: 72px 0 84px; min-height: auto; }
    .hero-kicker { gap: 7px; font-size: 9px; }
    .hero h1 { font-size: clamp(48px, 15vw, 72px); }
    .hero-copy { font-size: 16px; }
    .games-section, .how-section { padding: 62px 0 78px; }
    .section-heading { align-items: start; flex-direction: column; margin-bottom: 26px; }
    .game-grid, .steps { grid-template-columns: 1fr; }
    .game-card:last-child:nth-child(odd), .step:last-child:nth-child(odd) { grid-column: auto; }
    .game-visual { min-height: 230px; }
    .site-footer { padding: 30px 0; flex-direction: column; align-items: flex-start; }
    .player-header { height: 58px; grid-template-columns: auto 1fr auto; }
    .player-shell { height: calc(100vh - 58px); }
    .player-back span, .player-title small, .score-chip { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
}
