/* Canvas responsive */
#gameCanvas {
    width: 100%;
    height: auto;
    max-height: 500px;
    display: block;
    margin: 20px auto;
    border: 2px solid #333;
    border-radius: 12px;
}

.scoreboard-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

/* Chaque tableau */
.scoreboard {
    width: 48%; /* desktop côte à côte */
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    background: #1f1f1f;
    color: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.scoreboard thead th {
    background: #222;
    border: 1px solid #333;
    text-align: center;
    padding: 8px !important;
    font-weight: bold;
    font-size: 18px !important;
    color: lightgreen;
}

.scoreboard tbody td {
    border: 1px solid #333;
    text-align: center;
    padding: 6px;
    background: #111;
    font-size: 14px;
}

/* Lignes paires/impaires */
.scoreboard tbody tr:nth-child(even) td {
    background: #1a1a1a;
}

/* Totaux */
.scoreboard tbody td.total {
    font-weight: bold;
    color: lightgreen;
    background: #222;
}

.gratte-result-ok,
.gratte-result-no {
    margin: 10px auto;
    padding: 10px;
    border-radius: 10px;
    font-weight: bold;
    max-width: 95%;
}

.gratte-result-ok {
    border: 1px solid #333;
    color: lightgreen;
    background: #212121;
}

.gratte-result-no {
    border: 1px solid #333;
    color: lightcoral;
    background: #212121;
}

/* ===== OVERLAY BLACKJACK WIN ===== */
#blackjack-win-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#blackjack-win-overlay.show {
    opacity: 1;
    pointer-events: all;
}

#blackjack-win-overlay h1 {
    font-size: 5rem;
    color: gold;
    text-shadow:
        0 0 15px #fff,
        0 0 30px gold,
        0 0 60px gold;
    animation: blackjackPulse 1s infinite alternate;
}

@keyframes blackjackPulse {
    from { transform: scale(1); }
    to { transform: scale(1.3); }
}

#ball-selection-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
	margin-top: -70px;
}

#ball-selection-title {
    font-size: 1.6rem;
    color: white;
    margin-bottom: 20px;
    text-align: center;
}

#ball-selection-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.select-ball {
    width: 80px;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.select-ball:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px gold;
}

/* Responsive mobile */
@media (max-width: 800px) {
#ball-selection-overlay {
	margin-top: -200px;
}	
    .select-ball {
        width: 60px;
    }
    #ball-selection-title {
        font-size: 1rem;
    }	
}


@media (max-width: 768px) {
    .scoreboard {
        width: 100%; /* empilé verticalement */
    }

    .scoreboard tbody td, 
    .scoreboard thead th {
        padding: 4px;
        font-size: 12px;
    }	
	
}

@media (max-width: 600px) {
#ball-selection-overlay {
	margin-top: -300px;
}	
    .select-ball {
        width: 60px;
    }
    #ball-selection-title {
        font-size: 0.9rem;
    }
}
