/* random-generator/coin-flipper/style.css */

.coin-stage {
    perspective: 1000px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin {
    position: relative;
    width: 15rem;
    height: 15rem;
    transform-style: preserve-3d;
    transition: transform 3s cubic-bezier(0.15, 0.85, 0.35, 1);
}

.side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 8px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.2), 0 10px 30px rgba(0, 0, 0, 0.3);

    /* Silver Gradient */
    background: linear-gradient(135deg, #e6e6e6 0%, #ffffff 40%, #cccccc 60%, #999999 100%);
}

.heads {
    z-index: 2;
}

.tails {
    transform: rotateY(180deg);
}

.coin-content {
    font-size: 6rem;
    font-weight: 800;
    color: #444;
    line-height: 1;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
}

.side-label {
    font-size: 1rem;
    font-weight: 700;
    color: #666;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

/* Animations */
.flipping-heads {
    animation: flipHeads 3s cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
}

.flipping-tails {
    animation: flipTails 3s cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
}

@keyframes flipHeads {
    from {
        transform: rotateY(0);
    }

    to {
        transform: rotateY(1800deg);
    }

    /* multiple full rotations + end at 0 mod 360 */
}

@keyframes flipTails {
    from {
        transform: rotateY(0);
    }

    to {
        transform: rotateY(1980deg);
    }

    /* multiple full rotations + 180 deg */
}

/* Dark mode adjustments for silver look */
[data-theme="dark"] .side {
    background: linear-gradient(135deg, #d9d9d9 0%, #f2f2f2 40%, #b3b3b3 60%, #808080 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .coin-content {
    color: #333;
}

@media (max-width: 600px) {
    .coin {
        width: 12rem;
        height: 12rem;
    }

    .coin-content {
        font-size: 4.5rem;
    }
}