/* =====================================================
   EPIC PRELOADER STYLES
   Experiencia de carga cinematográfica
   ===================================================== */

.epic-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d0d14;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.epic-preloader.loaded {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(1.1);
    pointer-events: none !important;
    z-index: -1 !important;
}

.preloader-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#preloader-canvas {
    width: 100%;
    height: 100%;
}

.preloader-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Logo 3D Animado */
.preloader-logo {
    width: 300px;
    height: 300px;
    margin: 0 auto 40px;
    position: relative;
}

#preloader-3d-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preloader-3d-logo canvas {
    display: block;
    filter: drop-shadow(0 0 20px rgba(155, 97, 164, 0.6));
}

/* Contador */
.preloader-counter {
    font-family: 'Poppins', sans-serif;
    font-size: 72px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #9B61A4, #04C7AA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -2px;
}

.counter-percent {
    font-size: 48px;
    opacity: 0.7;
}

/* Barra de Progreso */
.preloader-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 0 auto 30px;
    overflow: hidden;
    position: relative;
}

.preloader-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #9B61A4, #04C7AA);
    border-radius: 10px;
    transition: width 0.1s ease;
    box-shadow: 0 0 20px rgba(155, 97, 164, 0.8);
    position: relative;
}

.preloader-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Texto de Carga */
.preloader-text {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.loading-dots {
    display: inline-block;
}

.loading-dots span {
    animation: blink 1.4s infinite;
    opacity: 0;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Body cuando está cargando */
body:not(.loaded) {
    overflow: hidden;
}

body.loaded {
    overflow: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .preloader-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 30px;
    }
    
    .preloader-counter {
        font-size: 56px;
    }
    
    .counter-percent {
        font-size: 36px;
    }
    
    .preloader-bar {
        width: 250px;
    }
    
    .preloader-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .preloader-counter {
        font-size: 48px;
    }
    
    .preloader-bar {
        width: 200px;
    }
}
