:root {
    --ink: #0b1020;
    --text: #e8ebff;
    --muted: #9aa3d0;
    --violet: #7b5cff;
    --blue: #3d8bff;
    --grad: linear-gradient(135deg, #5b3fd6, #2d6cdf);
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
[hidden] { display: none !important; }

.demo-notice { display: flex; justify-content: center; flex-wrap: wrap; gap: .25rem 1rem; padding: .55rem 1rem; background: #000; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.demo-notice span { color: #b9c3ff; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: .8rem max(1rem, calc((100% - 1100px) / 2)); border-bottom: 1px solid #ffffff1a; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--grad); }
.back { color: var(--muted); font-size: .85rem; font-weight: 600; }
.back:hover { color: #fff; }

main { width: min(100% - 2rem, 1100px); margin: 0 auto; padding: 1.5rem 0 3rem; }
.hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; margin-bottom: 1rem; }
.hud div { padding: .7rem 1rem; border: 1px solid #ffffff1f; border-radius: 14px; background: #ffffff0d; }
.hud span { display: block; color: var(--muted); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.hud strong { font-size: 1.5rem; }
#lives { color: #ff5d73; letter-spacing: .1em; }

.stage { position: relative; aspect-ratio: 16 / 10; max-height: 72vh; width: 100%; overflow: hidden; border: 1px solid #ffffff26; border-radius: 22px; background: radial-gradient(ellipse at 70% 10%, #2a2470, #0b1020 65%); box-shadow: 0 20px 60px #5b3fd633; touch-action: none; }
canvas { display: block; width: 100%; height: 100%; cursor: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; background: rgba(8, 11, 28, .72); backdrop-filter: blur(3px); }
.overlay[hidden] { display: none; }
.card { max-width: 440px; text-align: center; }
.eyebrow { margin: 0 0 .5rem; color: var(--violet); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.card h1 { margin: 0 0 .8rem; font-size: clamp(1.4rem, 3.6vw, 2.2rem); line-height: 1.15; }
.card p { color: var(--muted); }
.card small { display: block; margin-top: 1rem; color: var(--muted); }
kbd { padding: .05rem .4rem; border: 1px solid #ffffff40; border-radius: 5px; font-size: .75rem; }

.button { display: inline-flex; align-items: center; gap: .4rem; padding: .8rem 1.6rem; border: 0; border-radius: 999px; background: var(--grad); color: #fff; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px #5b3fd666; }
.button.inverse { background: #fff; color: #5b3fd6; }
:focus-visible { outline: 3px solid #a99bff; outline-offset: 2px; }

.note { margin: 1rem 0 0; color: var(--muted); font-size: .85rem; }
.cta { margin-top: 2.5rem; padding: 2.5rem 1.5rem; border-radius: 24px; background: var(--grad); text-align: center; }
.cta h2 { margin: 0 0 .5rem; font-size: clamp(1.3rem, 3vw, 1.9rem); }
.cta p { margin: 0 0 1.4rem; opacity: .9; }
.footer { padding: 1.5rem 1rem 2rem; color: var(--muted); font-size: .8rem; text-align: center; }

@media (max-width: 640px) {
    .hud { grid-template-columns: repeat(2, 1fr); }
    .stage { aspect-ratio: 3 / 4; max-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
