/* Base Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
}

/* Light & Dark Mode Variables */
:root {
  --bg-light: #f5f4f2;
  --text-light: #333;
  --card-light: #ffffff;
  --accent-light: #ffb3c1;

  --bg-dark: #222831;
  --text-dark: #eeeeee;
  --card-dark: #393e46;
  --accent-dark: #8dc6ff;

  --pastel-blue: #a8d8ea;
  --pastel-pink: #f6a6b2;
  --pastel-yellow: #ffeaa7;
  --pastel-mint: #c8facc;
  --pastel-lavender: #d5c3f7;
}

/* Mode Classes */
body.light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

body.dark {
  background-color: var(--bg-dark);
  color: var(--text-dark);
}

/* Body Styling for Centering */
body {
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center items horizontally */
    min-height: 100vh; /* Ensure body takes full viewport height */
    padding: 20px; /* Add some padding around the content */
}

/* Game Container */
.game-container {
  max-width: 500px;
  width: 100%; /* Ensure it takes full width up to max-width */
  margin: 20px auto; /* Adjust margin for spacing from the button */
  padding: 2rem;
  border-radius: 20px;
  background-color: var(--card-light);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: background-color 0.4s, color 0.4s;
}

#game-btns,
#reset-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Dark Mode Card Background */
body.dark .game-container {
  background-color: var(--card-dark);
}

/* Header */
#header h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: inherit;
}

/* Buttons */
#game-btns button,
#reset-container button,
.theme-toggle {
  background-color: var(--pastel-blue);
  border: none;
  padding: 0.8rem 1.5rem;
  margin: 0.5rem;
  font-size: 1rem;
  border-radius: 12px;
  cursor: pointer;
  color: #070606;
  transition: background-color 0.3s, transform 0.2s;
}

#game-btns button:hover,
#reset-container button:hover,
.theme-toggle:hover {
  transform: scale(1.05);
}

#game-btns button:nth-child(2) {
  background-color: var(--pastel-pink);
}

#game-btns button:nth-child(3) {
  background-color: var(--pastel-lavender);
}

#reset-container button {
  background-color: var(--pastel-mint);
}

.theme-toggle {
  /* Removed fixed positioning */
  background-color: var(--pastel-yellow);
  font-weight: 600;
  margin-bottom: 20px; /* Add margin below the button to separate it from the game container */
}

/* Score & Message Styling */
#message-el {
  text-align: center;
  font-size: 1.2rem;
  margin: 1.5rem 0;
}

#score-container {
  display: flex;
  justify-content: space-around;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 600px) {
  .game-container {
    margin: 20px 10px;
    padding: 1.5rem;
  }

  #game-btns button,
  #reset-container button {
    width: 90%;
    margin: 0.4rem auto;
    display: block;
  }

  #score-container {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}
