/* ===== Enhanced Animations ===== */
/* Modern animations and micro-interactions */

/* Page transitions */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-enter-active {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.page-transition-enter-to {
    opacity: 1;
    transform: translateY(0);
}

.page-transition-leave {
    opacity: 1;
    transform: translateY(0);
}

.page-transition-leave-active {
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.page-transition-leave-to {
    opacity: 0;
    transform: translateY(-20px);
}

/* Stagger animation for cards */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item.animate {
    animation: stagger-fade-in 0.4s ease-out forwards;
}

@keyframes stagger-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card hover animations */
.card-hover-lift {
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.card-hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-hover-scale {
    transition: transform 0.2s ease-out;
}

.card-hover-scale:hover {
    transform: scale(1.02);
}

.card-hover-glow {
    transition: box-shadow 0.3s ease-out;
}

.card-hover-glow:hover {
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

/* Button animations */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-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%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

.btn-pulse {
    animation: btn-pulse 2s ease-in-out infinite;
}

@keyframes btn-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
    }
}

.btn-bounce:active {
    animation: btn-bounce 0.3s ease-out;
}

@keyframes btn-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* Loading animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-in-left {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-in-up {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slide-in-down {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

/* Success/Error animations */
.success-checkmark {
    animation: success-checkmark 0.6s ease-out;
}

@keyframes success-checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.error-shake {
    animation: error-shake 0.5s ease-out;
}

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

/* Progress bar animations */
.progress-bar-animated .progress-fill {
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% {
        box-shadow: 0 0 8px var(--accent-glow);
    }
    50% {
        box-shadow: 0 0 16px var(--accent-glow);
    }
}

/* Number counter animation */
.number-counter {
    transition: transform 0.3s ease-out;
}

.number-counter.updated {
    animation: number-update 0.3s ease-out;
}

@keyframes number-update {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: var(--accent-primary);
    }
    100% {
        transform: scale(1);
    }
}

/* Badge animations */
.badge-pop {
    animation: badge-pop 0.3s ease-out;
}

@keyframes badge-pop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Tooltip animations */
.tooltip-enter {
    opacity: 0;
    transform: scale(0.8);
}

.tooltip-enter-active {
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.tooltip-enter-to {
    opacity: 1;
    transform: scale(1);
}

/* Modal animations */
.modal-backdrop-enter {
    opacity: 0;
}

.modal-backdrop-enter-active {
    transition: opacity 0.3s ease-out;
}

.modal-backdrop-enter-to {
    opacity: 1;
}

.modal-content-enter {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
}

.modal-content-enter-active {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.modal-content-enter-to {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Toast animations */
.toast-enter {
    opacity: 0;
    transform: translateX(100%);
}

.toast-enter-active {
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.toast-enter-to {
    opacity: 1;
    transform: translateX(0);
}

.toast-leave {
    opacity: 1;
    transform: translateX(0);
}

.toast-leave-active {
    transition: opacity 0.2s ease-in, transform 0.2s ease-in;
}

.toast-leave-to {
    opacity: 0;
    transform: translateX(100%);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Parallax effect (optional) */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Reduce motion for accessibility */
@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;
    }
}

