:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --accent-color: #e74c3c;
  --background-color: #ecf0f1;
  --cell-color-1: #ffffff;
  --cell-color-2: #f0f0f0;
  --border-color: #bdc3c7;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  color: var(--secondary-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h1 {
  font-size: 2.5rem;
  font-weight: 600;
}

main {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

#game-container {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
#mistakes {
  display: none;
}

#player-form {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#player-name {
  padding: 0.5rem;
  font-size: 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
}

#sudoku-board {
  display: none;
  /* display: grid; */
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 1px;
  background-color: var(--border-color);
  border: 2px solid var(--secondary-color);
  width: 450px;
  height: 450px;
}

.cell {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* White-gray alternating pattern */
.cell:nth-child(odd) {
  background-color: var(--cell-color-1);
}

.cell:nth-child(even) {
  background-color: var(--cell-color-2);
}

/* Highlight focused cell */
.cell:focus {
  background-color: #e8f6ff;
  outline: none;
}

/* Add thicker borders to create 3x3 sub-grids */
.cell:nth-child(3n) {
  border-right: 2px solid var(--secondary-color);
}

.cell:nth-child(n + 19):nth-child(-n + 27),
.cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom: 2px solid var(--secondary-color);
}

.controls {
  display: none;
  /* display: flex; */
  justify-content: center;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background-color: var(--primary-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--accent-color);
}

footer {
  background-color: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: auto;
}
.correct-input {
  color: green;
}

.incorrect-input {
  color: red;
}

@media (max-width: 768px) {
  #sudoku-board {
    width: 400px;
    height: 400px;
  }

  .cell {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  #game-container {
    padding: 1rem;
  }

  #player-form {
    flex-direction: column;
  }

  #sudoku-board {
    width: 300px;
    height: 300px;
  }

  .cell {
    font-size: 1rem;
  }

  .controls {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
