/* ============================================
   E-MOJI-FIED - ANIMATIONS
   ============================================ */

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In with Scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Neon Pulse Animation */
@keyframes neonPulse {
    0%, 100% {
        text-shadow: 
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 40px currentColor,
            0 0 80px currentColor;
    }
    50% {
        text-shadow: 
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 40px currentColor;
    }
}

/* Emoji Float Animation */
@keyframes emojiFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    75% {
        transform: translateY(-5px) rotate(-2deg);
    }
}

/* Heart Beat Animation */
@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(0.9);
    }
}

/* Shake Animation (for wrong answers) */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

/* Slide In from Top */
@keyframes slideInTop {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In from Bottom */
@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rotate In */
@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Glow Pulse */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px currentColor;
    }
    50% {
        box-shadow: 0 0 40px currentColor, 0 0 60px currentColor;
    }
}

/* Wiggle Animation */
@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Flash Animation */
@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0;
    }
}

/* Tada Animation (celebration) */
@keyframes tada {
    0% {
        transform: scale(1) rotate(0deg);
    }
    10%, 20% {
        transform: scale(0.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.1) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.1) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

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

/* Apply shake animation to elements */
.animate-shake {
    animation: shake 0.5s ease;
}

/* Apply bounce animation */
.animate-bounce {
    animation: bounce 0.6s ease;
}

/* Apply wiggle animation */
.animate-wiggle {
    animation: wiggle 0.5s ease;
}

/* Apply tada celebration animation */
.animate-tada {
    animation: tada 1s ease;
}

/* Apply glow pulse */
.animate-glow {
    animation: glowPulse 1.5s ease-in-out infinite;
}

/* Apply zoom in */
.animate-zoom {
    animation: zoomIn 0.5s ease;
}

/* Apply flash */
.animate-flash {
    animation: flash 1s ease;
}

/* ============================================
   TRANSITION UTILITIES
   ============================================ */

.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

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

.slide-up {
    animation: slideUp 0.4s ease forwards;
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* ============================================
   LOADING SPINNER (for future use)
   ============================================ */

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-input);
    border-top: 4px solid var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ============================================
   CONFETTI PARTICLE ANIMATION
   ============================================ */

.confetti-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--neon-pink);
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   HOVER EFFECTS
   ============================================ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.hover-glow:hover {
    box-shadow: 0 0 30px currentColor;
}

/* ============================================
   SPECIAL EFFECTS
   ============================================ */

/* Success Celebration Effect */
.celebrate {
    animation: tada 1s ease, glowPulse 1s ease;
}

/* Error Shake Effect */
.error-shake {
    animation: shake 0.5s ease;
}

/* Hint Appear Effect */
.hint-appear {
    animation: slideInBottom 0.5s ease;
}

/* Level Complete Effect */
.level-complete {
    animation: zoomIn 0.5s ease, bounce 0.6s ease 0.5s;
}
