#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.loading-container {
    text-align: center;
    color: #00ffff;
}

.cyber-eye {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 40px;
    background: radial-gradient(circle, #00ffff, #0080ff);
    border-radius: 50%;
    animation: eyePulse 2s ease-in-out infinite;
}

.pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #000;
    border-radius: 50%;
    animation: pupilMove 3s ease-in-out infinite;
}

.loading-text {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 30px;
    letter-spacing: 3px;
}

.loading-char {
    display: inline-block;
    animation: charGlow 1.5s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 0.1s);
}

.loading-char:nth-child(1) { --char-index: 1; }
.loading-char:nth-child(2) { --char-index: 2; }
.loading-char:nth-child(3) { --char-index: 3; }
.loading-char:nth-child(4) { --char-index: 4; }
.loading-char:nth-child(5) { --char-index: 5; }
.loading-char:nth-child(6) { --char-index: 6; }
.loading-char:nth-child(7) { --char-index: 7; }
.loading-char:nth-child(8) { --char-index: 8; }

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(0, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes eyePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
    }
}

@keyframes pupilMove {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
    }
    25% { 
        transform: translate(-30%, -50%) scale(0.8);
    }
    50% { 
        transform: translate(-50%, -30%) scale(1.1);
    }
    75% { 
        transform: translate(-70%, -50%) scale(0.9);
    }
}

@keyframes charGlow {
    0%, 100% { 
        opacity: 0.3;
        text-shadow: 0 0 5px #00ffff;
    }
    50% { 
        opacity: 1;
        text-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff;
    }
}

@keyframes loadingProgress {
    0% { 
        width: 0%;
        transform: translateX(-100%);
    }
    50% { 
        width: 100%;
        transform: translateX(0%);
    }
    100% { 
        width: 0%;
        transform: translateX(100%);
    }
}

/* Responsive loading screen */
@media (max-width: 768px) {
    .cyber-eye {
        width: 80px;
        height: 80px;
    }
    
    .pupil {
        width: 30px;
        height: 30px;
    }
    
    .loading-text {
        font-size: 1.5rem;
    }
    
    .loading-bar {
        width: 250px;
    }
}