#chessBoard { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border: 0px; } .chessSquare { background-color: inherit; position: relative; } .chessSquare.light { background: #ccc; } .chessSquare.dark { background: #656770; } .chessPiece { width: 90%; height: 90%; display: block; margin: auto; } .chessSquare.selected { border: 4px solid red; box-sizing: border-box; } .legalOverlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; /* Let clicks go through */ box-sizing: border-box; border: 4px dashed red; z-index: 10; } #chessBoard.flipped { transform: rotate(180deg); } .chessSquare.light.previous-start { background: linear-gradient(rgba(0, 88, 171, 0.3), rgba(0, 88, 171, 0.3)), #ccc; } .chessSquare.light.previous-end { background: linear-gradient(rgba(0, 88, 171, 0.3), rgba(0, 88, 171, 0.3)), #ccc; } .chessSquare.dark.previous-start { background: linear-gradient(rgba(0, 88, 171, 0.3), rgba(0, 88, 171, 0.3)), #656770; } .chessSquare.dark.previous-end { background: linear-gradient(rgba(0, 88, 171, 0.3), rgba(0, 88, 171, 0.3)), #656770; } #promotionModal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #1e1e1e; padding: 20px; border-radius: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.6); color: white; z-index: 1000; text-align: center; } #promotionModal p { margin-bottom: 15px; font-size: 18px; font-weight: bold; } #promotionBtnContainer { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; justify-content: center; } #promotionBtnContainer button { background-color: #2c2c2c; border: none; padding: 10px; border-radius: 8px; cursor: pointer; transition: transform 0.2s ease; } #promotionBtnContainer button:hover { transform: scale(1.1); background-color: #3a3a3a; } #promotionBtnContainer img { width: 50px; height: 50px; pointer-events: none; /* ensures img doesn't steal the click */ } #difficultyModal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #1e1e1e; padding: 20px; border-radius: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.6); color: white; z-index: 1000; text-align: center; } #difficultyModal p { margin-bottom: 15px; font-size: 18px; font-weight: bold; } #difficultyButtonContainer { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; justify-content: center; } #difficultyButtonContainer button { background-color: #2c2c2c; border: none; padding: 10px; border-radius: 8px; cursor: pointer; transition: transform 0.2s ease; color: white; } #difficultyButtonContainer button:hover { transform: scale(1.1); background-color: #3a3a3a; } #difficultyButtonContainer img { width: 50px; height: 50px; pointer-events: none; /* ensures img doesn't steal the click */ } #colorModal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background-color: #1e1e1e; padding: 20px; border-radius: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.6); color: white; z-index: 1000; text-align: center; } #colorModal p { margin-bottom: 15px; font-size: 18px; font-weight: bold; } #colorButtonContainer { display: flex; gap: 10px; justify-content: center; } #colorButtonContainer button { background-color: #2c2c2c; border: none; padding: 10px 18px; border-radius: 8px; cursor: pointer; transition: transform 0.2s ease; color: white; } #colorButtonContainer button:hover { transform: scale(1.1); background-color: #3a3a3a; } .chessSquare .coordinate-label { position: absolute; font-size: 1.2vw; font-weight: bold; pointer-events: none; user-select: none; } .chessSquare.light .coordinate-label { color: #656770; } .chessSquare.dark .coordinate-label { color: #ccc; } .chessSquare .row-label { top: 2px; left: 4px; } .chessSquare .col-label { bottom: 2px; right: 4px; }