/* --- PRELOADER STYLES --- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition:
        opacity 0.6s ease,
        visibility 0.6s ease;
}

.loader-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-brain {
    font-size: 60px;
    color: #b91c1c;
    z-index: 10;
    animation: brainEnergy 3s infinite ease-in-out;
}

/* AI Orbit Rings */
.loader-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #b91c1c;
    animation: rotateRing 4s infinite linear;
}

.ring-1 { width: 110px; height: 110px; border-top-color: rgba(185, 28, 28, 0.8); animation-duration: 2s; }
.ring-2 { width: 150px; height: 150px; border-top-color: rgba(185, 28, 28, 0.5); animation-duration: 3s; animation-direction: reverse; }
.ring-3 { width: 190px; height: 190px; border-top-color: rgba(185, 28, 28, 0.3); animation-duration: 4s; }

.loader-scan {
    position: absolute;
    width: 90px;
    height: 3px;
    background: #b91c1c;
    box-shadow: 0 0 20px #ff0000;
    z-index: 11;
    animation: aiScan 2.5s infinite ease-in-out;
}

.loader-text {
    margin-top: 50px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-size: 12px;
    text-align: center;
}

.loader-text span {
    display: block;
    font-size: 10px;
    color: #b91c1c;
    margin-top: 8px;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

@keyframes rotateRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes brainEnergy {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(185, 28, 28, 0.5)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 30px rgba(185, 28, 28, 0.9)); }
}

@keyframes aiScan {
    0%, 100% { top: 25%; opacity: 0; }
    50% { top: 75%; opacity: 1; }
}

.preloader-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}
