/* Add styles here */
:root {
  --background-color: #f0f0f0;
  --text-color: #333;
  --button-bg-color: #008CBA;
  --button-hover-bg-color: #005f7a;
  --lottery-number-bg-color: #4CAF50;
  --lottery-number-text-color: white;
  --historical-header-color: #555;
  --generated-history-bg-color: #e0e0e0;
}

body[data-theme="dark"] {
  --background-color: #333;
  --text-color: #f0f0f0;
  --button-bg-color: #555;
  --button-hover-bg-color: #777;
  --lottery-number-bg-color: #2e7d32;
  --lottery-number-text-color: white;
  --historical-header-color: #bbb;
  --generated-history-bg-color: #444;
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
  color: var(--text-color);
  margin-bottom: 30px;
}

#lottery-numbers {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  min-height: 60px; /* Ensure space for numbers even when empty */
  align-items: center;
}

.lottery-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--lottery-number-bg-color);
  color: var(--lottery-number-text-color);
  font-size: 1.5em;
  font-weight: bold;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

button {
  padding: 15px 30px;
  font-size: 1.2em;
  background-color: var(--button-bg-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: var(--button-hover-bg-color);
}

.theme-toggle-container {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* Historical Lottery Section Styles */
#historical-lottery-section {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid var(--text-color);
  width: 80%;
  max-width: 600px;
  text-align: center;
  display: none; /* Initially hidden */
}

#historical-lottery-section h2 {
  color: var(--historical-header-color);
  margin-bottom: 20px;
}

.historical-draw {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.historical-draw p {
  margin: 0 0 10px 0;
  font-weight: bold;
}

.historical-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.lottery-number.historical {
  width: 40px;
  height: 40px;
  font-size: 1.2em;
  box-shadow: none;
  background-color: #6c757d; /* A different shade for historical numbers */
}

.lottery-number.historical.bonus {
  background-color: #ffc107; /* Bonus number color */
  color: #333;
}

/* Generated Numbers Container Styles (now inside historical section) */
#generated-numbers-container {
  margin-top: 30px; /* Add some space above */
  padding-top: 20px;
  border-top: 1px dashed var(--text-color); /* Add a dashed separator */
  text-align: center;
}

.generated-history-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
  padding: 8px;
  background-color: var(--generated-history-bg-color);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.lottery-number.generated-history {
  width: 35px;
  height: 35px;
  font-size: 1em;
  box-shadow: none;
  background-color: #8D6E63; /* A distinct color for generated history */
}