body {
text-align: center;
font-family: Arial, sans-serif;
background-color: #2c3e50;
color: white;
}
h1 {
font-size: 32px;
margin-bottom: 10px;
}
#chessboard {
display: grid;
grid-template-columns: repeat(8, 80px);
grid-template-rows: repeat(8, 80px);
width: 640px;
height: 640px;
margin: auto;
border: 5px solid black;
box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.5);
}
.cell {
width: 80px;
height: 80px;
display: flex;
align-items: center;
justify-content: center;
font-size: 50px;
font-weight: bold;
cursor: pointer;
user-select: none;
transition: all 0.2s ease-in-out;
}
.black { background-color: #769656; } /* Dark Green */
.white { background-color: green; } /* Light Cream */
.selected { background-color: yellow !important; } /* Selected Piece */
.valid-move { background-color: rgba(255, 255, 0, 0.6) !important; } /* Highlight Moves */
.capture { background-color: rgba(255, 0, 0, 0.6) !important; } /* Capture Move */
#turn {
font-size: 22px;
font-weight: bold;
margin-top: 15px;
}
#undo {
margin-bottom: 10px;
padding: 8px 16px;
font-size: 16px;
background-color: red;
color: white;
border: none;
cursor: pointer;
border-radius: 5px;
}
#undo:hover {
background-color: darkred;
}