/* Loading screen – 8-bit full-out RPG intro */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #0a0a12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.5s ease;
    overflow: hidden;
}
#loading-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.12) 2px,
        rgba(0,0,0,0.12) 4px
    );
    pointer-events: none;
    opacity: 0.6;
}
#loading-screen.hiding {
    opacity: 0;
    pointer-events: none;
}
#loading-screen.hidden {
    display: none !important;
}
.loading-infinity {
    font-size: clamp(56px, 14vw, 100px);
    color: #fff;
    animation: loadingInfinitySpin 1s linear infinite;
    text-shadow: 0 0 16px rgba(255,255,255,0.6), 0 0 32px rgba(255,255,255,0.3);
    z-index: 1;
}
.loading-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(18px, 4vw, 28px);
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: loadingTitlePulse 0.5s ease-in-out infinite alternate;
    z-index: 1;
}
.loading-tagline {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(11px, 2.2vw, 14px);
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-top: 0;
    z-index: 1;
}
.loading-sub {
    font-family: 'Courier New', Courier, monospace;
    font-size: clamp(10px, 2vw, 12px);
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.15em;
    z-index: 1;
}
.loading-dots::after {
    content: '';
    animation: loadingDots 1s steps(4, end) infinite;
}
@keyframes loadingInfinitySpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes loadingTitlePulse {
    from { opacity: 0.9; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes loadingDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}
