﻿/* Body and container setup */
.body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.coin-container {
    width: 100px;
    height: 100px;
    perspective: 1000px; /* Creates 3D perspective */
}

.coin {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCoin 3s infinite linear;
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Hide the back side when flipped */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
}

/* Styling for front and back faces */
.front {
    background-color: #ffcc00;
    color: white;
}

.back {
    background-color: #005f99;
    color: white;
    transform: rotateX(180deg); /* Back side is flipped */
}

/* Keyframe animation for rotating the coin */
@keyframes rotateCoin {
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(360deg); /* Complete 360-degree rotation */
    }
}