/* ========================================
   ANIMATIONS UTILITIES
   ======================================== */

/* ----- 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);
    }
}

@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;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIn {
    from {
        transform: rotate(-180deg) scale(0.5);
        opacity: 0;
    }
    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinSlow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes ping {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    75%, 100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ----- ANIMATION UTILITY CLASSES ----- */

/* Fade In */
.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}
.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}
.animate-fade-in-down {
    animation: fadeInDown 0.5s ease forwards;
}
.animate-fade-in-left {
    animation: fadeInLeft 0.5s ease forwards;
}
.animate-fade-in-right {
    animation: fadeInRight 0.5s ease forwards;
}

/* Slide In */
.animate-slide-in-up {
    animation: slideInUp 0.6s ease forwards;
}
.animate-slide-in-down {
    animation: slideInDown 0.6s ease forwards;
}
.animate-slide-in-left {
    animation: slideInLeft 0.6s ease forwards;
}
.animate-slide-in-right {
    animation: slideInRight 0.6s ease forwards;
}

/* Scale & Rotate */
.animate-scale-in {
    animation: scaleIn 0.4s ease forwards;
}
.animate-rotate-in {
    animation: rotateIn 0.6s ease forwards;
}

/* Interactive */
.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}
.animate-bounce {
    animation: bounce 1s ease infinite;
}
.animate-shake {
    animation: shake 0.5s ease;
}
.animate-spin {
    animation: spin 1s linear infinite;
}
.animate-spin-slow {
    animation: spin 3s linear infinite;
}
.animate-ping {
    animation: ping 1.5s ease-in-out infinite;
}
.animate-float {
    animation: float 3s ease-in-out infinite;
}
.animate-shimmer {
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}
.animate-gradient {
    background-size: 200% 200%;
    animation: gradientMove 3s ease infinite;
}

/* Animation Delays */
.delay-0 { animation-delay: 0s; }
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* Animation Durations */
.duration-100 { animation-duration: 0.1s; }
.duration-200 { animation-duration: 0.2s; }
.duration-300 { animation-duration: 0.3s; }
.duration-400 { animation-duration: 0.4s; }
.duration-500 { animation-duration: 0.5s; }
.duration-600 { animation-duration: 0.6s; }
.duration-700 { animation-duration: 0.7s; }
.duration-800 { animation-duration: 0.8s; }
.duration-900 { animation-duration: 0.9s; }
.duration-1000 { animation-duration: 1s; }
.duration-1500 { animation-duration: 1.5s; }
.duration-2000 { animation-duration: 2s; }

/* Animation Fill Mode */
.fill-none { animation-fill-mode: none; }
.fill-forwards { animation-fill-mode: forwards; }
.fill-backwards { animation-fill-mode: backwards; }
.fill-both { animation-fill-mode: both; }

/* Animation Iteration */
.iteration-1 { animation-iteration-count: 1; }
.iteration-infinite { animation-iteration-count: infinite; }

/* Animation Direction */
.direction-normal { animation-direction: normal; }
.direction-reverse { animation-direction: reverse; }
.direction-alternate { animation-direction: alternate; }
.direction-alternate-reverse { animation-direction: alternate-reverse; }

/* Animation Play State */
.paused { animation-play-state: paused; }
.running { animation-play-state: running; }

/* Hover Animations */
.hover\:animate-pulse:hover {
    animation: pulse 2s ease-in-out infinite;
}
.hover\:animate-bounce:hover {
    animation: bounce 1s ease infinite;
}
.hover\:animate-shake:hover {
    animation: shake 0.5s ease;
}
.hover\:animate-float:hover {
    animation: float 3s ease-in-out infinite;
}
.hover\:animate-scale-in:hover {
    animation: scaleIn 0.4s ease forwards;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .animate-fade-in-up,
    .animate-fade-in-down,
    .animate-fade-in-left,
    .animate-fade-in-right,
    .animate-slide-in-up,
    .animate-slide-in-down,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-scale-in,
    .animate-rotate-in,
    .animate-pulse,
    .animate-bounce,
    .animate-float {
        animation: none !important;
        transition: none !important;
    }
}