/* ==========================================================================
   ANIMATIONS - Keyframes & Animation Utilities
   ========================================================================== */

/* ==================== FADE ANIMATIONS ==================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== SCALE ANIMATIONS ==================== */

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* ==================== PULSE ANIMATIONS ==================== */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 var(--cyan-30); }
    50% { box-shadow: 0 0 20px 10px var(--cyan-20); }
}

@keyframes pilotPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4); }
    50% { box-shadow: 0 4px 25px rgba(139, 92, 246, 0.5); }
}

/* ==================== SLIDE ANIMATIONS ==================== */

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== SPIN ANIMATIONS ==================== */

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spinReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* ==================== BOUNCE ANIMATIONS ==================== */

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(-15px);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ==================== SHIMMER ANIMATIONS ==================== */

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ==================== GLOW ANIMATIONS ==================== */

@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 5px var(--cyan-30),
                    0 0 10px var(--cyan-20),
                    0 0 15px var(--cyan-10);
    }
    50% {
        box-shadow: 0 0 10px var(--cyan-50),
                    0 0 20px var(--cyan-30),
                    0 0 30px var(--cyan-20);
    }
}

@keyframes borderGlow {
    0%, 100% { border-color: var(--cyan-30); }
    50% { border-color: var(--cyan-75); }
}

/* ==================== TYPING ANIMATION ==================== */

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ==================== FLOAT ANIMATION ==================== */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ==================== ANIMATION UTILITIES ==================== */

.animate-fadeIn { animation: fadeIn 0.3s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.4s ease forwards; }
.animate-fadeInDown { animation: fadeInDown 0.4s ease forwards; }
.animate-scaleIn { animation: scaleIn 0.3s ease forwards; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s ease-in-out infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-shimmer {
    background: linear-gradient(90deg, transparent, var(--cyan-20), transparent);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Animation Delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Animation Durations */
.duration-fast { animation-duration: 0.15s; }
.duration-normal { animation-duration: 0.3s; }
.duration-slow { animation-duration: 0.5s; }
.duration-slower { animation-duration: 1s; }

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
