/* ========================================
   Animation Enhancements
   ======================================== */

/* ====== SMOOTH SCROLL ANIMATION ====== */
.scroll-smooth {
    scroll-behavior: smooth;
}

/* ====== REVEAL ANIMATIONS ====== */
@keyframes revealFromLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealFromRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealFromTop {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes revealFromBottom {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ====== REVEAL ON SCROLL ====== */
.reveal-left {
    animation: revealFromLeft 0.8s ease-out forwards;
    opacity: 0;
}

.reveal-right {
    animation: revealFromRight 0.8s ease-out forwards;
    opacity: 0;
}

.reveal-top {
    animation: revealFromTop 0.8s ease-out forwards;
    opacity: 0;
}

.reveal-bottom {
    animation: revealFromBottom 0.8s ease-out forwards;
    opacity: 0;
}

.reveal-scale {
    animation: scaleIn 0.8s ease-out forwards;
    opacity: 0;
}

/* ====== STAGGER ANIMATION ====== */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ====== BUTTON ANIMATIONS ====== */
@keyframes buttonHover {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-2px);
    }
}

@keyframes buttonClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}

.btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn:active {
    animation: buttonClick 0.4s ease-out;
}

/* ====== CARD ANIMATIONS ====== */
@keyframes cardFlip {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(10deg);
    }
}

.card {
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

/* ====== LOADING ANIMATIONS ====== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(
        90deg,
        rgba(99, 102, 241, 0.1) 25%,
        rgba(99, 102, 241, 0.2) 50%,
        rgba(99, 102, 241, 0.1) 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ====== PULSE ANIMATIONS ====== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ====== GLOW ANIMATIONS ====== */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4),
                    0 0 40px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.6),
                    0 0 60px rgba(99, 102, 241, 0.3);
    }
}

.glow-pulse {
    animation: glowPulse 3s ease-in-out infinite;
}

/* ====== GRADIENT ANIMATIONS ====== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

/* ====== BOUNCE ANIMATIONS ====== */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* ====== SLIDE ANIMATIONS ====== */
@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 slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* ====== FADE ANIMATIONS ====== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-out {
    animation: fadeOut 0.6s ease-out;
}

/* ====== ZOOM ANIMATIONS ====== */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.zoom-in {
    animation: zoomIn 0.6s ease-out;
}

.zoom-out {
    animation: zoomOut 0.6s ease-out;
}

/* ====== FLIP ANIMATIONS ====== */
@keyframes flipX {
    from {
        transform: perspective(1000px) rotateX(0deg);
        opacity: 1;
    }
    to {
        transform: perspective(1000px) rotateX(360deg);
        opacity: 1;
    }
}

.flip-x {
    animation: flipX 0.8s ease-out;
}

/* ====== WOBBLE ANIMATION ====== */
@keyframes wobble {
    0%, 100% {
        transform: translateX(0);
    }
    15% {
        transform: translateX(-5px) rotate(-2deg);
    }
    30% {
        transform: translateX(5px) rotate(2deg);
    }
    45% {
        transform: translateX(-5px) rotate(-2deg);
    }
    60% {
        transform: translateX(3px) rotate(1deg);
    }
    75% {
        transform: translateX(-2px) rotate(-1deg);
    }
}

.wobble {
    animation: wobble 0.8s ease-in-out;
}

/* ====== SHAKE ANIMATION ====== */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.6s ease-in-out;
}

/* ====== TRANSITION CLASSES ====== */
.transition-fast {
    transition: all 0.15s ease-in-out;
}

.transition-medium {
    transition: all 0.3s ease-in-out;
}

.transition-slow {
    transition: all 0.6s ease-in-out;
}

/* ====== TEXT ANIMATIONS ====== */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(99, 102, 241, 0.5),
                     0 0 10px rgba(99, 102, 241, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(99, 102, 241, 0.8),
                     0 0 25px rgba(99, 102, 241, 0.5);
    }
}

.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

/* ====== HIGHLIGHT ANIMATION ====== */
@keyframes highlight {
    0% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(99, 102, 241, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

.highlight-pulse {
    animation: highlight 1.5s ease-in-out;
}

/* ====== SMOOTH TRANSITIONS FOR INTERACTIVE ELEMENTS ====== */
button,
a,
input,
textarea,
select {
    transition: all 0.2s ease-in-out;
}

/* ====== BACKDROP ANIMATIONS ====== */
@keyframes backdropFade {
    from {
        backdrop-filter: blur(0px);
        opacity: 0;
    }
    to {
        backdrop-filter: blur(10px);
        opacity: 1;
    }
}

.backdrop-fade {
    animation: backdropFade 0.4s ease-out;
}
