@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translate3d(-100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translate3d(100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
}

@keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    }
    0% {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }
    40% {
        transform: scale3d(0.9, 0.9, 0.9);
    }
    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }
    80% {
        transform: scale3d(0.97, 0.97, 0.97);
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideInUp {
    from {
        transform: translate3d(0, 100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate3d(0, 0, 1, -200deg);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes flipInX {
    from {
        opacity: 0;
        transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
        animation-timing-function: ease-in;
    }
    40% {
        transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
        animation-timing-function: ease-in;
    }
    60% {
        opacity: 1;
        transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
    }
    80% {
        transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
    }
    to {
        opacity: 1;
        transform: perspective(400px);
    }
}

@keyframes lightSpeedIn {
    from {
        opacity: 0;
        transform: translate3d(100%, 0, 0) skewX(-30deg);
    }
    60% {
        opacity: 1;
        transform: skewX(20deg);
    }
    80% {
        transform: skewX(-5deg);
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

/* Attention Seekers */
@keyframes bounce {
    from, 20%, 53%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -30px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes flash {
    from, 50%, to {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

@keyframes pulse {
    from {
        transform: scale3d(1, 1, 1);
    }
    50% {
        transform: scale3d(1.05, 1.05, 1.05);
    }
    to {
        transform: scale3d(1, 1, 1);
    }
}

@keyframes rubberBand {
    from {
        transform: scale3d(1, 1, 1);
    }
    30% {
        transform: scale3d(1.25, 0.75, 1);
    }
    40% {
        transform: scale3d(0.75, 1.25, 1);
    }
    50% {
        transform: scale3d(1.15, 0.85, 1);
    }
    65% {
        transform: scale3d(0.95, 1.05, 1);
    }
    75% {
        transform: scale3d(1.05, 0.95, 1);
    }
    to {
        transform: scale3d(1, 1, 1);
    }
}

@keyframes shake {
    from, to {
        transform: translate3d(0, 0, 0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translate3d(-10px, 0, 0);
    }
    20%, 40%, 60%, 80% {
        transform: translate3d(10px, 0, 0);
    }
}

@keyframes swing {
    20% {
        transform: rotate3d(0, 0, 1, 15deg);
    }
    40% {
        transform: rotate3d(0, 0, 1, -10deg);
    }
    60% {
        transform: rotate3d(0, 0, 1, 5deg);
    }
    80% {
        transform: rotate3d(0, 0, 1, -5deg);
    }
    to {
        transform: rotate3d(0, 0, 1, 0deg);
    }
}

@keyframes tada {
    from {
        transform: scale3d(1, 1, 1);
    }
    10%, 20% {
        transform: scale3d(0.9, 0.9, 0.9) rotate3d(0, 0, 1, -3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
    }
    40%, 60%, 80% {
        transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
    }
    to {
        transform: scale3d(1, 1, 1);
    }
}

@keyframes wobble {
    from {
        transform: translate3d(0, 0, 0);
    }
    15% {
        transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
    }
    30% {
        transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
    }
    45% {
        transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
    }
    60% {
        transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
    }
    75% {
        transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

@keyframes jello {
    from, 11.1%, to {
        transform: translate3d(0, 0, 0);
    }
    22.2% {
        transform: skewX(-12.5deg) skewY(-12.5deg);
    }
    33.3% {
        transform: skewX(6.25deg) skewY(6.25deg);
    }
    44.4% {
        transform: skewX(-3.125deg) skewY(-3.125deg);
    }
    55.5% {
        transform: skewX(1.5625deg) skewY(1.5625deg);
    }
    66.6% {
        transform: skewX(-0.78125deg) skewY(-0.78125deg);
    }
    77.7% {
        transform: skewX(0.390625deg) skewY(0.390625deg);
    }
    88.8% {
        transform: skewX(-0.1953125deg) skewY(-0.1953125deg);
    }
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

/* Morphing Animations */
@keyframes morphTocircle {
    0% {
        border-radius: 10px;
    }
    100% {
        border-radius: 50%;
    }
}

@keyframes morphToSquare {
    0% {
        border-radius: 50%;
    }
    100% {
        border-radius: 10px;
    }
}

/* Gradient Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes rainbowGradient {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Particle Effects */
@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading Animations */
@keyframes loading {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes loadingBars {
    0%, 40%, 100% {
        transform: scaleY(0.4);
    }
    20% {
        transform: scaleY(1);
    }
}

/* Glow Effects */
@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
}

@keyframes neonGlow {
    0%, 100% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor;
    }
    50% {
        text-shadow: 
            0 0 2px currentColor,
            0 0 5px currentColor,
            0 0 8px currentColor;
    }
}

/* Typing Animation */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blinkCaret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: currentColor;
    }
}

/* 3D Animations */
@keyframes rotate3D {
    0% {
        transform: rotateX(0) rotateY(0);
    }
    50% {
        transform: rotateX(180deg) rotateY(180deg);
    }
    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

@keyframes cube3D {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }
    25% {
        transform: rotateX(90deg) rotateY(0deg);
    }
    50% {
        transform: rotateX(90deg) rotateY(90deg);
    }
    75% {
        transform: rotateX(0deg) rotateY(90deg);
    }
    100% {
        transform: rotateX(0deg) rotateY(0deg);
    }
}

@keyframes flipCard {
    0% {
        transform: rotateY(0);
    }
    50% {
        transform: rotateY(-90deg);
    }
    100% {
        transform: rotateY(0);
    }
}

/* Wave Animations */
@keyframes wave {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Slide Animations */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Matrix Animation */
@keyframes matrix {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Holographic Effect */
@keyframes holographic {
    0% {
        background-position: 0% 50%;
        transform: rotateY(0deg);
    }
    25% {
        background-position: 100% 50%;
        transform: rotateY(90deg);
    }
    50% {
        background-position: 100% 100%;
        transform: rotateY(180deg);
    }
    75% {
        background-position: 0% 100%;
        transform: rotateY(270deg);
    }
    100% {
        background-position: 0% 50%;
        transform: rotateY(360deg);
    }
}

/* ===== UTILITY ANIMATION CLASSES ===== */

/* Entrance Animations */
.animate-fadeInDown {
    animation: fadeInDown 0.8s ease-out;
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.8s ease-out;
}

.animate-fadeInRight {
    animation: fadeInRight 0.8s ease-out;
}

.animate-zoomIn {
    animation: zoomIn 0.6s ease-out;
}

.animate-bounceIn {
    animation: bounceIn 1s ease-out;
}

.animate-slideInDown {
    animation: slideInDown 0.6s ease-out;
}

.animate-slideInUp {
    animation: slideInUp 0.6s ease-out;
}

.animate-rotateIn {
    animation: rotateIn 0.8s ease-out;
}

.animate-flipInX {
    animation: flipInX 0.8s ease-out;
}

.animate-lightSpeedIn {
    animation: lightSpeedIn 1s ease-out;
}


.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-flash {
    animation: flash 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-rubberBand {
    animation: rubberBand 1s;
}

.animate-shake {
    animation: shake 0.82s;
}

.animate-swing {
    animation: swing 1s;
}

.animate-tada {
    animation: tada 1s;
}

.animate-wobble {
    animation: wobble 1s;
}

.animate-jello {
    animation: jello 1s;
}

.animate-heartBeat {
    animation: heartBeat 1.3s ease-in-out infinite;
}


.animate-morphToCircle {
    animation: morphTocircle 0.5s ease-in-out;
}

.animate-morphToSquare {
    animation: morphToSquare 0.5s ease-in-out;
}

/* Gradient Animations */
.animate-gradientShift {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
}

.animate-rainbowGradient {
    background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
    background-size: 400% 400%;
    animation: rainbowGradient 6s ease infinite;
}


.animate-glowPulse {
    animation: glowPulse 2s ease-in-out infinite;
}

.animate-neonGlow {
    animation: neonGlow 2s ease-in-out infinite;
}


.animate-rotate3D {
    animation: rotate3D 3s linear infinite;
    transform-style: preserve-3d;
}

.animate-cube3D {
    animation: cube3D 4s linear infinite;
    transform-style: preserve-3d;
}

.animate-flipCard {
    animation: flipCard 1s ease-in-out;
    transform-style: preserve-3d;
}


.animate-loading {
    animation: loading 1s linear infinite;
}

.animate-loadingDots::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    margin-left: 4px;
    animation: loadingDots 1.4s infinite ease-in-out;
}

.animate-loadingBars {
    animation: loadingBars 1.2s infinite ease-in-out;
}


.animate-holographic {
    background: linear-gradient(45deg, #ff0080, #00ff80, #8000ff, #ff8000);
    background-size: 400% 400%;
    animation: holographic 4s ease-in-out infinite;
}

.animate-typing {
    overflow: hidden;
    border-right: 2px solid currentColor;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blinkCaret 0.75s step-end infinite;
}

.animate-wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: wave 2s infinite;
}

.animate-ripple {
    position: relative;
    overflow: hidden;
}

.animate-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    animation: ripple 0.6s linear;
}


.hover-grow:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.hover-shrink:hover {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(360deg);
    transition: transform 0.5s ease;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(10deg);
    transition: transform 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-10px);
    transition: transform 0.3s ease;
}

.hover-shadow:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    transition: box-shadow 0.3s ease;
}


.scroll-fadeIn {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.scroll-fadeIn.in-view {
    opacity: 1;
    transform: translateY(0);
}

.scroll-slideInLeft {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.scroll-slideInLeft.in-view {
    opacity: 1;
    transform: translateX(0);
}

.scroll-slideInRight {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.scroll-slideInRight.in-view {
    opacity: 1;
    transform: translateX(0);
}

.scroll-zoomIn {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out;
}

.scroll-zoomIn.in-view {
    opacity: 1;
    transform: scale(1);
}


.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; }


.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.5s; }
.duration-slow { animation-duration: 0.8s; }
.duration-slower { animation-duration: 1.2s; }

.ease-in { animation-timing-function: ease-in; }
.ease-out { animation-timing-function: ease-out; }
.ease-in-out { animation-timing-function: ease-in-out; }
.ease-bounce { animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.ease-elastic { animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.infinite { animation-iteration-count: infinite; }
.once { animation-iteration-count: 1; }
.twice { animation-iteration-count: 2; }


.paused { animation-play-state: paused; }
.running { animation-play-state: running; }