/* ========================================
   Tower Legend - Animations (Jungle Theme)
   ======================================== */

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(32, 227, 138, 0.3); }
    50% { box-shadow: 0 0 35px rgba(32, 227, 138, 0.6), 0 0 60px rgba(32, 227, 138, 0.2); }
}

@keyframes cashout-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(232, 178, 48, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(232, 178, 48, 0.5), 0 0 40px rgba(232, 178, 48, 0.15); }
}

@keyframes floor-activate {
    0% { transform: scaleY(0.8); opacity: 0; }
    50% { transform: scaleY(1.02); }
    100% { transform: scaleY(1); opacity: 1; }
}

@keyframes floor-explode {
    0% { transform: scale(1); }
    20% { transform: scale(1.05); }
    50% { transform: scale(0.95); filter: brightness(2); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes bomb-selected {
    0% { transform: scale(1); }
    10% { transform: scale(1.15); filter: brightness(3); }
    20% { transform: scale(0.9); }
    30% { transform: scale(1.1); }
    50% { transform: scale(1); filter: brightness(1.5); }
    100% { transform: scale(1); filter: brightness(1); }
}

@keyframes result-appear {
    0% { transform: scale(0.5) translateY(50px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

@keyframes trophy-bounce {
    0% { transform: scale(0) rotate(-30deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    70% { transform: scale(0.9) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes skull-shake {
    0%, 100% { transform: translateX(0) rotate(0); }
    10% { transform: translateX(-8px) rotate(-5deg); }
    20% { transform: translateX(8px) rotate(5deg); }
    30% { transform: translateX(-6px) rotate(-3deg); }
    40% { transform: translateX(6px) rotate(3deg); }
    50% { transform: translateX(-4px) rotate(-2deg); }
    60% { transform: translateX(4px) rotate(2deg); }
}

@keyframes confetti-fall {
    0% { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

@keyframes float-up {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-60px) scale(1.5); opacity: 0; }
}

@keyframes shake-screen {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-3px, -2px); }
    20% { transform: translate(3px, 2px); }
    30% { transform: translate(-2px, 3px); }
    40% { transform: translate(2px, -3px); }
    50% { transform: translate(-1px, 1px); }
    60% { transform: translate(1px, -1px); }
}

@keyframes slide-up-in {
    0% { transform: translateX(-50%) translateY(20px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

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

@keyframes vine-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

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

/* Utility Classes */
.animate-shake { animation: shake-screen 0.5s ease; }
.animate-pop { animation: multiplier-pop 0.4s ease; }

/* Floating text */
.floating-text {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 50;
    text-shadow: 0 0 10px currentColor;
    animation: float-up 1.2s ease-out forwards;
}

.floating-text.green { color: #5cdb7f; text-shadow: 0 0 12px rgba(92, 219, 127, 0.6); }
.floating-text.gold { color: #f5cc50; text-shadow: 0 0 12px rgba(245, 204, 80, 0.6); }
.floating-text.red { color: #f07070; text-shadow: 0 0 12px rgba(240, 112, 112, 0.6); }

/* Confetti */
.confetti-piece {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: confetti-fall linear forwards;
    z-index: 2000;
    pointer-events: none;
}

/* Explosion particles */
.explosion-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
}

/* Leaves decoration sway */
.leaves-left {
    animation: vine-sway 8s ease-in-out infinite;
    transform-origin: top left;
}

.leaves-right {
    animation: vine-sway 10s ease-in-out infinite reverse;
    transform-origin: top right;
}
