:root {
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --primary-color: #bb86fc;
  --primary-variant-color: #3700b3;
  --secondary-color: #03dac6;
  --on-background-color: #ffffff;
  --on-surface-color: #e0e0e0;
  --ball-color-1: #FF8A80; /* Light Red */
  --ball-color-2: #FFD180; /* Light Orange */
  --ball-color-3: #FFFF8D; /* Light Yellow */
  --ball-color-4: #80D8FF; /* Light Blue */
  --ball-color-5: #A7FFEB; /* Light Teal */
  --shadow-color: rgba(0, 0, 0, 0.5);
  --toggle-bg: #282828;
  --toggle-fg: #bb86fc;
}

body[data-theme="light"] {
  --background-color: #f0f2f5;
  --surface-color: #ffffff;
  --primary-color: #6200ee;
  --primary-variant-color: #3700b3;
  --secondary-color: #03dac6;
  --on-background-color: #000000;
  --on-surface-color: #333333;
  --shadow-color: rgba(0, 0, 0, 0.15);
  --toggle-bg: #e0e0e0;
  --toggle-fg: #6200ee;
}

body {
  background-color: var(--background-color);
  color: var(--on-background-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 5vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* Subtle noise texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 800 800' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

#theme-switcher {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}

#theme-toggle {
  display: none;
}

#theme-toggle + label {
  display: inline-block;
  width: 50px;
  height: 26px;
  background-color: var(--toggle-bg);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#theme-toggle + label > span {
  display: block;
  width: 22px;
  height: 22px;
  background-color: var(--toggle-fg);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
}

#theme-toggle:checked + label > span {
  transform: translateX(24px);
}


main {
  text-align: center;
  background-color: var(--surface-color);
  padding: 2rem 3rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px var(--shadow-color);
  width: 90%;
  max-width: 600px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--on-surface-color);
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

#generate-btn {
  background-color: var(--primary-color);
  color: #000000;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(187, 134, 252, 0.3);
}

body[data-theme="light"] #generate-btn {
   box-shadow: 0 4px 15px rgba(98, 0, 238, 0.3);
   color: #ffffff;
}


#generate-btn:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3, 218, 198, 0.4);
}

#generate-btn:active {
  transform: translateY(0);
}

#results-container {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
