:root {
    --background-color: #2b2b2b;
    --white-color: white;
    --border-color: #ccc;
    --hover-background-color: rgba(119, 0, 0, 0.5);
    --hover-border-color: #888;
    --focus-border-color: #0056b3;
    --focus-box-shadow: rgba(0, 86, 179, 0.5);
    --semi-transparent-bg: rgba(0, 0, 0, 0.7);
    --card-back-url: url('../images/cards/card-back.png');
    --table-background: #550000 url('base/pokcaltable.png');
}

#spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

#spinner img {
    width: 50px;
    height: 50px;
}

#canvas {
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    padding: 20px;
}

#game-selection {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
}

#gameTypeSelectorLabel {
    color: var(--white-color);
    font-size: smaller;
}

#gameTypeSelector {
    padding: 10px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: rgba(85, 0, 0, 0.0);
    color: var(--white-color);
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

#gameTypeSelector:hover {
    background-color: var(--hover-background-color);
    border-color: var(--hover-border-color);
}

#gameTypeSelector:focus {
    border-color: var(--focus-border-color);
    box-shadow: 0 0 5px var(--focus-box-shadow);
}

#gameTypeSelector option {
    background-color: var(--background-color);
    color: var(--white-color);
}

#deck {
    gap: 10px;
    padding: 20px;
    border-radius: 10px;
    justify-content: center;
}

.deck-card img {
    padding-right: 5px;
    padding-bottom: 5px;
    width: 17px;
    height: 33px;
    transition: transform 0.2s ease;
}

.used {
    filter: grayscale(100%);
    opacity: 0.5;
}

.full-size {
    width: 40px;
    height: 60px;
    transform: scale(1.6);
}

#poker-table {
    width: 850px;
    background: var(--table-background);
    background-size: cover; /* Ensure the image covers the entire div */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the image */
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}
.seats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    padding-bottom: 20px;
    justify-items: center;
}

.seat {
    display: flex;
    border: 2px solid var(--white-color);
    padding: 10px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 10px;
    min-width: 100px;
    position: relative;
}

.seat-results {
    position: absolute;
    top: 45px;
    background-color: var(--semi-transparent-bg);
    color: var(--white-color);
    font-size: 11px;
    padding: 3px 5px;
    border-radius: 5px;
    text-align: center;
    width: auto;
    min-width: 100px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.seat-results.show {
    opacity: 1;
}

#seat7, #seat8 {
    display: none;
}

.seats.texas-holdem {
    grid-template-columns: repeat(4, 1fr);
}

.seats.omaha, .seats.omaha_8_hilo {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 30px;
}

.seats.omaha .card-slot-container,
.seats.omaha_8_hilo .card-slot-container {
    flex-wrap: nowrap;
}

.seats.five-card .card-slot-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: min-content;
    gap: 5px;
}

.seats.five-card .card-slot-container .card-slot:nth-child(4),
.seats.five-card .card-slot-container .card-slot:nth-child(5) {
    grid-column: span 1;
}

.card-slot-container {
    display: grid;
    gap: 15px;
    width: auto;
    justify-content: center;
}

.seats.seven-card .card-slot-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: min-content;
    gap: 5px;
}

.seats.seven-card .card-slot-container .card-slot:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
}

.seats.seven-card .card-slot-container .card-slot:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}

.seats.seven-card .card-slot-container .card-slot:nth-child(3) {
    grid-column: 3;
    grid-row: 1;
}

.seats.seven-card .card-slot-container .card-slot:nth-child(4) {
    grid-column: 4;
    grid-row: 1;
}

.seats.seven-card .card-slot-container .card-slot:nth-child(5) {
    grid-column: 1;
    grid-row: 2;
}

.seats.seven-card .card-slot-container .card-slot:nth-child(6) {
    grid-column: 2;
    grid-row: 2;
}

.seats.seven-card .card-slot-container .card-slot:nth-child(7) {
    grid-column: 3;
    grid-row: 2;
}

.card-slot-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
}

.card-slot {
    width: 48px;
    height: 62px;
    margin: 1px;
    background-image: var(--card-back-url);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 5px;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .seats {
        grid-template-columns: repeat(2, 1fr);
    }
}

.seats.seven-card-stud {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: min-content;
}

.seats.seven-card-stud .seat:nth-child(4) {
    grid-column: span 1 / -1;
}

.seats.seven-card-stud .seat:nth-child(5) {
    grid-column: span 1 / -1;
}

.selected {
    outline: 2px solid blue;
    padding: 1px;
}

.card-slot, .board-card, .dead-card-slot {
    width: 48px;
    height: 62px;
    border-radius: 5px;
    margin: 1px;
    cursor: pointer;
    background-image: var(--card-back-url);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

#board {
    display: flex;
    border: 2px solid var(--white-color);
    justify-content: center;
    gap: 10px;
    padding: 10px 10px;
}

#dead-cards {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 5px;
    padding-top: 10px;
}

.spacer {
    display: block;
    height: 20px;
    width: 100%;
}

.dead-card-slot {
    margin: 2px;
}

.deck-card-group {
    padding-left: 10px;
    padding-right: 10px;
}

.poker-calculator-h3 {
    width: 100%;
    text-align: center;
    margin-top: 2px;
}

.poker-calculator-h4 {
    width: 100%;
    text-align: center;
    margin-top: 2px;
    margin-bottom: 0px;
    font-size: smaller;
    color: var(--white-color);
}

/* Add a break between Diamond and Heart suits */
.deck-card-group:nth-child(2)::after {
    content: "";
    display: block;
    height: 10px;
}