/* ========================================
   LOADING SCREEN
   ======================================== */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, #0a0e27 0%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    max-width: 500px;
}

/* ========================================
   COSMIC LOADER
   ======================================== */

.cosmic-loader {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
}

.central-star {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffffff, #64c8ff);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 20px #64c8ff,
        0 0 40px #64c8ff,
        0 0 60px #64c8ff;
    animation: centralPulse 2s ease-in-out infinite;
}

@keyframes centralPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 
            0 0 20px #64c8ff,
            0 0 40px #64c8ff,
            0 0 60px #64c8ff;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        box-shadow: 
            0 0 30px #64c8ff,
            0 0 60px #64c8ff,
            0 0 90px #64c8ff;
    }
}

/* Orbits */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(100, 200, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit:nth-child(1) {
    width: 80px;
    height: 80px;
    animation: orbitRotate 3s linear infinite;
}

.orbit:nth-child(2) {
    width: 130px;
    height: 130px;
    animation: orbitRotate 5s linear infinite reverse;
}

.orbit:nth-child(3) {
    width: 180px;
    height: 180px;
    animation: orbitRotate 7s linear infinite;
}

.orbit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ffffff, #64c8ff);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #64c8ff;
}

@keyframes orbitRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   LOADING TEXT
   ======================================== */

.loading-text {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 4px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #64c8ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 2s ease-in-out infinite;
}

@keyframes textShimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.loading-progress {
    width: 100%;
    height: 4px;
    background: rgba(100, 200, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.3);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #64c8ff, #ffffff, #64c8ff);
    background-size: 200% 100%;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progressShine 2s linear infinite;
    box-shadow: 0 0 20px #64c8ff;
}

@keyframes progressShine {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* ========================================
   LOADING STATUS
   ======================================== */

.loading-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    animation: statusFade 1.5s ease-in-out infinite;
}

@keyframes statusFade {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* ========================================
   STARS BACKGROUND
   ======================================== */

#loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 15% 90%, white, transparent);
    background-size: 200% 200%;
    background-position: 0% 0%;
    animation: starsMove 100s linear infinite;
    opacity: 0.5;
}

@keyframes starsMove {
    from {
        background-position: 0% 0%;
    }
    to {
        background-position: 100% 100%;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .cosmic-loader {
        width: 150px;
        height: 150px;
    }
    
    .orbit:nth-child(1) {
        width: 60px;
        height: 60px;
    }
    
    .orbit:nth-child(2) {
        width: 100px;
        height: 100px;
    }
    
    .orbit:nth-child(3) {
        width: 140px;
        height: 140px;
    }
    
    .loading-text {
        font-size: 22px;
    }
}