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

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #0f172a 100%);
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    overflow: hidden;
}

.preloader.fade-out {
    opacity: 0;
}

/* Logo Container */
.loading-logo {
    position: absolute;
    top: 60px;

    transform: translateX(-50%);
    animation: logoFloat 3s ease-in-out infinite;
    z-index: 10;
}

.loading-logo img {
    width: 180px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(8, 145, 178, 0.5));
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Progress Container */
.progress-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    z-index: 10;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0891b2, #06b6d4, #67e8f9);
    border-radius: 10px;
    width: 0%;
    transition: none;
    position: relative;
    box-shadow: 0 0 20px rgba(8, 145, 178, 0.7);
}

/* AI Container */
.ai-container {
    margin-bottom: 40px;
    position: relative;
    z-index: 10;
}

.ai-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    height: 80px;
}

.ai-dot {
    width: 16px;
    height: 16px;
    background: #06b6d4;
    border-radius: 50%;
    animation: aiPulse 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5);
}

.dot-1 { animation-delay: 0s; }
.dot-2 { animation-delay: 0.2s; }
.dot-3 { animation-delay: 0.4s; }
.dot-4 { animation-delay: 0.6s; }
.dot-5 { animation-delay: 0.8s; }
.dot-6 { animation-delay: 1s; }
.dot-7 { animation-delay: 1.2s; }
.dot-8 { animation-delay: 1.4s; }

@keyframes aiPulse {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
        background: #06b6d4;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
        background: #67e8f9;
        box-shadow: 0 0 25px rgba(103, 232, 249, 0.8);
    }
}

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

/* Loading Text */
.loading-text {
    position: absolute;
    top: 54%;
    left: 50%;
    transform: translateX(-50%);
    color: #94a3b8;
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    min-height: 28px;
    z-index: 10;
    white-space: nowrap;
}

.loading-percentage {
    color: #0891b2;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

/* Animated Dots */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Tech Icons Animation */
.tech-icons {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    opacity: 0.6;
    justify-content: center;
    max-width: 400px;
    z-index: 10;
}

.tech-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: techPulse 2s ease-in-out infinite;
}

.tech-icon:nth-child(1) { animation-delay: 0s; }
.tech-icon:nth-child(2) { animation-delay: 0.2s; }
.tech-icon:nth-child(3) { animation-delay: 0.4s; }
.tech-icon:nth-child(4) { animation-delay: 0.6s; }
.tech-icon:nth-child(5) { animation-delay: 0.8s; }
.tech-icon:nth-child(6) { animation-delay: 1s; }
.tech-icon:nth-child(7) { animation-delay: 1.2s; }

@keyframes techPulse {
    0%, 100% { 
        transform: scale(1);
        background: rgba(148, 163, 184, 0.1);
    }
    50% { 
        transform: scale(1.1);
        background: rgba(8, 145, 178, 0.3);
    }
}

.tech-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(1.2);
}

/* Command Lines Background */
.loading-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    font-family: 'Courier New', monospace;
}

.command-line {
    position: absolute;
    color: rgba(6, 182, 212, 0.3);
    font-size: 11px;
    white-space: nowrap;
    font-weight: normal;
    animation: floatCode 12s linear infinite;
}

.command-line.decrypting {
    animation: floatCode 12s linear infinite, decrypt 2s ease-out forwards;
}

@keyframes floatCode {
    0% {
        transform: translateY(100vh) translateX(-50px);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

@keyframes decrypt {
    0% {
        opacity: 0;
        filter: blur(2px);
        color: rgba(255, 0, 0, 0.6);
        text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    }
    30% {
        opacity: 0.3;
        filter: blur(1px);
        color: rgba(255, 165, 0, 0.6);
        text-shadow: 0 0 8px rgba(255, 165, 0, 0.4);
    }
    70% {
        opacity: 0.6;
        filter: blur(0.5px);
        color: rgba(255, 255, 0, 0.6);
        text-shadow: 0 0 6px rgba(255, 255, 0, 0.3);
    }
    100% {
        opacity: 0.8;
        filter: blur(0px);
        color: rgba(6, 182, 212, 0.7);
        text-shadow: 0 0 5px rgba(6, 182, 212, 0.4);
    }
}

/* Loading Video */
.loading-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.2;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 12, 26, 0.6);
    z-index: 2;
}

/* Loading Footer */
.loading-footer {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #64748b;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-align: center;
    opacity: 0.7;
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .progress-container {
        width: 320px;
    }
    
    .ai-container {
        margin-bottom: 30px;
    }
    
    .ai-loader {
        gap: 6px;
        height: 50px;
    }
    
    .ai-dot {
        width: 10px;
        height: 10px;
    }
    
    .loading-logo {
        top: 40px;
    }
    
    .loading-logo img {
        width: 130px;
    }
    
    .tech-icons {
bottom: 90px;
        gap: 12px;
        max-width: 300px;
    }
    
    .tech-icon {
        width: 36px;
        height: 36px;
    }
    
    .tech-icon img {
        width: 20px;
        height: 20px;
    }
    
    .loading-footer {
        bottom: 20px;
        font-size: 11px;
    }
}