/* Dark-mode fixes for per-game CSS that still hardcodes light colors */

[data-theme="dark"] #game-section .tile,
[data-theme="dark"] #game-section .cell,
[data-theme="dark"] #game-section .sudoku-cell,
[data-theme="dark"] #game-section .clue-item,
[data-theme="dark"] #game-section .question-card,
[data-theme="dark"] #game-section .answer-btn,
[data-theme="dark"] #game-section .quiz-option,
[data-theme="dark"] #game-section .option-btn,
[data-theme="dark"] #game-section .memory-card,
[data-theme="dark"] #game-section .card-back,
[data-theme="dark"] #game-section .card-front,
[data-theme="dark"] #game-section .letter-box,
[data-theme="dark"] #game-section .guess-row,
[data-theme="dark"] #game-section .keyboard-key,
[data-theme="dark"] #game-section .key,
[data-theme="dark"] #game-section .input-cell,
[data-theme="dark"] #game-section .crossword-cell,
[data-theme="dark"] #game-section .cw-cell,
[data-theme="dark"] #game-section .panel,
[data-theme="dark"] #game-section .game-panel,
[data-theme="dark"] #game-section .info-panel,
[data-theme="dark"] #game-section .hint-panel,
[data-theme="dark"] #game-section .score-panel,
[data-theme="dark"] #game-section .word-display,
[data-theme="dark"] #game-section .anagram-display,
[data-theme="dark"] #game-section .sequence-display,
[data-theme="dark"] #game-section .feedback-area,
[data-theme="dark"] #game-section .stats-box,
[data-theme="dark"] #game-section .stat-box,
[data-theme="dark"] #game-section .controls-panel,
[data-theme="dark"] #game-section .game-controls,
[data-theme="dark"] #game-section .board-cell,
[data-theme="dark"] #game-section .grid-cell,
[data-theme="dark"] #game-section .tile-cell,
[data-theme="dark"] #game-section .number-cell,
[data-theme="dark"] #game-section .blank-cell,
[data-theme="dark"] #game-section .filled-cell,
[data-theme="dark"] #game-section .word-item,
[data-theme="dark"] #game-section .hangman-key,
[data-theme="dark"] #game-section .letter-btn,
[data-theme="dark"] #game-section .choice-btn,
[data-theme="dark"] #game-section .category-btn,
[data-theme="dark"] #game-section .difficulty-btn,
[data-theme="dark"] #game-section select,
[data-theme="dark"] #game-section input[type="text"],
[data-theme="dark"] #game-section input[type="number"],
[data-theme="dark"] #game-section textarea {
  background: var(--color-surface-raised);
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] #game-section .game-board,
[data-theme="dark"] #game-section .sudoku-board,
[data-theme="dark"] #game-section .grid-container,
[data-theme="dark"] #game-section .board-grid,
[data-theme="dark"] #game-section .word-list,
[data-theme="dark"] #game-section .game-info,
[data-theme="dark"] #game-section .puzzle-area,
[data-theme="dark"] #game-section .quiz-container,
[data-theme="dark"] #game-section .study-container,
[data-theme="dark"] #game-section .trivia-container,
[data-theme="dark"] #game-section .logic-container,
[data-theme="dark"] #game-section .clues-panel,
[data-theme="dark"] #game-section .keyboard-row,
[data-theme="dark"] #game-section .virtual-keyboard {
  background: var(--color-bg);
  border-color: var(--color-border);
}

[data-theme="dark"] #game-section .hint-box,
[data-theme="dark"] #game-section .instruction-box,
[data-theme="dark"] #game-section .yellow-panel,
[data-theme="dark"] #game-section .anagram-hint,
[data-theme="dark"] #game-section .sequence-hint {
  background: var(--color-primary-light);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] #game-section .correct,
[data-theme="dark"] #game-section .tile.correct {
  background: var(--color-teal-dark);
  color: #fff;
  border-color: var(--color-teal);
}

[data-theme="dark"] #game-section .present,
[data-theme="dark"] #game-section .tile.present {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}

[data-theme="dark"] #game-section .absent,
[data-theme="dark"] #game-section .tile.absent {
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

[data-theme="dark"] #game-section .selected,
[data-theme="dark"] #game-section .active-cell,
[data-theme="dark"] #game-section .highlight,
[data-theme="dark"] #game-section .found {
  background: var(--color-primary-light);
  color: var(--color-text);
}

[data-theme="dark"] #game-section .fixed,
[data-theme="dark"] #game-section .given,
[data-theme="dark"] #game-section .prefilled {
  color: var(--color-primary);
}

[data-theme="dark"] #game-section .error,
[data-theme="dark"] #game-section .wrong,
[data-theme="dark"] #game-section .incorrect {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: var(--color-danger);
}

[data-theme="dark"] #game-section h2,
[data-theme="dark"] #game-section h3,
[data-theme="dark"] #game-section h4,
[data-theme="dark"] #game-section label,
[data-theme="dark"] #game-section .label,
[data-theme="dark"] #game-section .question-text,
[data-theme="dark"] #game-section .prompt,
[data-theme="dark"] #game-section .stat-label,
[data-theme="dark"] #game-section .timer,
[data-theme="dark"] #game-section .score,
[data-theme="dark"] #game-section p {
  color: var(--color-text);
}

[data-theme="dark"] #game-section .muted,
[data-theme="dark"] #game-section .hint,
[data-theme="dark"] #game-section .subtext,
[data-theme="dark"] #game-section .description {
  color: var(--color-text-muted);
}

[data-theme="dark"] #game-section button:not(.btn-primary):not(.btn-install):hover,
[data-theme="dark"] #game-section .answer-btn:hover,
[data-theme="dark"] #game-section .quiz-option:hover,
[data-theme="dark"] #game-section .keyboard-key:hover,
[data-theme="dark"] #game-section .key:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-teal);
}

[data-theme="dark"] #game-section .btn-primary,
[data-theme="dark"] #game-section button.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

[data-theme="dark"] #game-section .btn-secondary {
  background: var(--color-surface-raised);
  color: var(--color-text);
  border-color: var(--color-border);
}
