/* FILE: static/css/cheskers.css */

/* Scoped Game Wrapper */
#chk-game-wrapper {
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    color: white;
    user-select: none;
    -webkit-user-select: none;
    background-color: #0f172a;
    padding: 10px;
    border-radius: 8px;
}

/* --- Header & Status --- */
#chk-header {
    margin-bottom: 1rem;
    text-align: center;
}

#chk-status-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 500px;
    background-color: #1e293b;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #334155;
    margin-bottom: 20px;
    font-size: 0.8rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.chk-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chk-turn-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #4ade80; /* Green */
    box-shadow: 0 0 8px #4ade80;
    transition: background-color 0.3s;
}

.chk-turn-indicator.inactive {
    background-color: #334155;
    box-shadow: none;
}

/* --- Board (10x10) --- */
#chk-board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    width: 100%;
    max-width: 550px;
    aspect-ratio: 1 / 1;
    border: 4px solid #475569;
    background-color: #334155;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.chk-square {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

/* Checkerboard Pattern */
.chk-square.light { background-color: #64748b; }
.chk-square.dark { background-color: #334155; }

/* CHECKER ZONE (Outer Ring) - Shaded Darker with Red Tint */
.chk-square.checker-zone {
    position: relative;
}
.chk-square.checker-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4); /* Dark Overlay */
    pointer-events: none;
    z-index: 0;
}
/* Optional: Stripes to make it distinct */
.chk-square.checker-zone.light::before {
    background: repeating-linear-gradient(
        45deg,
        rgba(0,0,0,0.3),
        rgba(0,0,0,0.3) 10px,
        rgba(0,0,0,0.4) 10px,
        rgba(0,0,0,0.4) 20px
    );
}

/* Highlights */
.chk-square.selected {
    background-color: #facc15 !important; /* Yellow */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    z-index: 1;
}

.chk-square.valid-move::after {
    content: '';
    position: absolute;
    width: 20%;
    height: 20%;
    background-color: rgba(74, 222, 128, 0.6);
    border-radius: 50%;
    z-index: 2;
}

.chk-square.capture-move {
    background-color: #f87171 !important; /* Red */
    box-shadow: inset 0 0 15px #991b1b;
}

/* --- Pieces --- */
.chk-piece {
    width: 85%;
    height: 85%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-out;
    filter: drop-shadow(0 4px 3px rgba(0,0,0,0.4));
    pointer-events: none;
    z-index: 1; /* Above zone shading */
}

.chk-piece:hover { transform: scale(1.1); }

.chk-piece svg {
    width: 100%;
    height: 100%;
}

.chk-piece.white { fill: #f8fafc; stroke: #0f172a; stroke-width: 1.5px; }
.chk-piece.black { fill: #dc2626; stroke: #7f1d1d; stroke-width: 1.5px; }

/* Checker King */
.chk-piece.checker-king svg { filter: drop-shadow(0 0 5px #facc15); }
.chk-piece.checker-king::after {
    content: '♔';
    position: absolute;
    color: #fef08a;
    font-size: 1rem;
    font-weight: bold;
}

/* --- Modal --- */
#chk-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(15, 23, 42, 0.95);
    padding: 2rem;
    border: 2px solid #38bdf8;
    border-radius: 12px;
    text-align: center;
    z-index: 50;
    min-width: 300px;
}

.chk-btn {
    margin-top: 1rem;
    background-color: #0ea5e9;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
    border-bottom: 4px solid #0369a1;
}

.chk-btn:active { border-bottom: 0px; transform: translateY(4px); }
.chk-btn:hover { background-color: #0284c7; }

.hidden { display: none !important; }   