:root {
    --tile-size: 40px;
    --board-gap: 5px;
    --tile-font-size: 1.2rem;
    --board-bg: #2a2a2a;
    --cell-bg: #333;
    --highlight-color: rgba(255, 255, 255, 0.2);
    --valid-move-color: rgba(0, 255, 0, 0.3);
    --invalid-move-color: rgba(255, 0, 0, 0.2);
}

@media (min-width: 500px) {
    :root {
        --tile-size: 50px;
        --tile-font-size: 1.5rem;
    }
}

.checkbox-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.active-board-section {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.other-boards-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0.8;
}

.other-boards-section .player-board-wrapper {
    transform: scale(0.7);
    margin: -20px; /* Compensate for scale gap */
}

.player-board-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius-md);
    background-color: var(--section-deep);
    transition: box-shadow 0.3s ease;
}

.player-board-wrapper.active {
    box-shadow: 0 0 10px var(--primary-color);
    border: 1px solid var(--primary-color);
}

.player-name-label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 1.5rem;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(4, var(--tile-size));
    grid-template-rows: repeat(4, var(--tile-size));
    gap: var(--board-gap);
    background-color: var(--board-bg);
    padding: var(--board-gap);
    border-radius: var(--border-radius-sm);
}

.cell {
    width: 100%;
    height: 100%;
    background-color: var(--cell-bg);
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: default;
    position: relative;
}

.cell.clickable {
    cursor: pointer;
    box-shadow: inset 0 0 5px var(--highlight-color);
}

.cell.valid-target {
    background-color: var(--valid-move-color);
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

.tile {
    width: 90%;
    height: 90%;
    background-color: var(--white);
    color: #000;
    border-radius: 50%; /* Clover-ish roundness */
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: var(--tile-font-size);
    box-shadow: 2px 2px 2px rgba(0,0,0,0.3);
    user-select: none;
}

.controls-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background-color: var(--bg-darker);
    padding: 15px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
}

.active-tile-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 80px;
    justify-content: center;
}

.tile-display {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    background-color: var(--info-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    margin-bottom: 5px;
}

#action-message {
    font-style: italic;
    color: var(--text-color-light);
    text-align: center;
}

.actions {
    display: flex;
    gap: 20px;
    width: 100%;
    justify-content: space-around;
    align-items: flex-start;
}

.pool-deck {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.pool-deck:active {
    transform: scale(0.95);
}

.deck-stack {
    font-size: 3rem;
    line-height: 1;
    transition: all 0.2s ease;
}

.deck-stack.drawn-tile-view {
    width: 60px;
    height: 60px;
    font-size: 2rem;
    display: flex;
}

.table-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 60px;
    background-color: rgba(0,0,0,0.2);
    padding: 5px;
    border-radius: var(--border-radius-md);
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    cursor: pointer; /* To indicate discard area */
    transition: background-color 0.2s;
}

.table-tiles:hover {
    background-color: rgba(255,255,255,0.1); /* Hover effect to suggest interactivity */
}

.table-tile {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    cursor: pointer;
}

.table-tile:hover {
    transform: translateY(-2px);
}
