/* Draughts (draughts.html) */

.board-wrap {
    max-width: 540px;
    margin: 10px auto;
    padding: 0 6px;
}

.dr-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    aspect-ratio: 1;
    width: 100%;
    border: 10px solid #4e342e;
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.dr-cell { position: relative; }
.dr-cell.light { background: #ecd9b9; }
.dr-cell.dark { background: #9c6b43; cursor: default; }
.dr-cell.dark.clickable { cursor: pointer; }

.dr-cell.target::after {
    content: "";
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background: rgba(249, 168, 37, 0.55);
    border: 3px solid #f9a825;
    box-sizing: border-box;
}

.dr-piece {
    position: absolute;
    inset: 9%;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45), inset 0 -4px 0 rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.dr-piece.p0 { background: radial-gradient(circle at 35% 30%, #4b8fd9, #1565c0 60%, #0d3c73); }
.dr-piece.p1 { background: radial-gradient(circle at 35% 30%, #e57368, #c62828 60%, #7f1616); }

.dr-piece.selectable { outline: 3px dashed #f9a825; outline-offset: 2px; }
.dr-piece.selected { outline: 4px solid #f9a825; outline-offset: 2px; }

.dr-piece.king::after {
    content: "\265B";
    color: #ffd54f;
    font-size: clamp(16px, 4.5vw, 30px);
    line-height: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Shared page furniture (chips, status, actions, modals) */
.score-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px auto;
    flex-wrap: wrap;
}

.player-chip {
    background: white;
    border: 3px solid transparent;
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 15px;
    font-weight: bold;
    color: #555;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.player-chip.active { border-color: #f9a825; background: #fffde7; color: #333; }
.chip-p0 { border-left: 8px solid #1565c0; }
.chip-p1 { border-left: 8px solid #c62828; }

.status-line {
    text-align: center;
    font-weight: bold;
    color: #444;
    min-height: 22px;
    margin: 4px 0;
}

.action-bar { text-align: center; margin: 10px 0; min-height: 50px; }

.action-btn {
    padding: 12px 26px;
    border: none;
    border-radius: 10px;
    background: #5d4037;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    margin: 0 6px;
}

.action-btn:disabled { opacity: 0.5; cursor: default; }

.bg-flash {
    display: inline-block;
    background: #fff8e1;
    border: 2px solid #f9a825;
    color: #6d4c00;
    font-weight: bold;
    border-radius: 8px;
    padding: 4px 12px;
    margin: 2px 4px;
    animation: drflash-in 0.3s ease;
}

@keyframes drflash-in { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.difficulty-options {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.difficulty-options button {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    background: #5d4037;
    color: white;
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.difficulty-options button:hover { background: #7b5e57; }

@media (max-width: 700px) {
    .player-chip { font-size: 13px; padding: 5px 12px; }
    .action-btn { font-size: 15px; padding: 10px 20px; }
}
