/* === General Animations === */

/* Floating animation for splash */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-3deg);
    }
    75% {
        transform: translateY(-25px) rotate(3deg);
    }
}

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade in up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in scale */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Chip collect */
@keyframes collectChips {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.5);
    }
}

/* Pot increase pulse */
@keyframes potPulse {
    0% {
        transform: scale(1);
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    }
    50% {
        transform: scale(1.1);
        text-shadow: 0 0 50px rgba(212, 175, 55, 0.8);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    }
}

/* Button ready pulse */
@keyframes readyPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(212, 175, 55, 0.6);
    }
}

/* === Animation Classes === */
.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.3s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

.animate-pot-pulse {
    animation: potPulse 0.5s ease-in-out;
}

.btn-ready {
    animation: readyPulse 1.5s ease-in-out infinite;
}

/* === Screen Transitions === */
.screen {
    transition: opacity 0.4s ease;
}

.screen.fade-out {
    opacity: 0;
}

/* === Staggered Card Animations === */
.cards-container .card:nth-child(1) {
    animation-delay: 0s;
}

.cards-container .card:nth-child(2) {
    animation-delay: 0.15s;
}

/* === Result Animation === */
.result-content {
    animation: fadeInScale 0.4s ease forwards;
}

/* === Token Change Animation === */
@keyframes tokenChange {
    0% {
        transform: scale(1);
        color: var(--gold);
    }
    50% {
        transform: scale(1.2);
        color: var(--gold-light);
    }
    100% {
        transform: scale(1);
        color: var(--gold);
    }
}

.token-change {
    animation: tokenChange 0.4s ease;
}

/* === Win/Lose Result Specific === */
.result-win h2 {
    color: #38a169;
    text-shadow: 0 0 30px rgba(56, 161, 105, 0.5);
}

.result-lose h2 {
    color: #c53030;
    text-shadow: 0 0 30px rgba(197, 48, 48, 0.5);
}

.result-tie h2 {
    color: var(--gold);
}

/* === Loading Spinner === */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* === Chip Stack Animation === */
@keyframes stackChips {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.chip-stack {
    animation: stackChips 0.3s ease-out forwards;
}

