/* ============================================
   LOADER DEPORTIVO — Spinner moderno
   Glow verde + Glow azul, animación suave
   ============================================ */

.tp-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.tp-loader.is-active {
    opacity: 1;
    visibility: visible;
}

.tp-loader__backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.16), transparent 55%),
        radial-gradient(circle at 50% 40%, rgba(59, 130, 246, 0.14), transparent 68%),
        linear-gradient(135deg, #020617, #0f172a 60%, #1e293b);
    backdrop-filter: blur(10px);
}

.tp-loader__content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    transform: translateY(6px);
    transition: transform 0.35s ease;
}

.tp-loader.is-active .tp-loader__content {
    transform: translateY(0);
}

.tp-loader__spinner {
    position: relative;
    width: 130px;
    height: 130px;
}

.tp-loader__ring {
    position: absolute;
    border-radius: 50%;
}

.tp-loader__ring--outer {
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #34d399;
    border-right-color: #3b82f6;
    animation: tpSpin 1.1s linear infinite;
    filter: drop-shadow(0 0 14px rgba(52, 211, 153, 0.55));
}

.tp-loader__ring--dash {
    inset: 13px;
    border: 2px dashed rgba(148, 163, 184, 0.32);
    border-top-color: #60a5fa;
    animation: tpSpinReverse 2s linear infinite;
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.4));
}

.tp-loader__ring--inner {
    inset: 27px;
    border: 3px solid transparent;
    border-bottom-color: #10b981;
    border-left-color: #60a5fa;
    animation: tpSpin 1.4s linear infinite reverse;
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.55));
}

.tp-loader__ball {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 42%),
        radial-gradient(circle at 50% 50%, #34d399 0%, #0f766e 68%, #064e3b 100%);
    box-shadow:
        0 0 18px rgba(52, 211, 153, 0.6),
        0 0 40px rgba(59, 130, 246, 0.38),
        inset 0 0 12px rgba(255, 255, 255, 0.22);
    animation: tpBallPulse 1.6s ease-in-out infinite;
}

.tp-loader__label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(203, 213, 225, 0.85);
    animation: tpLabelPulse 1.8s ease-in-out infinite;
}

@keyframes tpSpin {
    to { transform: rotate(360deg); }
}

@keyframes tpSpinReverse {
    to { transform: rotate(-360deg); }
}

@keyframes tpBallPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow:
            0 0 18px rgba(52, 211, 153, 0.6),
            0 0 40px rgba(59, 130, 246, 0.38),
            inset 0 0 12px rgba(255, 255, 255, 0.22);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.14);
        box-shadow:
            0 0 26px rgba(52, 211, 153, 0.85),
            0 0 56px rgba(59, 130, 246, 0.55),
            inset 0 0 14px rgba(255, 255, 255, 0.3);
    }
}

@keyframes tpLabelPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .tp-loader__ring,
    .tp-loader__ball,
    .tp-loader__label {
        animation: none !important;
    }

    .tp-loader,
    .tp-loader__content {
        transition: none;
    }
}
