/* ==========================================================================
   ANIMACIÓN DE CARGA ULTRA PROFESIONAL & MODERNA - TELECABLE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700&display=swap');

.loading-screen {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -99999;
}

.loading-screen.hidden,
.loading-screen.fade-out {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(1.04);
}

.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 90%;
    max-width: 360px;
    padding: 30px 24px;
    background: rgba(15, 25, 10, 0.45);
    border: 1px solid rgba(134, 255, 5, 0.15);
    border-radius: 24px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(134, 255, 5, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: loaderContainerFloat 4s ease-in-out infinite alternate;
}

@keyframes loaderContainerFloat {
    0% {
        transform: translateY(0px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(134, 255, 5, 0.06);
    }

    100% {
        transform: translateY(-6px);
        box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(134, 255, 5, 0.12);
    }
}

/* Glow orb background behind logo */
.loader-orb-glow {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(134, 255, 5, 0.25) 0%, rgba(255, 238, 0, 0.05) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
    animation: orbPulse 2.5s ease-in-out infinite alternate;
}

@keyframes orbPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.85);
        opacity: 0.6;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
}

/* Modern Logo Presentation */
.loader-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.loader-brand-icon {
    width: 65px;
    height: 65px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(134, 255, 5, 0.45));
    animation: iconBreath 2s ease-in-out infinite alternate;
}

@keyframes iconBreath {
    0% {
        transform: scale(0.96);
        filter: drop-shadow(0 0 8px rgba(134, 255, 5, 0.35));
    }

    100% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 16px rgba(134, 255, 5, 0.65));
    }
}

/* Sleek futuristic spinner around icon */
.loader-ring {
    position: absolute;
    width: 82px;
    height: 82px;
    border: 2px solid transparent;
    border-top-color: #86ff05;
    border-right-color: rgba(255, 238, 0, 0.8);
    border-radius: 50%;
    animation: spinRing 1.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    pointer-events: none;
}

.loader-ring-outer {
    position: absolute;
    width: 96px;
    height: 96px;
    border: 1px dashed rgba(134, 255, 5, 0.3);
    border-radius: 50%;
    animation: spinRingReverse 6s linear infinite;
    pointer-events: none;
}

@keyframes spinRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spinRingReverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Progress bar container */
.loader-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
    margin: 12px 0 14px 0;
}

/* Ultra sleek animated neon progress fill */
.loader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #86ff05 0%, #ffee00 50%, #86ff05 100%);
    background-size: 200% 100%;
    border-radius: 999px;
    box-shadow:
        0 0 14px rgba(134, 255, 5, 0.8),
        0 0 4px #ffee00;
    transition: width 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    animation: progressGradientMove 2s linear infinite;
    position: relative;
}

@keyframes progressGradientMove {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* Text and metrics */
.loader-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-family: 'Montserrat', 'Poppins', sans-serif;
}

.loader-text {
    font-size: 0.84rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    margin: 0;
}

.loader-percentage {
    font-size: 0.86rem;
    font-weight: 700;
    color: #86ff05;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 8px rgba(134, 255, 5, 0.5);
    letter-spacing: 0.5px;
}

.loader-dots {
    display: inline-block;
    width: 16px;
    text-align: left;
    color: #86ff05;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 480px) {
    .loader-container {
        width: 88%;
        padding: 24px 18px;
    }

    .loader-brand-icon {
        width: 55px;
        height: 55px;
    }

    .loader-ring {
        width: 70px;
        height: 70px;
    }

    .loader-ring-outer {
        width: 82px;
        height: 82px;
    }

    .loader-text {
        font-size: 0.78rem;
    }

    .loader-percentage {
        font-size: 0.80rem;
    }
}