:root {
  --background-color-light: #f0f0f0;
  --text-color-light: #333;
  --container-bg-light: #fff;
  --button-bg-light: #007bff;
  --button-text-light: #fff;
  --number-bg-light: #e9ecef;

  --background-color-dark: #121212;
  --text-color-dark: #f0f0f0;
  --container-bg-dark: #1e1e1e;
  --button-bg-dark: #0056b3;
  --button-text-dark: #f0f0f0;
  --number-bg-dark: #333;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
  background-color: var(--background-color-light);
  color: var(--text-color-light);
}

body.dark-mode {
  background-color: var(--background-color-dark);
  color: var(--text-color-dark);
}

.container {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: background-color 0.3s;
}

body.light-mode .container {
    background-color: var(--container-bg-light);
}

body.dark-mode .container {
    background-color: var(--container-bg-dark);
}

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

h1 {
  font-size: 24px;
}

.numbers-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.3s, color 0.3s;
}

body.light-mode .number {
    background-color: var(--number-bg-light);
    color: var(--text-color-light);
}

body.dark-mode .number {
    background-color: var(--number-bg-dark);
    color: var(--text-color-dark);
}

#generate-btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s;
}

body.light-mode #generate-btn {
    background-color: var(--button-bg-light);
    color: var(--button-text-light);
}

body.dark-mode #generate-btn {
    background-color: var(--button-bg-dark);
    color: var(--button-text-dark);
}

.theme-switcher {
  display: flex;
  align-items: center;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}
