/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS & TRANSITIONS
   Keyframes, efectos dinámicos y micro-animaciones
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   PULSE (Botones CTA, elementos destacados)
   ───────────────────────────────────────────────────────────── */

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(0, 255, 249, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 255, 249, 0.8),
            0 0 60px rgba(0, 255, 249, 0.4);
    }
}

.pulse-magenta {
    animation: pulse-magenta 2s infinite;
}

@keyframes pulse-magenta {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(255, 0, 110, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(255, 0, 110, 0.8),
            0 0 60px rgba(255, 0, 110, 0.4);
    }
}

/* ─────────────────────────────────────────────────────────────
   SPIN (Loading spinners)
   ───────────────────────────────────────────────────────────── */

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 255, 249, 0.1);
    border-top-color: var(--neon-cyan, #00fff9);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(0, 255, 249, 0.5);
}

.loading-spinner-sm {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

.loading-spinner-lg {
    width: 80px;
    height: 80px;
    border-width: 5px;
}

/* ─────────────────────────────────────────────────────────────
   SHIMMER (Progress bars, cards de carga)
   ───────────────────────────────────────────────────────────── */

.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.progress-fill-animated {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan, #00fff9) 0%, var(--neon-magenta, #ff006e) 100%);
    border-radius: 999px;
    box-shadow: 0 0 15px rgba(0, 255, 249, 0.6);
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill-animated::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    animation: shimmer 2s infinite;
}

/* ─────────────────────────────────────────────────────────────
   GLOW (Elementos neón)
   ───────────────────────────────────────────────────────────── */

.glow-cyan {
    animation: glow-cyan 3s ease-in-out infinite;
}

@keyframes glow-cyan {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(0, 255, 249, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 255, 249, 0.8),
            0 0 50px rgba(0, 255, 249, 0.4);
    }
}

.glow-magenta {
    animation: glow-magenta 3s ease-in-out infinite;
}

@keyframes glow-magenta {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 0, 110, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 0, 110, 0.8),
            0 0 50px rgba(255, 0, 110, 0.4);
    }
}

.glow-lime {
    animation: glow-lime 3s ease-in-out infinite;
}

@keyframes glow-lime {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(196, 255, 97, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(196, 255, 97, 0.8),
            0 0 50px rgba(196, 255, 97, 0.4);
    }
}

/* ─────────────────────────────────────────────────────────────
   FADE (Apariciones suaves)
   ───────────────────────────────────────────────────────────── */

.fade-in {
    animation: fade-in 0.6s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-fast {
    animation: fade-in 0.3s ease-out;
}

.fade-out {
    animation: fade-out 0.3s ease-out forwards;
}

@keyframes fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* ─────────────────────────────────────────────────────────────
   SLIDE (Transiciones de páginas)
   ───────────────────────────────────────────────────────────── */

.slide-in-left {
    animation: slide-in-left 0.5s ease-out;
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slide-in-right 0.5s ease-out;
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ─────────────────────────────────────────────────────────────
   BOUNCE (Feedback exitoso)
   ───────────────────────────────────────────────────────────── */

.bounce {
    animation: bounce 0.6s ease-out;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ─────────────────────────────────────────────────────────────
   SHAKE (Errores, advertencias)
   ───────────────────────────────────────────────────────────── */

.shake {
    animation: shake 0.4s ease-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* ─────────────────────────────────────────────────────────────
   SCALE (Hover effects, clicks)
   ───────────────────────────────────────────────────────────── */

.scale-on-hover:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.scale-on-active:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* ─────────────────────────────────────────────────────────────
   FLOAT (Elementos flotantes)
   ───────────────────────────────────────────────────────────── */

.float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ─────────────────────────────────────────────────────────────
   TRANSITION UTILITIES
   ───────────────────────────────────────────────────────────── */

.transition-fast {
    transition: all 0.15s ease;
}

.transition-normal {
    transition: all 0.3s ease;
}

.transition-slow {
    transition: all 0.6s ease;
}

/* ─────────────────────────────────────────────────────────────
   CONFETTI (Celebración al completar protocolo)
   ───────────────────────────────────────────────────────────── */

/* Nota: Confetti requiere librería canvas-confetti.js */
/* Script: <script src="https://cdn.jsdelivr.net/npm/canvas-confetti@1.6.0/dist/confetti.browser.min.js"></script> */

.celebration-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}