/* Animation Overlays */
.coin-animation-overlay,
.dice-animation-overlay,
.pro-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    flex-direction: column;
}

.coin-container,
.dice-container,
.pro-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.spinning-coin {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 120px;
    font-weight: 900;
    font-family: 'Times New Roman', serif;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
}

.spinning-coin.heads {
    background: linear-gradient(45deg, #ffd700, #ffed4a, #f39c12);
    border: 8px solid #cc9900;
    color: #8B4513;
    text-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.5),
        -2px -2px 4px rgba(255, 255, 255, 0.3);
}

.spinning-coin.tails {
    background: linear-gradient(45deg, #e8e8e8, #c0c0c0, #a0a0a0);
    border: 8px solid #888888;
    color: #2c3e50;
    text-shadow:
        4px 4px 8px rgba(0, 0, 0, 0.5),
        -2px -2px 4px rgba(255, 255, 255, 0.4);
}

.spinning-dice,
.spinning-pro {
    width: 200px;
    height: 200px;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.8));
}

.coin-gif,
.dice-gif,
.pro-gif {
    width: 100%;
    height: 100%;
    border-radius: 25px;
    object-fit: cover;
}

.coin-gif {
    border-radius: 50%;
}

.animation-text {
    font-size: 28px;
    color: #90EE90;
    text-align: center;
    margin-bottom: 20px;
    animation: pulse 1s infinite ease-in-out;
}

.animation-subtext {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-bottom: 30px;
}

.bet-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bet-amount-display {
    font-size: 32px;
    color: #90EE90;
    font-weight: bold;
    margin-bottom: 10px;
}

.bet-choice-display {
    font-size: 20px;
    color: white;
    margin-bottom: 10px;
}

.potential-win {
    font-size: 18px;
    color: #2ed573;
    font-weight: bold;
}

/* Keyframe Animations */
@keyframes simpleFlip {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(360deg) scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

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

/* Chain Switching Animation */
.chain-switch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
    opacity: 0;
    transition: none;
}

.chain-switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.chain-switch-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    animation: chainSwitchPulse 1s ease-in-out infinite;
}

.chain-switch-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.chain-switch-text {
    font-size: 24px;
    color: #90EE90;
    text-align: center;
    font-weight: 600;
    animation: pulse 1s infinite ease-in-out;
}

@keyframes chainSwitchPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(144, 238, 144, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(144, 238, 144, 0);
    }
}

/* Responsive animations */
@media (max-width: 768px) {
    .spinning-coin, 
    .spinning-dice, 
    .spinning-pro {
        width: 150px;
        height: 150px;
        font-size: 90px;
    }

    .animation-text {
        font-size: 22px;
    }

    .bet-amount-display {
        font-size: 24px;
    }

    .chain-switch-logo {
        width: 100px;
        height: 100px;
    }

    .chain-switch-logo img {
        width: 60px;
        height: 60px;
    }

    .chain-switch-text {
        font-size: 20px;
    }
}
