/* Coin Flip Game — Premium */

.coinflip-container {
    display: flex;
    flex-direction: row-reverse;
}

.coinflip-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 40px 20px;
    background: rgba(15, 33, 46, 0.4);
    min-height: 420px;
}

.coin-display {
    width: 150px;
    height: 150px;
    perspective: 1000px;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.coin.flipping { animation: coinFlip 1s ease-in-out; }
.coin.heads { transform: rotateY(0deg); }
.coin.tails { transform: rotateY(180deg); }

@keyframes coinFlip {
    0% { transform: rotateY(0deg) scale(1); }
    25% { transform: rotateY(900deg) scale(1.15); }
    75% { transform: rotateY(1620deg) scale(1.05); }
    100% { transform: rotateY(1800deg) scale(1); }
}

.coin-front, .coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    backface-visibility: hidden;
    border: 3px solid;
}

.coin-front {
    background: linear-gradient(145deg, #ff8c33, #e05500);
    border-color: rgba(255, 170, 85, 0.4);
}

.coin-back {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    border-color: rgba(96, 165, 250, 0.4);
    transform: rotateY(180deg);
}

.coinflip-result {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    min-height: 28px;
    color: var(--text-tertiary);
}

.coinflip-controls {
    width: 280px;
    min-width: 280px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(26, 44, 56, 0.5);
    border-right: 1px solid rgba(255,255,255,0.06);
}

.coin-buttons {
    display: flex;
    gap: 8px;
}

.btn-coin-choice {
    flex: 1;
    font-size: 13px !important;
    padding: 12px 8px !important;
}

.btn-coin-choice[data-side="heads"] {
    background: var(--accent);
    color: white;
}

.btn-coin-choice[data-side="tails"] {
    background: var(--blue);
    color: white;
}
