/* fun-hub-styles.css - Styles specific to Fun Hub */
.sudoku-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center; /* Center all children horizontally */
  max-width: 600px; /* Limit width for better focus */
  margin: 0 auto; /* Center the wrapper itself */
}

#sudoku-level {
  margin-bottom: 10px;
  padding: 8px;
  width: 200px; /* Fixed width for centering */
  border: 1px solid #d2b48c;
  border-radius: 4px;
  text-align: center;
}

#sudoku-board {
  margin-bottom: 10px;
}

#sudoku-progress {
  margin-bottom: 10px;
  font-weight: bold;
  text-align: center;
}

.sudoku-buttons {
  display: flex;
  justify-content: center; /* Center buttons */
  gap: 10px; /* Space between */
  flex-wrap: wrap; /* Wrap on small screens */
}

#sudoku-board table {
  border-collapse: collapse;
  margin: 0 auto;
  background: #f9f5f0; /* Warm beige base */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
}

#sudoku-board td {
  border: 1px solid #8b5a2b; /* Earthy brown thin borders */
  width: 50px; /* Larger cells for touch/visibility */
  height: 50px;
  text-align: center;
  font-size: 24px; /* Bigger font for seniors */
  font-weight: bold;
  color: #333;
}

#sudoku-board tr:nth-child(3n) td {
  border-bottom: 3px solid #746858; /* Thicker for horizontal 3x3 blocks */
}

#sudoku-board td:nth-child(3n) {
  border-right: 3px solid #746858; /* Thicker for vertical 3x3 blocks */
}

#sudoku-board tr:nth-child(3n+1) td:nth-child(3n+1),
#sudoku-board tr:nth-child(3n+2) td:nth-child(3n+2),
#sudoku-board tr:nth-child(3n+3) td:nth-child(3n+3) {
  background: rgba(210, 180, 140, 0.2); /* Subtle tan alternation for blocks */
}

.user-filled {
  background: #a8a1e7; /* Light tan for user input - warm, distinct */
  color: #e06a09; /* Darker brown text */
}

.pre-filled {
  background: #f9f5f0; /* Beige for original */
  color: #8b5a2b; /* Earthy brown */
}

.hint-filled {
  background: #d4edda; /* Light green for hints - fresh, kind feel */
  color: #155724; /* Dark green text */
  font-style: italic; /* Subtle distinction */
}

.sudoku-input {
  width: 100%;
  height: 100%;
  text-align: center;
  font-size: 24px;
  border: none;
  background: transparent;
}

.sudoku-input:focus {
  outline: none;
  background: #ffd700; /* Gold highlight on focus */
}

.invalid-temp {
  background: #fffacd; /* Lemon yellow warning */
}

.invalid {
  background: #ffdddd; /* Red flash */
}

.puzzle-section {
  margin-bottom: 40px;
  padding: 20px;
  background: #f0cfac;
  border-radius: 8px;
}

/* Sudoku-specific (example) */
#sudoku-board table {
  border-collapse: collapse;
  margin: 0 auto;
}

#sudoku-board td {
  border: 1px solid #8b5a2b;
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 24px;
}

/* Add your other puzzle styles, button hovers, etc. here */

.puzzle-section button {
  padding: 10px 20px;
  background-color: #8b5a2b; /* Earthy brown base */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-right: 10px;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; /* Smooth all changes */
}

.puzzle-section button:hover {
  background-color: #ffa600; /* Bright gold for visibility */
  transform: scale(1.05); /* Slight "movement" grow */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Depth shadow */
  color: #333; /* Darker text for contrast */
}

/* ======= Here for guess number game =========*/
.guess-game-controls {
  display: flex;
  justify-content: center;
  gap: 10px; /* Space between input and button */
  max-width: 400px; /* Center and limit width */
  margin: 0 auto 10px;
}

#guess-input {
  width: 150px; /* Wider for easy tapping */
  padding: 12px;
  font-size: 24px; /* Bigger numbers */
  text-align: center;
  border: 2px solid #8b5a2b; /* Earthy border */
  border-radius: 8px; /* Rounded for softness */
  background: #f9f5f0; /* Warm beige */
  color: #333; /* Dark text for contrast */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#guess-input:focus {
  border-color: #ffd700; /* Gold highlight on focus */
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5); /* Glow for visibility */
  outline: none;
}

#guess-game-controls button {
  padding: 12px 20px; /* Match input height */
  font-size: 20px; /* Slightly smaller than input for balance */
  background-color: #8b5a2b; /* Earthy brown */
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

#guess-game-controls button:hover {
  background-color: #ffd700; /* Gold on hover */
  transform: scale(1.05); /* Slight "pop" movement */
}

#guess-feedback {
  text-align: center;
  font-size: 18px;
  color: #6f4420; /* Dark brown for warmth */
  margin-top: 10px;
}

/*====== Here for memory match game ======*/

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* For 8 cards */
  gap: 10px;
}

.memory-card {
  height: 100px;
  background: #d2b48c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: 8px;
}

#memory-score {
  text-align: center;
  font-size: 18px; /* Regular score size */
  min-height: 30px;
  color: #333; /* Default color */
  margin-top: 10px;
}

#sudoku-feedback.win-message,
#guess-feedback.win-message,
#memory-score.win-message {
  font-size: 28px; /* Larger for emphasis */
  color: #f805f8 !important; /* Gold - force override if needed */
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth/enhancement */
  animation: pulse 1s infinite; /* Optional pulse for fun "heartbeat" effect */
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}