body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height instead of height */
    margin: 0;
    background-color: #deb887; /* Light Brown */
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* Make the game container responsive */
    max-width: 600px; /* Limit the maximum width */
    padding: 20px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

#board-container {
    margin-bottom: 20px;
    width: 100%; /* Make the board container responsive */
}

#shogi-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr); /* Use fr units for flexible columns */
    grid-template-rows: repeat(9, 1fr); /* Use fr units for flexible rows */
    border: 2px solid #333;
    width: 100%; /* Make the board responsive */
    aspect-ratio: 1 / 1; /* Maintain a 1:1 aspect ratio */
    background-color: #d2b48c; /* Tan */
}

#shogi-board > div {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: calc(16px + 1vw); /* Responsive font size */
    border: 1px solid #ccc;
    background-color: #f5f5dc; /* Beige */
    color: #333;
    cursor: pointer;
}

#shogi-board > div.highlighted {
    background-color: yellow;
}

#shogi-board > div.player1-highlight {
    background-color: rgba(0, 255, 0, 0.5); /* Green with transparency */
}

#shogi-board > div.player2-highlight {
    background-color: rgba(0, 0, 255, 0.5); /* Blue with transparency */
}

#game-info {
    margin-bottom: 20px;
    text-align: center;
}

#captured-pieces {
    display: flex;
    justify-content: space-around;
    width: 100%; /* Make the captured pieces area responsive */
    max-width: 400px;
}

.captured-area {
    width: 45%;
    padding: 10px;
    border: 1px solid #ccc;
    text-align: center;
    box-sizing: border-box;
}

.piece {
    font-size: calc(14px + 1vw);
    margin: 2px;
}

.player2 {
    transform: rotate(180deg);
}

/* Media queries for smaller screens */
@media (max-width: 480px) {
    #game-info {
        font-size: 0.8em;
    }

    .captured-area {
        padding: 5px;
    }

    .piece {
        font-size: 1em;
    }
}
