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

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: Arial, sans-serif;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-container {
    position: relative;
    min-width: 1000px;
    min-height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
    text-align: center;
}

.game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.status {
    font-size: 24px;
    color: #333;
    font-weight: bold;
}

.score-board {
    display: flex;
    gap: 20px;
}

.score {
    font-size: 20px;
    color: #333;
}

.board-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    gap: 0;
    border: 2px solid #333;
}

.cell {
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.cell.white {
    background: #fff;
}

.cell.black {
    background: #666;
}

.piece {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.piece.red {
    background: #ff4444;
}

.piece.black {
    background: #333;
}

.piece.king::after {
    content: '♔';
    position: absolute;
    color: #fff;
    font-size: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cell.valid-move {
    background: #4CAF50;
}

.cell.selected {
    background: #2196F3;
}

.controls {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 10px 20px;
    font-size: 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background: #1976D2;
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1200px) {
    .game-container {
        min-width: auto;
        width: 100%;
        max-width: 800px;
    }

    .board {
        grid-template-columns: repeat(8, 50px);
        grid-template-rows: repeat(8, 50px);
    }

    .cell {
        width: 50px;
        height: 50px;
    }

    .piece {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 600px) {
    .board {
        grid-template-columns: repeat(8, 40px);
        grid-template-rows: repeat(8, 40px);
    }

    .cell {
        width: 40px;
        height: 40px;
    }

    .piece {
        width: 32px;
        height: 32px;
    }

    .controls {
        flex-direction: column;
    }
} 