/* Full-screen Overlay for the interactive roulette table */
.roulette-table-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Semi-transparent dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of other content */
    visibility: hidden; /* Hidden by default */
    opacity: 0;
    transition: visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.roulette-table-overlay.show {
    visibility: visible;
    opacity: 1;
}

.roulette-table-container {
    position: relative;
    width: 95vw; /* Almost full viewport width */
    height: 90vh; /* Almost full viewport height */
    max-width: 700px; /* Reduced max-width as there are fewer columns */
    max-height: 700px;
    background-color: var(--table-felt); /* Use felt color for background */
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.interactive-roulette-table {
    display: grid;
    /* Columns: Only 3 for the numbers */
    grid-template-columns: repeat(3, 1fr);
    /* Rows will be dynamically set by JS based on roulette type */
    /* For European: 0 (0.5fr), 12 rows for numbers (1fr each) */
    /* For American: 0 (0.5fr), 00 (0.5fr), 12 rows for numbers (1fr each) */
    gap: 5px;
    width: 100%;
    height: 100%;
}

/* Base style for all clickable table cells */
.roulette-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border for felt */
    border-radius: 5px;
    font-weight: bold;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    user-select: none; /* Prevent text selection on click */
}

.roulette-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.roulette-cell:active {
    transform: translateY(0);
}

/* Specific styling for '0' and '00' cells */
.cell-0, .cell-00 {
    grid-column: 1 / span 3; /* Spans across the 3 number columns */
    background-color: var(--green);
    font-size: 2em;
    flex-direction: column; /* To stack the number and potential count/label */
    justify-content: center;
}
.cell-0 { grid-row: 1; } /* Default row for 0 in European or American */
.cell-00 { grid-row: 2; } /* Specific row for 00 in American */



.cell-red { background-color: var(--red); }
.cell-black { background-color: var(--black); }
.cell-green { background-color: var(--green); } /* For 0 or 00 in JS */


/* Button to show the table (corner button) */
.corner-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--button-background);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.2em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: background-color 0.3s ease, transform 0.2s ease;
    z-index: 999; /* Below overlay, above main content */
}

.corner-button:hover {
    background-color: var(--button-hover);
    transform: translateY(-3px);
}
.corner-button:active {
    transform: translateY(0);
}

/* Close button for the overlay */
.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 1001; /* Above table content */
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--red);
}

/* Media Queries for responsiveness of the interactive table */
@media (max-width: 768px) {
    .roulette-table-container {
        width: 98vw;
        height: 95vh;
        padding: 10px;
    }
    .interactive-roulette-table {
        gap: 2px;
        font-size: 0.9em;
    }
    .cell-0, .cell-00 {
        font-size: 1.5em;
    }
    .corner-button {
        width: 50px;
        height: 50px;
        font-size: 1em;
        bottom: 15px;
        right: 15px;
    }
}
