* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #042333; }
body { font-family: "Segoe UI", Arial, sans-serif; }
#unity-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#loading {
    position: fixed; inset: 0; z-index: 10; display: grid; place-items: center;
    overflow: hidden; color: #f3ffff; isolation: isolate;
    background: radial-gradient(ellipse at 50% 45%, #032535e8 0%, #032535b8 28%, #03253550 70%),
        linear-gradient(0deg, #032333b8, #03233310 80%),
        url("loading-background.jpg") center / cover no-repeat;
    transition: opacity .45s ease, visibility .45s;
}
#loading.is-complete { opacity: 0; visibility: hidden; pointer-events: none; }
.bubbles { position: absolute; inset: 0; z-index: -1; }
.bubbles i {
    position: absolute; bottom: -28px; width: var(--size, 10px); height: var(--size, 10px);
    left: var(--left); border: 1px solid #9ef3ec45; border-radius: 50%;
    box-shadow: inset 2px 2px 3px #b9ffff12;
    animation: rise var(--duration, 10s) linear infinite; animation-delay: var(--delay, 0s);
}
.loading-content { width: min(360px, calc(100vw - 64px)); text-align: center; padding: 28px 0; }
.studio-logo {
    display: block; width: 132px; height: 132px; object-fit: contain; margin: 0 auto 22px;
    filter: drop-shadow(0 8px 22px #001d3466);
}
.game-title { margin: 0; font-weight: 900; font-size: clamp(40px, 8vw, 62px); line-height: 1;
    letter-spacing: -2px; text-shadow: 0 4px 0 #003f5470, 0 12px 32px #001c3450; }
.game-title span { color: #7ef2de; }
.tagline { margin: 14px 0 34px; color: #b4dddfe0; font-size: 11px; font-weight: 600;
    letter-spacing: 3px; text-transform: uppercase; }
.progress-meta { display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 11px; font-size: 12px; letter-spacing: .4px; }
#loading-status { color: #d0eeef; }
#loading-percent { color: #85f2dd; font-variant-numeric: tabular-nums; font-weight: 700; }
.progress-track { height: 8px; border-radius: 8px; background: #001c3066; padding: 2px;
    box-shadow: 0 1px 0 #8ce5df24, inset 0 1px 3px #001b3e40; }
#progress { width: 0%; height: 100%; border-radius: inherit; position: relative;
    background: linear-gradient(90deg, #26b7b3, #8effd9); transition: width .25s ease;
    box-shadow: 0 0 18px #62ffdb55; }
.loading-footer { position: absolute; bottom: max(25px, env(safe-area-inset-bottom));
    margin: 0; color: #72afb5; font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; }
#error { position: fixed; inset: 0; z-index: 20; padding: 24px; color: #fff; background: #042333;
    white-space: pre-wrap; font-size: 16px; }
@keyframes rise { from { transform: translateY(0) translateX(0); opacity: 0; }
    10%, 80% { opacity: 1; } to { transform: translateY(-110vh) translateX(35px); opacity: 0; } }
@media (max-height: 540px) {
    .studio-logo { width: 88px; height: 88px; margin-bottom: 14px; }
    .game-title { font-size: 42px; }
    .tagline { margin: 10px 0 24px; }
    .loading-footer { bottom: 14px; font-size: 9px; }
    .loading-content { padding: 18px 0 28px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
