/* Basic page styling to center the board */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #312e2b; /* A dark background to make the board pop */
    font-family: sans-serif;
}

/* Chessboard container */
.chessboard {
    display: grid;
    /* Creates an 8x8 grid */
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);

    /* 
     * Use vmin to make the board responsive and square.
     * 80vmin means 80% of the smaller of the viewport's width or height.
    */
    width: 80vmin;
    height: 80vmin;
    max-width: 700px;
    max-height: 700px;

    /* A nice wooden border and shadow for a 3D effect */
    border: 12px solid #543a24;
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
}

/* Individual square styling */
.square {
    /* Center the chess piece (text) within the square */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Make the piece size responsive to the board size */
    font-size: 7vmin;
    color: #222; /* A dark color for all pieces for good contrast */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3); /* Subtle shadow for depth */
}

/* Square colors */
.light {
    background-color: #f0d9b5; /* Light wood color */
}

.dark {
    background-color: #b58863; /* Dark wood color */
}