:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #08080d;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
    min-height: 100dvh;
    background:
        radial-gradient(circle at 50% 0%, rgba(94, 51, 153, .24), transparent 42rem),
        #08080d;
}

.game-page {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    overflow: hidden;
}

.game-shell {
    position: relative;
    width: 100dvw;
    height: 100dvh;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: clamp(12px, 2vw, 24px);
    box-shadow: 0 32px 90px rgba(0, 0, 0, .5);
}

#unity-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background: #000;
}

.unity-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #08080d;
}

.unity-loading[hidden] { display: none; }

.unity-loading-card {
    width: min(100%, 360px);
    text-align: center;
}

.unity-loading-title { margin: 0 0 16px; font-size: 1.25rem; }
.unity-loading-status { min-height: 1.5em; margin: 16px 0 0; color: #c6c1d2; }
.unity-loading-status[data-state="error"] { color: #ffb4ad; }

.unity-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .13);
}

.unity-progress-bar {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #1877f2;
    transition: width .15s ease;
}

.auth-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(8, 8, 13, .8);
    backdrop-filter: blur(14px);
}

.auth-overlay[hidden] { display: none; }

.auth-card {
    width: min(100%, 400px);
    padding: clamp(28px, 5vw, 44px);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 20px;
    background: rgba(28, 25, 38, .9);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .35);
}

.auth-card h1 { margin: 0; font-size: clamp(1.65rem, 4vw, 2.15rem); }
.auth-card p { margin: 14px 0 26px; color: #c6c1d2; line-height: 1.5; }

.facebook-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: #1877f2;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, transform .16s ease;
}

.facebook-button:hover:not(:disabled) { background: #0f6ee6; transform: translateY(-1px); }
.facebook-button:focus-visible { outline: 3px solid #a9cdfd; outline-offset: 3px; }
.facebook-button:disabled { cursor: wait; opacity: .65; }

.auth-status { min-height: 1.4em; margin: 18px 0 0; color: #c6c1d2; font-size: .9rem; }
.auth-status[data-state="error"] { color: #ffb4ad; }

@media (max-width: 600px) {
    .game-shell { border: 0; border-radius: 0; }
}
