/* Animations & Juice */

/* Shake Effect for big bets/losses */
@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.shake {
    animation: shake 0.5s;
    animation-iteration-count: 1;
}

/* Win Flash */
@keyframes flash-win {
    0% {
        background-color: var(--bg-card);
    }

    50% {
        background-color: rgba(92, 184, 92, 0.2);
    }

    100% {
        background-color: var(--bg-card);
    }
}

.flash-win {
    animation: flash-win 0.3s ease-out;
}

/* Loss Flash */
@keyframes flash-loss {
    0% {
        background-color: var(--bg-card);
    }

    50% {
        background-color: rgba(217, 83, 79, 0.2);
    }

    100% {
        background-color: var(--bg-card);
    }
}

.flash-loss {
    animation: flash-loss 0.3s ease-out;
}

/* Floating Text (Profit) */
.floating-text {
    position: absolute;
    font-weight: bold;
    font-size: 14px;
    pointer-events: none;
    animation: floatUp 1.5s ease-out forwards;
    z-index: 1000;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px) scale(1.5);
        opacity: 0;
    }
}

/* Pulse for buttons */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 158, 197, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(59, 158, 197, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 158, 197, 0);
    }
}

.pulse {
    animation: pulse 1s infinite;
}