body {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #898989;
}

/* Buttons */
.buttons {
  display: flex;
  justify-content: center;
  text-align: center;
  margin-top: 20px;
}

.btn {
  appearance: button;
  background-color: #1899d6;
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  box-sizing: border-box;
  color: #ffffff;
  font-weight: bold;
  cursor: pointer;
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 20px;
  margin: 0 1px;
  padding: 10px 16px;
  outline: none;
  text-transform: uppercase;
  transition: filter 0.2s;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.btnX {
  appearance: button;
  background-color: #d61818;
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 20px;
  margin: 0 1px;
  padding: 10px 16px;
  outline: none;
  text-transform: uppercase;
  transition: filter 0.2s;
}

.btnX:hover:not(:disabled) {
  filter: brightness(2);
}

.btnCheck {
  appearance: button;
  background-color: #9318d6;
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.8px;
  line-height: 20px;
  margin: 0 1px;
  padding: 10px 16px;
  outline: none;
  text-transform: uppercase;
  transition: filter 0.2s;
}

.btnCheck:hover:not(:disabled) {
  filter: brightness(2);
}

/* Sudoku grid */
.sudoku {
  display: grid;
  grid-template-columns: repeat(9, 65px);
  grid-template-rows: repeat(9, 65px);
  width: fit-content;
  background-color: white;
  border: 4px solid black;
}

.cell {
  border: 1px solid #333;
  text-align: center;
  font-size: 26px;
  font-family: Arial, sans-serif;
  line-height: 65px;
  color: black;
  transition: background-color 0.2s;
}

/* ---- THICK BORDERS FOR 3×3 SUDOKU BOXES ---- */

/* Left border of each 3×3 block */
.cell:nth-child(3n + 1) {
  border-left: 3px solid black;
}

/* Right border of each 3×3 block */
.cell:nth-child(3n) {
  border-right: 3px solid black;
}

/* Top border of each 3×3 block */
.cell:nth-child(-n + 9),
.cell:nth-child(n + 28):nth-child(-n + 36),
.cell:nth-child(n + 55):nth-child(-n + 63) {
  border-top: 3px solid black;
}

/* Bottom border of each 3×3 block */
.cell:nth-child(n + 19):nth-child(-n + 27),
.cell:nth-child(n + 46):nth-child(-n + 54),
.cell:nth-child(n + 73):nth-child(-n + 81) {
  border-bottom: 3px solid black;
}

/* ✅ FIX: Always thick bottom border on the last row */
.sudoku .cell:nth-last-child(-n + 9) {
  border-bottom: 3px solid black !important;
}

.result {
  color: black;
  text-align: center;
  text-decoration: solid;
}
h2 {
  margin-top: 0;
}

.cell.active {
  background-color: aqua;
  filter: brightness(2);
}

.cell.fixed {
  font-weight: bold;
  color: black; /* или друг цвят */
}

.cell.correct{
  background-color: rgba(29, 255, 29, 0.763);
}

.cell.wrong{
  background-color: rgba(255, 29, 29, 0.763);
}