/* Board Layout */
.board-container {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Align columns to the bottom */
    gap: 4px; /* Space between columns */
    margin: 20px 0;
    overflow-x: auto;
    padding-bottom: 10px;
}

.column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 30px; /* Base width */
}

.column-header {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.2em;
}

.steps-container {
    display: flex;
    flex-direction: column-reverse; /* Stack from bottom to top */
    background-color: #000;
    border-radius: 6px;
    padding: 3px;
    border: 1px solid #333;
}

.step {
    width: 28px;
    height: 28px;
    background-color: #1a1a1a;
    margin: 2px 0;
    border-radius: 4px;
    position: relative; /* For placing markers */
    border: 1px solid #333;
}

.step:empty::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background-color: #333;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.column-footer {
    margin-top: 5px;
    font-size: 1.2em;
    opacity: 0.2; /* Dimmed until locked */
}

.column.locked .column-footer {
    opacity: 1;
}

.column.locked .steps-container {
    background-color: #222;
}

/* Player Markers */
.marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    z-index: 10;
    transition: all 0.2s ease;
}

.step {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 2px;
    padding: 2px;
}

.marker.red { background-color: #e74c3c; }
.marker.blue { background-color: #3498db; }
.marker.green { background-color: #2ecc71; }
.marker.yellow { background-color: #f1c40f; }
.marker.purple { background-color: #9b59b6; }

@keyframes pulse-glow {
    0% { box-shadow: 0 0 2px rgba(255, 255, 255, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 8px rgba(255, 255, 255, 0.8), 0 0 12px currentColor; transform: scale(1.1); }
    100% { box-shadow: 0 0 2px rgba(255, 255, 255, 0.5); transform: scale(1); }
}

.marker.runner {
    background-color: white; /* Runners are white initially */
    border: 3px solid; /* Border takes player color */
    animation: pulse-glow 1.5s infinite ease-in-out;
    z-index: 20; /* Ensure runners are on top */
}

.marker.runner.red { border-color: #e74c3c; color: #e74c3c; }
.marker.runner.blue { border-color: #3498db; color: #3498db; }
.marker.runner.green { border-color: #2ecc71; color: #2ecc71; }
.marker.runner.yellow { border-color: #f1c40f; color: #f1c40f; }
.marker.runner.purple { border-color: #9b59b6; color: #9b59b6; }

/* New Player Names List Style */
.player-names-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.player-names-list input {
    background-color: #444; /* Fallback/match theme */
    color: white;
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #333;
    margin-bottom: 20px;
    border-radius: 4px;
}

.current-player {
    font-weight: bold;
}

#player-name.red { color: #e74c3c; }
#player-name.blue { color: #3498db; }
#player-name.green { color: #2ecc71; }
#player-name.yellow { color: #f1c40f; }
#player-name.purple { color: #9b59b6; }

/* Controls */
.controls {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Dice Area */
.dice-area {
    margin: 20px 0;
    text-align: center;
}

/* Combination Buttons */
.combination-selection {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    text-align: center;
}

#combinations-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.combo-btn {
    padding: 8px 16px;
    background: #444;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1em;
}

.combo-btn:hover {
    background: #555;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .column {
        width: 8vw; /* Un poco más ancho para dar aire */
        max-width: 32px;
        min-width: 24px; /* Evitar que se colapsen demasiado */
    }
    .step {
        width: 100%;
        height: 9vw;
        min-height: 24px;
    }
    .marker {
        width: 8px;
        height: 8px;
        border-width: 1px !important; /* Forzar borde fino en runners */
        margin: 1px; /* Separación mínima */
    }
    .marker.runner {
        border-width: 2px !important; /* Runner un poco más destacado pero no 3px */
    }
    .controls {
        flex-direction: column;
    }
}
