:root {
    color-scheme: dark;
    font-family: Inter, ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #06020b; touch-action: none; }
body { color: #fff; }
.game { width: 100%; height: 100%; position: relative; isolation: isolate; }
.game::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 90px rgba(0,0,0,.62);
}
canvas { width: 100%; height: 100%; display: block; }
.hud {
    position: absolute;
    z-index: 3;
    top: max(18px, env(safe-area-inset-top));
    left: max(18px, env(safe-area-inset-left));
    display: flex;
    gap: 10px;
}
.hud > div {
    min-width: 78px;
    padding: 10px 14px;
    display: grid;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 15px;
    background: rgba(9,4,18,.58);
    backdrop-filter: blur(14px);
}
.hud small { color: #9d91af; font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }
.hud strong { margin-top: 2px; font-size: 19px; }
.overlay {
    position: absolute;
    z-index: 5;
    inset: 0;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at 50% 42%, rgba(126,34,206,.24), rgba(5,2,10,.88) 56%, #050209);
    transition: opacity .35s ease, visibility .35s ease;
}
.overlay.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.logo {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 32px;
    background: linear-gradient(145deg, #a855f7, #22d3ee);
    box-shadow: 0 24px 80px rgba(168,85,247,.38);
    rotate: -10deg;
}
.logo span {
    width: 30px;
    height: 48px;
    border-radius: 60% 60% 42% 42%;
    background: #fff;
    box-shadow: 0 0 30px rgba(255,255,255,.7);
}
.kicker { margin: 25px 0 9px; color: #c084fc; font-size: 10px; font-weight: 850; letter-spacing: .2em; text-transform: uppercase; }
.overlay h1 { margin: 0; font-size: clamp(38px, 8vw, 72px); line-height: 1; letter-spacing: -.06em; }
.overlay p:not(.kicker) { max-width: 530px; margin: 18px 0 26px; color: #b6a9c7; font-size: clamp(13px, 2.5vw, 17px); line-height: 1.6; }
.overlay button {
    min-height: 52px;
    padding: 0 25px;
    border: 0;
    border-radius: 17px;
    color: #13061e;
    background: linear-gradient(120deg, #f0abfc, #67e8f9);
    box-shadow: 0 16px 50px rgba(103,232,249,.2);
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}
.overlay button:active { transform: translateY(2px); }
.overlay > small { margin-top: 15px; color: #756982; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.touch-hint {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    translate: -50% 0;
    padding: 7px 12px;
    border-radius: 999px;
    color: #766b84;
    background: rgba(0,0,0,.24);
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
}
@media (pointer: fine) { .touch-hint { display: none; } }
@media (max-width: 560px) {
    .hud > div { min-width: 67px; padding: 8px 11px; }
    .hud strong { font-size: 16px; }
    .logo { width: 72px; height: 72px; border-radius: 25px; }
    .logo span { width: 25px; height: 39px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
