/* أداة قلب العملة — معزولة عن تنسيقات صدفة العامة. */
.coin-container {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
}

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

.coin-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
}

.coin-front-face,
.coin-back-face {
    background-color: #fcd34d;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
    border: 1px solid #f8a241;
}

.coin-front-face {
    transform: translateZ(10px);
}

.coin-back-face {
    transform: rotateY(180deg) translateZ(10px);
}

.coin-front-face img,
.coin-back-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.coin-edge-layer {
    background: #f8a241;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: visible;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

@keyframes coinToss {
    0% {
        transform: translateY(0) scale(1);
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }
    50% {
        transform: translateY(-200px) scale(1.3);
        animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

.toss-animation {
    animation: coinToss 1s forwards;
}

@keyframes coinBounce {
    0% { transform: translateY(0); }
    40% { transform: translateY(-30px); }
    65% { transform: translateY(0); }
    80% { transform: translateY(-15px); }
    100% { transform: translateY(0); }
}

.bounce-anim {
    animation: coinBounce 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
