* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    overflow: hidden;
    max-height: var(--tg-viewport-height, 100vh);
    background: #0a0a0f;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ── Container ── */
#cs-unity-container {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #0a0a0f;
}

#cs-unity-canvas {
    width: 100%;
    height: 100%;
    background: #000;
    touch-action: none;
}

/* ── Loading overlay ── */
#cs-unity-loading-bar {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 24px 24px 10vh;
    background: radial-gradient(ellipse at center, #14141c 0%, #0a0a0f 100%);
    z-index: 10;
}

#cs-unity-loading-bar.active { display: flex; }

/* ── Progress bar ── */
.progress-row {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    width: min(520px, 88vw);
}

.progress-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    color: rgba(255,255,255,0.75);
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    background: linear-gradient(90deg, #3a6ea5, #5b9bd5, #9cc7ee);
    transition: width 0.3s ease-out;
    position: relative;
    box-shadow: 0 0 12px rgba(91, 155, 213, 0.6);
}

/* Shimmer on the fill */
.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ── Text ── */
.loading-percent {
    font-size: 13px;
    font-weight: 600;
    color: #9cc7ee;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(91, 155, 213, 0.35);
}

.loading-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ── Small screens ── */
@media (max-width: 480px) {
    #cs-unity-loading-bar { padding-bottom: 8vh; }
}

/* ── Orientation overlay ── */
#orientation-gif-container {
    display: none;
    position: fixed;
    inset: 0;
    justify-content: center;
    align-items: center;
    background: #0a0a0f;
}

#orientation-gif {
    max-width: 150px;
    max-height: 150px;
}
