/* checkers.css */

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.5); }

/* Дошка */
#checkers-board {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 480px;
    border: 4px solid #422006;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.25),
                inset 0 0 25px rgba(0,0,0,0.4);
}

.checkers-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.checkers-cell.light {
    background: linear-gradient(135deg, #f5deb3, #e0c08a);
}
.checkers-cell.dark {
    background: linear-gradient(135deg, #6b3a14, #4a2509);
}

/* Підказки */
.checkers-cell.move-target {
    cursor: pointer;
}
.checkers-cell.move-target::after {
    content: '';
    position: absolute;
    width: 35%;
    height: 35%;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.55);
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
    pointer-events: none;
    animation: pulseTarget 1.4s ease-in-out infinite;
}
.checkers-cell.capture-target::after {
    background: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.9);
}
@keyframes pulseTarget {
    0%, 100% { transform: scale(1);   opacity: 0.7; }
    50%      { transform: scale(1.2); opacity: 1.0; }
}

.checkers-cell.last-from,
.checkers-cell.last-to {
    box-shadow: inset 0 0 0 3px rgba(250, 204, 21, 0.7);
}

/* Шашки */
.piece {
    width: 78%;
    height: 78%;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
}
.piece.p1 {
    background: radial-gradient(circle at 30% 30%, #fefce8, #facc15);
    border: 3px solid #ca8a04;
    box-shadow: inset -3px -4px 8px rgba(0,0,0,0.35),
                0 4px 6px rgba(0,0,0,0.4);
    color: #78350f;
}
.piece.p2 {
    background: radial-gradient(circle at 30% 30%, #4b5563, #111827);
    border: 3px solid #030712;
    box-shadow: inset -3px -4px 8px rgba(0,0,0,0.55),
                0 4px 6px rgba(0,0,0,0.4);
    color: #fde68a;
}
.piece.selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.9),
                0 0 18px rgba(96, 165, 250, 0.8);
}
.piece.king::after {
    content: '♛';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.piece.movable {
    box-shadow: inset -3px -4px 8px rgba(0,0,0,0.35),
                0 0 0 2px rgba(74, 222, 128, 0.6),
                0 0 10px rgba(74, 222, 128, 0.5);
}
.piece.must-capture {
    box-shadow: inset -3px -4px 8px rgba(0,0,0,0.45),
                0 0 0 2px rgba(248, 113, 113, 0.85),
                0 0 12px rgba(248, 113, 113, 0.65);
    animation: mustCapturePulse 1.2s ease-in-out infinite;
}
@keyframes mustCapturePulse {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(1.3); }
}
