:root {
    --primary-color: #4a90e2;
    --accent-color: #f5a623;
    --bg-color: #f0f2f5;
    --text-color: #333;
    --coin-gold: #ffd700;
    --coin-silver: #e0e0e0;
    --coin-border: #b8860b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
}

.container {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 90%;
}

h1 {
    margin-bottom: 2rem;
    font-weight: 300;
    font-size: 2.5rem;
    color: #444;
}

.coin-wrapper {
    perspective: 1000px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 8px solid var(--coin-border);
    box-sizing: border-box;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.3);
}

.heads {
    background-color: var(--coin-gold);
    color: #5c4b00;
    z-index: 2;
}

.tails {
    background-color: var(--coin-gold);
    color: #5c4b00;
    transform: rotateY(180deg);
}

.text {
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.coin-inner {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 2px dashed rgba(0,0,0,0.1);
    border-radius: 50%;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:hover {
    background-color: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(0);
}

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

#status {
    font-size: 1.1rem;
    color: #666;
    min-height: 1.5rem;
}