/* css/coin-flip.css */

:root {
    --coin-size: 200px;
    --coin-thickness: 15px;
    --coin-color: #ffc107; /* Gold */
    --coin-border: #d39e00;
}

body.dark-theme {
    --coin-color: #ffd700;
}

.coin-container {
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.coin {
    width: var(--coin-size);
    height: var(--coin-size);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    border: 4px solid var(--coin-border);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
}

.coin-face i {
    font-size: 4rem;
    margin-bottom: 10px;
}

/* Front Face (Cap) */
.coin-face.front {
    background: radial-gradient(circle at 30% 30%, #fff7cc, var(--coin-color));
    transform: rotateY(0deg) translateZ(calc(var(--coin-thickness) / 2));
    color: #5c4000;
}

/* Back Face (Pajura) */
.coin-face.back {
    background: radial-gradient(circle at 30% 30%, #fff7cc, var(--coin-color));
    transform: rotateY(180deg) translateZ(calc(var(--coin-thickness) / 2));
    color: #5c4000;
}

/* Edge Simulation (Simplified cylinder) */
.coin::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--coin-thickness);
    height: 100%;
    background-color: var(--coin-border);
    transform: translateX(-50%) rotateY(90deg);
    /* Not perfect 3D cylinder but good enough for front view spin */
    width: var(--coin-thickness);
    left: calc(50% - var(--coin-thickness)/2);
}