* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 2.5em;
}

.game-info {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

#turn {
    font-size: 1.2em;
    font-weight: bold;
    color: #d63031;
}

#reset-btn {
    background-color: #0984e3;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#reset-btn:hover {
    background-color: #0768b8;
}

.board-container {
    margin: 20px auto;
    border: 3px solid #333;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

#chessboard {
    border-collapse: collapse;
}

.cell {
    width: 80px;
    height: 80px;
    text-align: center;
    vertical-align: middle;
    font-size: 48px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s;
}

.dark {
    background-color: #769656;
}

.light {
    background-color: #eeeed2;
}

.cell:hover {
    background-color: rgba(255, 255, 0, 0.3);
}

.cell.selected {
    background-color: rgba(255, 215, 0, 0.5);
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.8);
}

.cell.valid-move {
    background-color: rgba(0, 255, 0, 0.3);
    box-shadow: inset 0 0 10px rgba(0, 255, 0, 0.6);
}

.cell.valid-move::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 255, 0, 0.5);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.piece {
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
    display: inline-block;
}

.piece:hover {
    transform: scale(1.1);
}

.piece.red {
    color: #d63031;
}

.piece.black {
    color: #2d3436;
}

.captured-pieces {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding: 0 20px;
}

.captured {
    text-align: center;
    min-width: 150px;
}

.captured h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.1em;
}

#red-captured, #black-captured {
    min-height: 50px;
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
    font-size: 36px;
    line-height: 1.5;
    min-width: 120px;
}

#red-captured {
    border: 2px solid #d63031;
}

#black-captured {
    border: 2px solid #2d3436;
}

@media (max-width: 768px) {
    .cell {
        width: 60px;
        height: 60px;
        font-size: 36px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .captured-pieces {
        flex-direction: column;
        gap: 20px;
    }
}