/* Sudoku Game Styles */

.game-container {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.game-title {
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.game-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.game-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.difficulty-select {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--secondary);
}

.new-game-btn {
  background: var(--primary);
  color: white;
}

.new-game-btn:hover {
  transform: translateY(-2px);
}

.back-btn {
  background: #ff6b6b;
  color: white;
}

.back-btn:hover {
  background: #ff5252;
}

.hint-btn {
  background: #2196f3;
  color: white;
}

.hint-btn:hover {
  background: #1976d2;
}

.game-info {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-weight: 600;
  justify-content: center;
}

.sudoku-container {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
  max-width: 500px;
}

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 1px;
  background: #333;
  border: 3px solid #333;
  width: 100%;
  aspect-ratio: 1;
  max-width: 450px;
  margin: 0 auto;
}

.sudoku-cell {
  background: var(--card-bg);
  border: none;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  transition: all 0.2s ease;
  width: 100%;
  height: 100%;
  min-height: 45px;
}

.sudoku-cell:focus {
  outline: 3px solid var(--primary);
  background: var(--primary);
  color: white;
  z-index: 10;
}

.sudoku-cell.given {
  background: #f5f5f5;
  color: #1a1a1a;
  font-weight: 700;
}

[data-theme="dark"] .sudoku-cell.given {
  background: #2a2a2a;
  color: #e0e0e0;
}

.sudoku-cell.conflict {
  background: #ffcdd2;
  color: #c62828;
  font-weight: 700;
}

[data-theme="dark"] .sudoku-cell.conflict {
  background: #4a1a1a;
  color: #ff6b6b;
}

.sudoku-cell.hint {
  background: #e1f5fe;
  color: #0277bd;
  font-weight: 700;
}

[data-theme="dark"] .sudoku-cell.hint {
  background: #1a3a4a;
  color: #4fc3f7;
}

/* Create proper 3x3 block borders - thick borders after every 3rd column */
.sudoku-cell:nth-child(3n):not(:nth-child(9n)) {
  border-right: 2px solid #333;
}

/* Thick borders after every 3rd row (rows 3, 6) */
.sudoku-cell:nth-child(n + 19):nth-child(-n + 27),
.sudoku-cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom: 2px solid #333;
}

.completion-message {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid #4caf50;
}

/* Celebration animations */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes celebrationPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .game-container {
    padding: 1rem;
  }

  .game-title {
    font-size: 2rem;
  }

  .sudoku-container {
    max-width: 350px;
  }

  .sudoku-grid {
    max-width: 320px;
  }

  .sudoku-cell {
    font-size: 1rem;
    min-height: 35px;
  }

  .game-info {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .sudoku-container {
    max-width: 300px;
  }

  .sudoku-grid {
    max-width: 270px;
  }

  .sudoku-cell {
    font-size: 0.9rem;
    min-height: 30px;
  }
}
