body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    font-family: 'Inter', -apple-system, sans-serif;
}

#canvas-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none; /* Let clicks pass through to canvas */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.top-bar {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: auto;
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.2s;
}

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

.balance {
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.scoreboard {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 150px;
    pointer-events: auto;
}

.score-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 30px;
    min-width: 120px;
    opacity: 0; /* Hidden until dealing starts */
    transition: opacity 0.3s;
}

.score-label {
    color: #a0a0a0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.score-value {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
}

.bottom-bar {
    padding: 20px 40px 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    pointer-events: auto;
}

.bet-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.bet-player { border-color: #4facfe; }
.bet-banker { border-color: #ff5050; }
.bet-tie { border-color: #43e97b; }

#deal-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 15px 30px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
    transition: transform 0.1s, box-shadow 0.1s;
    display: none; /* Hidden by default */
}

.deal-btn {
    position: absolute;
    right: 40px;
    bottom: 40px;
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #000;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px 40px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(253, 160, 133, 0.4);
    pointer-events: auto;
    transition: transform 0.1s, box-shadow 0.1s;
}

.deal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(253, 160, 133, 0.6);
}

.deal-btn:active {
    transform: translateY(2px);
    box-shadow: 0 5px 10px rgba(253, 160, 133, 0.4);
}

/* Responsive Mobile Styles */
@media (max-width: 768px) {
    .scoreboard {
        gap: 20px;
        width: 100%;
        justify-content: center;
        top: 60px;
    }
    .score-container {
        min-width: 80px;
        padding: 5px 15px;
    }
    .score-value {
        font-size: 2rem;
    }
    .top-bar {
        padding: 10px;
    }
    .balance {
        font-size: 1rem;
        padding: 8px 15px;
    }
    .back-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    .bottom-bar {
        font-size: 0.9rem !important;
        margin-bottom: 50px !important;
        padding: 10px;
    }
    .deal-btn {
        right: 50%;
        transform: translateX(50%);
        bottom: 20px;
        font-size: 1.2rem;
        padding: 12px 40px;
    }
    .deal-btn:hover {
        transform: translateX(50%) translateY(-2px);
    }
    .deal-btn:active {
        transform: translateX(50%) translateY(2px);
    }
}
