body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 300px;
}

h1 {
    color: #333;
    margin-bottom: 2rem;
}

.coin-container {
    perspective: 1000px;
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.side {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border: 5px solid #b8860b;
    background: #ffd700;
}

.side img {
    width: 90%;
}

.tails {
    transform: rotateY(180deg);
}

.controls {
    margin-bottom: 2rem;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#result {
    margin-top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #555;
}

.stats {
    display: flex;
    justify-content: space-around;
    font-size: 1rem;
    color: #777;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}