/**
 * NBA Guess - Animation Keyframes
 * All animations for cards, stats, and interactions
 */

/* Card Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stat Pill Flip Animation */
@keyframes flipCard {
    0% {
        transform: rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: rotateY(90deg);
        opacity: 0.5;
    }
    100% {
        transform: rotateY(0deg);
        opacity: 1;
    }
}

/* Stat Reveal Animation */
@keyframes statReveal {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    }
}

@keyframes glowPulseAmber {
    0%, 100% {
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
    }
}

/* Bounce In */
@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade Out */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Shake Animation (for errors) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Confetti Fall */
@keyframes confettiFall {
    from {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Arrow Bounce */
@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Utility Animation Classes */
.animate-slide-down {
    animation: slideDown 0.4s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-flip {
    animation: flipCard 0.6s ease-in-out;
}

.animate-stat-reveal {
    animation: statReveal 0.3s ease-out forwards;
    opacity: 0;
}

.animate-bounce-in {
    animation: bounceIn 0.5s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-out {
    animation: fadeOut 0.3s ease-in;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-glow-green {
    animation: glowPulse 2s ease-in-out infinite;
}

.animate-glow-amber {
    animation: glowPulseAmber 2s ease-in-out infinite;
}

.animate-arrow-bounce {
    animation: arrowBounce 1s ease-in-out infinite;
}

/* Transition Utilities */
.transition-all-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-transform {
    transition: transform 0.2s ease-out;
}

.transition-colors {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Hover Transforms */
.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-scale:hover {
    transform: scale(1.02);
}

.active-press:active {
    transform: scale(0.98);
}

/* Menu Slide Animation (from left) */
.menu-slide-transition {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.menu-slide-enter {
    transform: translateX(-100%);
    opacity: 0;
}

.menu-slide-visible {
    transform: translateX(0);
    opacity: 1;
}
