/* Board Visualizer Styles */

/* Modal overlay */
.board-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.board-modal.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
}

.board-modal-content {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 580px;
    width: 95%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.board-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    z-index: 10;
}

.board-modal-close:hover {
    color: var(--text);
}

.board-modal-header {
    padding: 16px 20px 8px;
    text-align: center;
}

.board-modal-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--text);
}

.board-modal-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.board-modal-body {
    padding: 12px 16px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#board-container {
    display: flex;
    justify-content: center;
    flex: 1;
}

/* Navigation arrows */
.board-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.board-nav:hover {
    background: var(--border);
    color: var(--text);
}

.board-nav:active {
    transform: scale(0.95);
}

/* Navigation indicator */
.board-nav-indicator {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.bg-board {
    width: 100%;
    max-width: 512px;
    height: auto;
}

.board-modal-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
}

.board-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-checker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.legend-checker.p1 {
    background: #FFFDD0;
    border-color: #d4c9a0;
}

.legend-checker.p2 {
    background: #8B0000;
    border-color: #5a0000;
}

/* Clickable error rows */
.error-table tr.clickable {
    cursor: pointer;
    transition: background 0.15s;
}

.error-table tr.clickable:hover td {
    background: rgba(212, 160, 78, 0.12) !important;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Dice display in header */
.dice-display {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.dice-display svg {
    display: block;
}

/* Move comparison */
.move-comparison {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
}

.move-played, .move-best {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.move-label {
    color: var(--text-muted);
    font-weight: 500;
}

.move-value {
    font-family: monospace;
    color: var(--text);
}

.move-played .move-value {
    color: #d9534f;  /* Red for played (wrong) move */
}

.move-best .move-value {
    color: #5cb85c;  /* Green for best move */
}
