* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5rem;
    color: #f1c40f;
    text-shadow: 0 0 20px rgba(241, 196, 15, 0.5);
}

.game-header .subtitle {
    color: #ecf0f1;
    font-size: 1rem;
    margin-top: 5px;
    letter-spacing: 3px;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.info-box {
    text-align: center;
}

.info-label {
    display: block;
    color: #95a5a6;
    font-size: 0.8rem;
    font-weight: bold;
}

.info-value {
    display: block;
    color: #f1c40f;
    font-size: 2rem;
    font-weight: bold;
}

.coin-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    perspective: 1000px;
}

.coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
}

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

.coin.heads {
    transform: rotateY(0deg);
}

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

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

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 4rem;
    backface-visibility: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.coin-face.front {
    background: linear-gradient(145deg, #f1c40f, #d4ac0d);
    border: 5px solid #b7950b;
}

.coin-face.back {
    background: linear-gradient(145deg, #bdc3c7, #95a5a6);
    border: 5px solid #7f8c8d;
    transform: rotateY(180deg);
}

.result {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    min-height: 40px;
    margin-bottom: 20px;
    color: #ecf0f1;
}

.result.win {
    color: #2ecc71;
}

.result.lose {
    color: #e74c3c;
}

.bet-section {
    text-align: center;
    margin-bottom: 20px;
}

.bet-label {
    color: #95a5a6;
    margin-bottom: 10px;
}

.bet-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.bet-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
}

.bet-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.bet-btn.active {
    background: linear-gradient(135deg, #f1c40f, #d4ac0d);
    color: #1a1a2e;
    border-color: #f1c40f;
}

.choice-section {
    text-align: center;
    margin-bottom: 20px;
}

.choice-label {
    color: #95a5a6;
    margin-bottom: 15px;
}

.choice-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.choice-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.choice-btn:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.choice-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.choice-btn.heads {
    border-color: #f1c40f;
}

.choice-btn.heads:hover:not(:disabled) {
    background: rgba(241, 196, 15, 0.2);
}

.choice-btn.tails {
    border-color: #95a5a6;
}

.choice-btn.tails:hover:not(:disabled) {
    background: rgba(149, 165, 166, 0.2);
}

.choice-icon {
    font-size: 2.5rem;
}

.choice-text {
    color: #ecf0f1;
    font-size: 1.1rem;
    font-weight: bold;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #95a5a6;
    font-size: 0.9rem;
}

.stat span {
    color: #ecf0f1;
    font-weight: bold;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.overlay-content h2 {
    color: #e74c3c;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.overlay-content p {
    color: #ecf0f1;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.overlay-content button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.overlay-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.5);
}

@media (max-width: 450px) {
    .game-container {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .coin {
        width: 120px;
        height: 120px;
    }

    .coin-face {
        font-size: 3rem;
    }

    .choice-btn {
        padding: 15px 25px;
    }

    .choice-icon {
        font-size: 2rem;
    }

    .stats {
        flex-direction: column;
        gap: 5px;
    }
}
