/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes ring-land {
    0%   {
        box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9), 0 0 40px rgba(232, 184, 48, 0.9);
        transform: translate(-50%, -50%) rotate(var(--item-angle)) translateY(-128px) rotate(calc(-1 * var(--item-angle))) scale(1.25);
    }
    55%  {
        box-shadow: 0 0 0 3px rgba(232, 184, 48, 0.85), 0 0 55px rgba(232, 184, 48, 0.65);
        transform: translate(-50%, -50%) rotate(var(--item-angle)) translateY(-128px) rotate(calc(-1 * var(--item-angle))) scale(1.05);
    }
    100% {
        box-shadow: 0 0 18px rgba(232, 184, 48, 0.48);
        transform: translate(-50%, -50%) rotate(var(--item-angle)) translateY(-128px) rotate(calc(-1 * var(--item-angle))) scale(1.0);
    }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes round-value-reveal {
    0% {
        transform: scale(0.3) rotate(-20deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.3) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(68, 204, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 60px rgba(68, 204, 136, 0.6), 0 0 100px rgba(68, 204, 136, 0.2);
    }
}

@keyframes danger-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(204, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 60px rgba(204, 68, 68, 0.6), 0 0 100px rgba(204, 68, 68, 0.2);
    }
}

@keyframes winner-flash {
    0%, 100% {
        box-shadow: 0 0 10px rgba(221, 170, 51, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(221, 170, 51, 0.8), 0 0 80px rgba(221, 170, 51, 0.3);
    }
}

@keyframes slide-in-coins {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal animation */
.round-value-container.revealing {
    animation: glow-pulse 1.5s ease-in-out;
}

.round-value-container.revealing .round-value {
    animation: round-value-reveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.round-value-container.danger-reveal {
    animation: danger-glow-pulse 1.5s ease-in-out;
}

/* Coin grid animation */
.coin-grid-wrapper.open .coin-btn {
    animation: slide-in-coins 0.2s ease forwards;
}

.coin-grid-wrapper.open .coin-btn:nth-child(1) { animation-delay: 0.02s; }
.coin-grid-wrapper.open .coin-btn:nth-child(2) { animation-delay: 0.04s; }
.coin-grid-wrapper.open .coin-btn:nth-child(3) { animation-delay: 0.06s; }
.coin-grid-wrapper.open .coin-btn:nth-child(4) { animation-delay: 0.08s; }
.coin-grid-wrapper.open .coin-btn:nth-child(5) { animation-delay: 0.1s; }
.coin-grid-wrapper.open .coin-btn:nth-child(6) { animation-delay: 0.12s; }
.coin-grid-wrapper.open .coin-btn:nth-child(7) { animation-delay: 0.14s; }
.coin-grid-wrapper.open .coin-btn:nth-child(8) { animation-delay: 0.16s; }
.coin-grid-wrapper.open .coin-btn:nth-child(9) { animation-delay: 0.18s; }
.coin-grid-wrapper.open .coin-btn:nth-child(10) { animation-delay: 0.2s; }
.coin-grid-wrapper.open .coin-btn:nth-child(11) { animation-delay: 0.22s; }
.coin-grid-wrapper.open .coin-btn:nth-child(12) { animation-delay: 0.24s; }

/* Winner panel flash */
.player-panel.round-winner .player-panel-inner {
    animation: winner-flash 0.6s ease-in-out 3;
}

/* Floating particles (ambient) */
@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) translateX(-5px);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-25px) translateX(5px);
        opacity: 0.5;
    }
}
