/* ========================================================================
   DAME (Checkers) - Classic Board Game
   ======================================================================== */

/* --- Background --- */
.dame-bg {
    background: radial-gradient(ellipse at center, #2a1e10 0%, #1a1208 100%);
}

/* --- Content Container --- */
.dame-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* --- Turn Indicator --- */
.dame-turn-indicator {
    text-align: center;
    padding: 6px 20px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dame-turn-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d4a574;
}

.dame-win-text {
    color: #81c784;
    text-shadow: 0 0 10px rgba(129, 199, 132, 0.4);
}

.dame-lose-text {
    color: #e57373;
    text-shadow: 0 0 10px rgba(229, 115, 115, 0.4);
}

.dame-draw-text {
    color: #90caf9;
}

/* --- Piece Icons in Toolbar --- */
.dame-piece-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

.dame-piece-icon-player {
    background: radial-gradient(circle at 35% 35%, #e57373, #c0392b 60%, #8b1a1a);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dame-piece-icon-computer {
    background: radial-gradient(circle at 35% 35%, #fff, #ecf0f1 60%, #bdc3c7);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dame-stat-player strong {
    color: #e57373;
}

.dame-stat-computer strong {
    color: #ecf0f1;
}

/* --- Board --- */
.dame-board {
    display: grid;
    grid-template-columns: repeat(8, 68px);
    grid-template-rows: repeat(8, 68px);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.6),
        0 2px 0 #3e2723;
    border: 4px solid #5d4037;
}

/* --- Cell --- */
.dame-cell {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
    position: relative;
    transition: background 0.15s;
}

.dame-light {
    background: #f0d9b5;
}

.dame-dark {
    background: #b58863;
}

/* Selected piece */
.dame-cell.dame-selected {
    background: #d4af37 !important;
    box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.5);
}

/* Valid destination */
.dame-cell.dame-valid-dest {
    cursor: pointer;
}

.dame-cell.dame-valid-dest:hover {
    background: rgba(212, 175, 55, 0.5) !important;
}

/* Last move indicators */
.dame-cell.dame-last-from {
    background: rgba(212, 175, 55, 0.2) !important;
}

.dame-cell.dame-last-to {
    background: rgba(212, 175, 55, 0.3) !important;
}

/* --- Valid Move Dot --- */
.dame-valid-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.5);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.3);
    transition: transform 0.15s;
}

.dame-cell.dame-valid-dest:hover .dame-valid-dot {
    transform: scale(1.3);
}

/* --- Pieces --- */
.dame-piece {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
}

.dame-piece:hover {
    transform: scale(1.05);
}

/* Player pieces (dark red) */
.dame-player-piece {
    background: radial-gradient(circle at 35% 35%, #ef5350, #c0392b 50%, #8b1a1a);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 -3px 6px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.15),
        0 1px 0 rgba(139, 26, 26, 0.8);
}

/* Computer pieces (white/cream) */
.dame-computer-piece {
    background: radial-gradient(circle at 35% 35%, #fff, #ecf0f1 50%, #bdc3c7);
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 -3px 6px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        0 1px 0 rgba(189, 195, 199, 0.8);
}

/* --- King Indicator --- */
.dame-king {
    border: 2px solid rgba(212, 175, 55, 0.7);
}

.dame-player-piece.dame-king {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 -3px 6px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.15),
        0 0 8px rgba(212, 175, 55, 0.4);
}

.dame-computer-piece.dame-king {
    box-shadow:
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 -3px 6px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.4),
        0 0 8px rgba(212, 175, 55, 0.4);
}

.dame-crown {
    font-size: 1.3rem;
    color: #d4af37;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.dame-player-piece .dame-crown {
    color: #ffd700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.dame-computer-piece .dame-crown {
    color: #b8860b;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .dame-board {
        grid-template-columns: repeat(8, 52px);
        grid-template-rows: repeat(8, 52px);
    }

    .dame-cell {
        width: 52px;
        height: 52px;
    }

    .dame-piece {
        width: 40px;
        height: 40px;
    }

    .dame-crown {
        font-size: 1rem;
    }

    .dame-valid-dot {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 420px) {
    .dame-board {
        grid-template-columns: repeat(8, 42px);
        grid-template-rows: repeat(8, 42px);
        border-width: 3px;
    }

    .dame-cell {
        width: 42px;
        height: 42px;
    }

    .dame-piece {
        width: 32px;
        height: 32px;
    }

    .dame-crown {
        font-size: 0.85rem;
    }

    .dame-valid-dot {
        width: 10px;
        height: 10px;
    }
}
