/**
 * BlackCoffee Matrix - Preloader Styles
 * Dark Orange Theme - Coherent with page colors
 */

/* Preloader container */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #1a0f0a 0%, #030014 50%, #000000 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Logo container - static, no animation */
.preloader-logo-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 40px;
}

/* Logo image - square, no border-radius */
.preloader-logo {
    width: 160px;
    height: 160px;
    border: 2px solid var(--neon-orange);
    box-shadow: 
        0 0 30px rgba(255, 102, 0, 0.4),
        inset 0 0 30px rgba(255, 102, 0, 0.1);
    position: relative;
    z-index: 10;
}

/* Loading text */
.preloader-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--neon-orange);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(255, 102, 0, 0.5);
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 15px rgba(255, 102, 0, 0.5); }
    50% { opacity: 0.7; text-shadow: 0 0 25px rgba(255, 102, 0, 0.8); }
}

/* Progress bar container */
.preloader-progress-container {
    width: 280px;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 102, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.1);
}

/* Progress bar fill - orange only */
.preloader-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        #ff6600 0%,
        #ff8833 50%,
        #ff6600 100%
    );
    border-radius: 2px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.6);
    position: relative;
}

/* Progress bar shimmer effect */
.preloader-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

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

/* Progress percentage */
.preloader-percentage {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--neon-orange);
    margin-top: 12px;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

/* Loading dots - orange only */
.preloader-dots {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.preloader-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-orange);
    animation: dotBounce 1.4s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
}

.preloader-dot:nth-child(1) {
    animation-delay: 0s;
}

.preloader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.preloader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
        box-shadow: 0 0 15px rgba(255, 102, 0, 0.8);
    }
}

/* Particles around preloader - orange only */
.preloader-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.preloader-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--neon-orange);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.6);
    animation: particleRise 3s ease-in infinite;
}

@keyframes particleRise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .preloader-logo-container {
        width: 140px;
        height: 140px;
        margin-bottom: 30px;
    }
    
    .preloader-logo {
        width: 120px;
        height: 120px;
    }
    
    .preloader-ring:nth-child(1) {
        width: 160px;
        height: 160px;
    }
    
    .preloader-ring:nth-child(2) {
        width: 200px;
        height: 200px;
    }
    
    .preloader-progress-container {
        width: 220px;
    }
    
    .preloader-text {
        font-size: 14px;
        letter-spacing: 2px;
    }
}
