body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
}

.game-container {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
}

h1 {
    margin-top: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.coin {
    width: 150px;
    height: 150px;
    margin: 20px auto;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s ease-in-out;
}

.heads, .tails {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.heads {
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    color: #333;
}

.tails {
    background: linear-gradient(135deg, #c3cfe2, #f5f7fa);
    color: #333;
    transform: rotateY(180deg);
}

.controls {
    margin: 20px 0;
}

button {
    background: linear-gradient(135deg, #4e54c8, #8f94fb);
    border: none;
    color: white;
    padding: 12px 25px;
    margin: 0 10px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(1px);
}

.result {
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 40px;
    margin: 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.stats p {
    margin: 0;
    font-size: 1.1rem;
}

.stats span {
    font-weight: bold;
}

.flipping {
    animation: flip 1s ease-in-out;
}

@keyframes flip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(1800deg); }
    100% { transform: rotateY(3600deg); }
}