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

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

.game-container {
    width: 800px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    color: #8B0000;
    font-size: 32px;
    margin-bottom: 10px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.player-info {
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
}

#player-red {
    background-color: #ffcccc;
    color: #8B0000;
}

#player-black {
    background-color: #cccccc;
    color: #000;
}

.turn-info {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border-radius: 5px;
    font-weight: bold;
}

.board-container {
    position: relative;
    margin: 10px 0;
}

canvas {
    display: block;
    background-color: #f5e8c9;
    border: 2px solid #8B0000;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
}

button {
    padding: 10px 20px;
    background-color: #8B0000;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #a52a2a;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    z-index: 10;
}

.hidden {
    display: none;
}

.back-to-lobby {
    margin-top: 20px;
}

.back-to-lobby a {
    display: inline-block;
    padding: 8px 15px;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.back-to-lobby a:hover {
    background-color: #555;
}

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