:root {
  --primary-color: #2c3e50;
  --accent-color: #3498db;
  --bg-color: #f8f9fa;
  --board-bg: #ffffff;
  --text-color: #2c3e50;
  --cell-size: clamp(32px, 8vw, 50px); /* Responsive cell size */
  --grid-line-thick: 2px solid #34495e;
  --grid-line-thin: 1px solid #dfe6e9;
  --cell-hover: #e8f4f8;
  --cell-selected: #bbdefb;
  --cell-highlight: #e3f2fd;
  --cell-error: #ffcdd2;
  --text-error: #c62828;
  --text-given: #2c3e50;
  --text-input: #1976d2;
}

/* Body styles removed to use global src/index.css */

/* .main-wrap removed to use global src/index.css */

/* .container removed to use global src/index.css */

/* Breadcrumb removed - using global src/index.css */

/* Menu Screen */
#menu-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

.menu-title {
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--primary-color);
  font-weight: 300;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 800px;
  width: 100%;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #eee;
  text-decoration: none;
  color: inherit;
  position: relative; /* For absolute positioning of badges */
}

.menu-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.menu-item-label {
  color: #333;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.menu-item-sublabel {
  color: #666;
  font-size: 0.9rem;
  margin-top: -8px;
}

.menu-icon {
  background: white;
  border-radius: 4px;
  padding: 2px;
  display: grid;
  gap: 1px;
  width: 80px;
  height: 80px;
  box-sizing: border-box;
  border: 2px solid #333;
  background-color: #333;
}

.menu-icon div {
  background: white;
}

.icon-9x9 {
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
}

.icon-6x6 {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
}

/* Hard mode styles */
.menu-item.hard-item {
  border: 2px solid #b8860b; /* Dark gold border */
  box-shadow: 0 0 10px rgba(184, 134, 11, 0.2);
}

.grandmaster-badge {
  position: absolute;
  top: -12px;
  background: #b8860b;
  color: white;
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Kids mode styles */
.menu-item.six-item {
  border: 2px solid #FFD700;
  overflow: visible;
}

.kids-badge {
  position: absolute;
  top: -12px;
  right: -10px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  color: white;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: bold;
  transform: rotate(5deg);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 10;
}

/* Game Interface */
.game-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
  margin: 0 auto;
  padding: 20px 0;
}

.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.difficulty-badge {
  background: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.9rem;
}

.timer {
  font-family: monospace;
  font-size: 1.2rem;
  color: var(--primary-color);
}

#sudoku-board {
  display: grid;
  gap: 1px;
  background-color: #34495e;
  border: var(--grid-line-thick);
  aspect-ratio: 1;
}

.cell {
  background: var(--board-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--cell-size);
  cursor: pointer;
  user-select: none;
  position: relative;
}

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

.cell.selected {
  background-color: var(--cell-selected);
}

.cell.highlighted {
  background-color: var(--cell-highlight);
}

.cell.error {
  background-color: var(--cell-error);
  color: var(--text-error);
}

.cell.given {
  color: var(--text-given);
  font-weight: bold;
}

.cell.input {
  color: var(--text-input);
}

/* Controls */
.controls {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 20px;
}

.numpad-btn {
  aspect-ratio: 1;
  border: 1px solid #ddd;
  background: white;
  border-radius: 8px;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.1s;
  color: var(--primary-color);
}

.numpad-btn:active {
  transform: scale(0.95);
  background: #eee;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  gap: 10px;
}

.action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  background: var(--primary-color);
  color: white;
  font-size: 0.9rem;
  cursor: pointer;
  flex: 1;
}

.action-btn.secondary {
  background: transparent;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

/* 9x9 Grid Specifics */
.grid-9x9 {
  grid-template-columns: repeat(9, 1fr);
}

.grid-9x9 .cell:nth-child(3n) {
  border-right: var(--grid-line-thick);
}

.grid-9x9 .cell:nth-child(9n) {
  border-right: none;
}

.grid-9x9 .cell:nth-child(n+19):nth-child(-n+27),
.grid-9x9 .cell:nth-child(n+46):nth-child(-n+54) {
  border-bottom: var(--grid-line-thick);
}

/* 6x6 Grid Specifics */
.grid-6x6 {
  grid-template-columns: repeat(6, 1fr);
}

.grid-6x6 .cell:nth-child(3n) {
  border-right: var(--grid-line-thick);
}

.grid-6x6 .cell:nth-child(6n) {
  border-right: none;
}

.grid-6x6 .cell:nth-child(n+13):nth-child(-n+18) {
  border-bottom: var(--grid-line-thick);
}

@media (max-width: 600px) {
  .controls {
    gap: 4px;
  }
  
  .numpad-btn {
    border-radius: 4px;
  }
}
