:root {
  --bg-color: #fcfcfd;
  --text-dark: #1e293b;
  --primary-blue: #1d4ed8;
  --accent-orange: #ea580c;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  margin: 0;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

h1 {
  color: var(--primary-blue);
  text-align: center;
  font-weight: 800;
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: -0.05em;
}

.view {
  display: none;
}

.view.active {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.toggle-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.difficulty-label {
  font-weight: 700;
  font-size: 1.1rem;
}

.active-easy { color: var(--primary-blue); }
.active-hard { color: var(--accent-orange); }
.muted { color: #94a3b8; }

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--primary-blue);
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px; width: 26px; left: 4px; bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-orange); }
input:checked + .slider:before { transform: translateX(26px); }

.section-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.puzzle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.puzzle-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--card-bg);
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.puzzle-btn:hover {
  background: var(--primary-blue);
  color: white;
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-btn {
  background: none; border: none;
  color: var(--primary-blue);
  font-weight: bold; cursor: pointer; font-size: 1rem;
}

.meta-tag {
  font-weight: bold;
  color: var(--accent-orange);
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* 🧱 SUDOKU INTERACTIVE GRID RENDER ENGINE STYLES */
.board-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.sudoku-grid {
  display: grid;
  background-color: #1e293b;
  border: 3px solid #1e293b;
  gap: 1px;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 420px;
}

.sudoku-grid input {
  width: 100%;
  height: 100%;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  border: none;
  background-color: #ffffff;
  color: #0f172a;
  outline: none;
  box-sizing: border-box;
  padding: 0;
}

/* Cell Status States */
.sudoku-grid input.starting-cell {
  background-color: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.sudoku-grid input.user-cell:focus {
  background-color: #eff6ff;
}

.sudoku-grid input.correct {
  color: #16a34a !important;
  background-color: #f0fdf4;
}

.sudoku-grid input.wrong {
  color: #dc2626 !important;
  background-color: #fef2f2;
  animation: shake 0.2s ease-in-out 2;
}

/* Gameplay Controls Bar layout */
.action-bar {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.action-btn {
  flex: 1;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.action-btn:hover { opacity: 0.9; }
.check-btn { background: var(--primary-blue); color: white; }
.next-btn { background: var(--accent-orange); color: white; }

.error-txt { color: #dc2626; font-weight: bold; text-align: center; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}