* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #f0f2f5;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 50px;
}

.board-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.board-title {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.thinking-message {
    margin-top: 15px;
    font-size: 16px;
    color: #e74c3c;
    font-weight: bold;
    display: none;
}

.thinking-message.show {
    display: block;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    gap: 2px;
    background-color: #1a522e;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cell {
    width: 60px;
    height: 60px;
    background-color: #2e8b57;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.2s;
}

.cell:hover {
    background-color: #3cb371;
}

.cell.valid {
    background-color: #45b97c;
}

.cell.valid::after {
    content: '';
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
}

.piece {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: absolute;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.piece.black {
    background-color: #000;
}

.piece.white {
    background-color: #fff;
    border: 1px solid #ddd;
}

.piece.white.last-move::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ff0000;
    position: absolute;
}

.game-info {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
}

.info-title {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.score {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-piece {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.score-piece.black {
    background-color: #000;
}

.score-piece.white {
    background-color: #fff;
    border: 1px solid #ddd;
}

.score-value {
    font-size: 18px;
    font-weight: bold;
    color: #34495e;
}

.message {
    margin: 15px 0;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.message.end {
    background-color: #d4edda;
    color: #155724;
}

.btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 10px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

.difficulty {
    margin: 15px 0;
}

.difficulty label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: bold;
}

.difficulty select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.rules {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.rules h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
}

.rules p {
    font-size: 13px;
    color: #34495e;
    line-height: 1.5;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
        align-items: center;
    }
    
    .board {
        grid-template-columns: repeat(8, 45px);
        grid-template-rows: repeat(8, 45px);
    }
    
    .cell {
        width: 45px;
        height: 45px;
    }
    
    .piece {
        width: 38px;
        height: 38px;
    }
}