/* =====================================================
   CHECKERS - Stile Retro Atari 2600
   ===================================================== */

/* Variabili specifiche del gioco */
:root {
    --board-light: #5c7cfa;
    --board-dark: #1a1a2e;
    --piece-red: #e63946;
    --piece-red-dark: #9d0208;
    --piece-black: #2d2d2d;
    --piece-black-dark: #1a1a1a;
    --piece-king-gold: #ffd700;
    --highlight-color: #00ff66;
    --valid-move-color: rgba(0, 255, 102, 0.5);
    --capture-color: rgba(255, 0, 0, 0.5);
}

/* Canvas del gioco */
#gameCanvas {
    background-color: var(--board-dark);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: pointer;
}

/* Turn Indicator */
.turn-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--highlight-color);
    padding: 8px 20px;
    border-radius: 5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: white;
    z-index: 10;
}

#current-turn {
    text-transform: uppercase;
}

/* Difficulty Selector */
.difficulty-selector {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.difficulty-selector label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: white;
}

.difficulty-selector select {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    padding: 10px 20px;
    background: #1a1a2e;
    color: var(--highlight-color);
    border: 2px solid var(--highlight-color);
    border-radius: 5px;
    cursor: pointer;
    text-transform: uppercase;
}

.difficulty-selector select:focus {
    outline: none;
    box-shadow: 0 0 10px var(--highlight-color);
}

.difficulty-selector select option {
    background: #1a1a2e;
    color: white;
}

/* Retro Text */
.retro-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--highlight-color);
    margin: 10px 0;
}

/* Score Section */
.score-section .score-display {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.player-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
}

.player-score.red {
    background: linear-gradient(135deg, var(--piece-red), var(--piece-red-dark));
    color: white;
}

.player-score.black {
    background: linear-gradient(135deg, var(--piece-black), var(--piece-black-dark));
    color: white;
    border: 1px solid #444;
}

.player-label {
    font-weight: bold;
}

.player-captures {
    font-size: 0.8rem;
}

/* Rules List */
.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-list li {
    padding: 5px 0;
    font-size: 0.7rem;
    color: #ccc;
    border-bottom: 1px solid #333;
}

.rules-list li:last-child {
    border-bottom: none;
}

/* Game Over Styling */
#gameover-overlay h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#gameover-message {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--highlight-color);
    margin: 15px 0;
}

#final-captures {
    color: var(--highlight-color);
    font-weight: bold;
}

/* Hover effects */
.game-container:hover #gameCanvas {
    /* Subtle glow effect when hovering */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .difficulty-selector select {
        font-size: 0.6rem;
        padding: 8px 15px;
    }

    .turn-indicator {
        font-size: 0.6rem;
        padding: 6px 15px;
    }

    .player-score {
        font-size: 0.5rem;
    }
}

/* Animation for piece selection */
@keyframes pulse-highlight {

    0%,
    100% {
        box-shadow: 0 0 5px var(--highlight-color);
    }

    50% {
        box-shadow: 0 0 20px var(--highlight-color);
    }
}

/* King crown animation */
@keyframes crown-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 3px var(--piece-king-gold));
    }

    50% {
        filter: drop-shadow(0 0 8px var(--piece-king-gold));
    }
}