#board {
    flex: 1;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 25px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    border-bottom: 2px solid #2c3e50;
    overflow-y: auto;
    margin-top: 15px;
}

/* Three vertical columns split for the whole screen width */
.board-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.board-column:last-child {
    border-right: none;
}

.board-wrapper {
    display: flex;
    flex-direction: row; 
    width: 100%;
    height: 200px;
    flex-shrink: 0;
    gap: 20px;
}

.board-zone {
    flex: 1; /* Each zone takes 1/3 */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #2c3e50;
    position: relative;
    min-width: 0;
    height: 100%;
}

.split-zone {
    flex: 1;
    height: 100%;
    min-width: 0; /* Indispensable pour que le scroll interne fonctionne */
}

.cards-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* Default to center, JS will adjust for overflow */
    gap: 0px;
    padding: 10px 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    white-space: nowrap;
    box-sizing: border-box;
    position: relative;
    z-index: 101; /* Above market pile (100) */
}

.cards-container:hover {
    z-index: 500; /* Augmenté pour être au-dessus du compost (150) lors du survol de la zone */
}

.nav-arrow {
    width: 40px;
    height: 40px;
    color: white;
    background-color: rgba(0, 0, 0, 0.6); /* Slightly more opaque for better visibility */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    border-radius: 50%;
    z-index: 3000; /* Higher than any card hover (1000 or 2000) */
    transition: background-color 0.2s, transform 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.4);
    position: absolute;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.nav-arrow.left {
    left: 10px;
}

.nav-arrow.right {
    right: 10px;
}

.nav-arrow svg {
    width: 24px;
    height: 24px;
}

.nav-arrow:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.nav-arrow.hidden {
    display: none;
}

.arrow-alert {
    box-shadow: 0 0 15px #3498db, 0 0 25px #3498db !important;
    border-color: #3498db !important;
    background-color: rgba(52, 152, 219, 0.4) !important;
}

.background-player-area {
    background-color: #2c3e50;
}

#player-area {
    height: 40px; /* Zone très réduite, les cartes déborderont vers le haut */
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding: 0 40px;
    position: relative;
    z-index: 10;
    background-color: #2c3e50;
}

#hand-container {
    flex: 1;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    pointer-events: none;
    z-index: 10;
    background-color: #2c3e50;
}

.pile {
    width: 120px;
    height: 180px;
    position: relative;
    bottom: -20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s;
}

.pile:hover {
    transform: translateY(-10px);
}

.pile-card {
    width: 120px;
    height: 180px;
    border: 2px solid #34495e;
    border-radius: 10px;
    position: absolute;
    transition: background-color 0.2s;
}

.pile-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
