/* Custom Animations for AITrading */

/* Hover animations for buttons */
.btn-crypto:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-btn:hover {
    transform: translateX(-2px);
}

/* Pulse animation for loading states */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Bounce animation for success states */
@keyframes bounce {
    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);
    }
}

.bounce {
    animation: bounce 1s;
}

/* Shake animation for error states */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

.shake {
    animation: shake 0.5s;
}

/* Fade in with scale for cards */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-scale {
    animation: fadeInScale 0.5s ease-out;
}

/* Slide in from right for notifications */
@keyframes slideInRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

/* Slide in from left for sidebar */
@keyframes slideInLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

/* Rotate animation for refresh button */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate {
    animation: rotate 1s linear infinite;
}

/* Glow effect for important elements */
@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
    }
    100% {
        box-shadow: 0 0 5px rgba(16, 185, 129, 0.5);
    }
}

.glow {
    animation: glow 2s infinite;
}

/* Stagger animation delays */
.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

.animate-delay-4 {
    animation-delay: 0.4s;
}

.animate-delay-5 {
    animation-delay: 0.5s;
}

/* Custom animation for table rows */
.table-row {
    transition: all 0.3s ease;
}

.table-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Animation for dropdown menus */
.dropdown-menu {
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Animation for modal overlays */
.modal-overlay {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Animation for progress bars */
.progress-bar {
    animation: progressFill 2s ease-out;
}

@keyframes progressFill {
    0% {
        width: 0%;
    }
    100% {
        width: var(--progress-width);
    }
}

/* Animation for status badges */
.status-badge {
    transition: all 0.3s ease;
}

.status-badge:hover {
    transform: scale(1.05);
}

/* Animation for currency icons */
.currency-icon {
    transition: all 0.3s ease;
}

.currency-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Animation for chart elements */
.chart-container {
    animation: fadeInUp 0.8s ease-out;
}

/* Smooth transitions for all interactive elements */
button, .clickable, .interactive {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
