/* ===== MODAL ANIMATIONS ===== */

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
}

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

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

/* ===== MOBILE MENU ANIMATIONS ===== */

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ===== LOADING ANIMATIONS ===== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* ===== HOVER ANIMATIONS ===== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(30, 144, 255, 0.8), 0 0 30px rgba(30, 144, 255, 0.6);
    }
}

/* ===== SCROLL ANIMATIONS ===== */

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== BUTTON ANIMATIONS ===== */

@keyframes buttonPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(30, 144, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0);
    }
}

@keyframes buttonShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ===== FORM ANIMATIONS ===== */

@keyframes formFieldFocus {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes formError {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

@keyframes formSuccess {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== CARD ANIMATIONS ===== */

@keyframes cardHover {
    0% {
        transform: translateY(0) rotateX(0);
    }
    100% {
        transform: translateY(-10px) rotateX(5deg);
    }
}

@keyframes cardFlip {
    0% {
        transform: rotateY(0);
    }
    100% {
        transform: rotateY(180deg);
    }
}

/* ===== ICON ANIMATIONS ===== */

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

@keyframes iconBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes iconWiggle {
    0%, 7% {
        transform: rotateZ(0);
    }
    15% {
        transform: rotateZ(-15deg);
    }
    20% {
        transform: rotateZ(10deg);
    }
    25% {
        transform: rotateZ(-10deg);
    }
    30% {
        transform: rotateZ(6deg);
    }
    35% {
        transform: rotateZ(-4deg);
    }
    40%, 100% {
        transform: rotateZ(0);
    }
}

/* ===== TEXT ANIMATIONS ===== */

@keyframes textReveal {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0% 0 0);
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(30, 144, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(30, 144, 255, 0.8), 0 0 30px rgba(30, 144, 255, 0.6);
    }
}

@keyframes textSlideIn {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== BACKGROUND ANIMATIONS ===== */

@keyframes backgroundShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes backgroundPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ===== PARTICLE ANIMATIONS ===== */

@keyframes particleFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes particleBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* ===== UTILITY ANIMATION CLASSES ===== */

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

.animate-bounce {
    animation: bounce 1s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

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

.animate-slide-in {
    animation: slideInUp 0.6s ease-out;
}

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

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-shake {
    animation: buttonShake 0.5s ease-in-out;
}

.animate-wiggle {
    animation: iconWiggle 1s ease-in-out;
}

/* ===== 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;
}

.delay-1000 {
    animation-delay: 1000ms;
}

/* ===== ANIMATION DURATIONS ===== */

.duration-75 {
    animation-duration: 75ms;
}

.duration-100 {
    animation-duration: 100ms;
}

.duration-150 {
    animation-duration: 150ms;
}

.duration-200 {
    animation-duration: 200ms;
}

.duration-300 {
    animation-duration: 300ms;
}

.duration-500 {
    animation-duration: 500ms;
}

.duration-700 {
    animation-duration: 700ms;
}

.duration-1000 {
    animation-duration: 1000ms;
}

/* ===== ANIMATION EASING ===== */

.ease-linear {
    animation-timing-function: linear;
}

.ease-in {
    animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.ease-out {
    animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.ease-in-out {
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-bounce {
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ===== ANIMATION FILL MODES ===== */

.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 COUNTS ===== */

.iterate-once {
    animation-iteration-count: 1;
}

.iterate-infinite {
    animation-iteration-count: infinite;
}

.iterate-twice {
    animation-iteration-count: 2;
}

.iterate-thrice {
    animation-iteration-count: 3;
}

/* ===== RESPONSIVE ANIMATIONS ===== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (max-width: 768px) {
    .animate-float {
        animation: none;
    }
    
    .animate-glow {
        animation: none;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */

.animate-gpu {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.animate-will-change {
    will-change: transform, opacity;
}

/* ===== CUSTOM ANIMATION PROPERTIES ===== */

.animate-custom {
    --animation-duration: 1s;
    --animation-timing: ease-in-out;
    --animation-delay: 0s;
    --animation-iteration: 1;
    --animation-direction: normal;
    --animation-fill-mode: both;
    
    animation: var(--animation-name) var(--animation-duration) var(--animation-timing) var(--animation-delay) var(--animation-iteration) var(--animation-direction) var(--animation-fill-mode);
}

/* ===== ANIMATION PAUSE/RESUME ===== */

.animate-pause {
    animation-play-state: paused;
}

.animate-resume {
    animation-play-state: running;
}

/* ===== ANIMATION REVERSE ===== */

.animate-reverse {
    animation-direction: reverse;
}

.animate-alternate {
    animation-direction: alternate;
}

.animate-alternate-reverse {
    animation-direction: alternate-reverse;
}
