:root {
  --body-bg: #f4f4f4;
  --text-color: #333;
  --container-bg: #fff;
  --container-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  --h1-color: #0056b3;
  --button-bg: #007bff;
  --button-hover-bg: #0056b3;
  --result-color: #28a745;
  --number-circle-bg: #e9ecef;
  --number-circle-border: #ccc;
  --theme-toggle-color: #fff;
  --theme-toggle-bg: #6c757d;
  --theme-toggle-hover-bg: #5a6268;
  --select-bg: #f0f0f0;
  --select-border: #ccc;
  --historical-header-color: #0056b3;
  --historical-number-bg: #e0e0e0;
  --form-element-bg: #e9ecef;
  --form-element-border: #ced4da;
}

body.dark-mode {
  --body-bg: #222;
  --text-color: #eee;
  --container-bg: #333;
  --container-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  --h1-color: #6daffc;
  --button-bg: #4a90e2;
  --button-hover-bg: #3a7bd5;
  --result-color: #5cb85c;
  --number-circle-bg: #444;
  --number-circle-border: #666;
  --theme-toggle-color: #222;
  --theme-toggle-bg: #adb5bd;
  --theme-toggle-hover-bg: #999ba0;
  --select-bg: #555;
  --select-border: #888;
  --historical-header-color: #6daffc;
  --historical-number-bg: #555;
  --form-element-bg: #444;
  --form-element-border: #666;
}

body {
  font-family: 'Arial', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-color: var(--body-bg);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow: hidden; /* Prevent scrollbars from notes */
}

#currency-notes-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allow interaction with elements beneath */
  overflow: hidden; /* Ensure notes don't go beyond screen */
  z-index: -1; /* Place behind other content */
}

.currency-note {
  position: absolute;
  width: 100px; /* Placeholder size */
  height: 50px; /* Placeholder size */
  background-color: gold; /* Placeholder color */
  border-radius: 5px;
  opacity: 0;
  animation: fly-across linear infinite;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

@keyframes fly-across {
  0% {
    transform: translateX(-100vw) translateY(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateX(100vw) translateY(0) rotate(720deg);
    opacity: 0;
  }
}


.container {
  background-color: var(--container-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: var(--container-shadow);
  text-align: center;
  width: 90%;
  max-width: 500px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  position: relative; /* To keep content above notes */
  z-index: 0;
  overflow-y: auto; /* Allow scrolling if content is too long */
  max-height: 90vh; /* Limit height to prevent container overflow */
}

h1 {
  color: var(--h1-color);
  margin-bottom: 20px;
  transition: color 0.3s ease;
}

.zodiac-selection-container {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.zodiac-selection-container label {
  font-size: 1.1em;
  color: var(--text-color);
}

.zodiac-selection-container select {
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid var(--select-border);
  background-color: var(--select-bg);
  color: var(--text-color);
  font-size: 1em;
  cursor: pointer;
  appearance: none; /* Remove default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" fill-rule="evenodd"></path></svg>');
  background-repeat: no-repeat;
  background-position: right 0.7em top 50%, 0 0;
  background-size: 0.65em auto, 100%;
}

button {
  background-color: var(--button-bg);
  color: var(--text-color); /* Changed to text-color for icons */
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
  margin-bottom: 20px;
}

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

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  background-color: var(--theme-toggle-bg);
  color: var(--theme-toggle-color);
  width: 50px; /* Adjust button size for icon */
  height: 40px; /* Adjust button size for icon */
  padding: 0; /* Remove padding */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Hide overflow when icons switch */
}

.theme-toggle i {
  font-size: 20px;
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle .fa-sun {
  opacity: 1;
  transform: translateY(0);
}

.theme-toggle .fa-moon {
  opacity: 0;
  transform: translateY(20px); /* Start off-screen */
}

body.dark-mode .theme-toggle .fa-sun {
  opacity: 0;
  transform: translateY(-20px); /* Move off-screen */
}

body.dark-mode .theme-toggle .fa-moon {
  opacity: 1;
  transform: translateY(0);
}

.historical-data-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--select-border);
}

.historical-data-section h2 {
  color: var(--historical-header-color);
  margin-bottom: 15px;
}

#occurrenceData {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
  justify-items: center;
}

.occurrence-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.9em;
}

.occurrence-number-circle {
  background-color: var(--historical-number-bg);
  border: 1px solid var(--select-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  margin-bottom: 4px;
}

.occurrence-count {
  font-size: 0.8em;
  color: var(--text-color);
}

.feedback-form-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--select-border);
  text-align: left;
}

.feedback-form-section h2 {
  color: var(--h1-color);
  margin-bottom: 15px;
  text-align: center;
}

.feedback-form-section form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}

.feedback-form-section label {
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--text-color);
}

.feedback-form-section input[type="text"],
.feedback-form-section input[type="email"],
.feedback-form-section textarea {
  padding: 10px;
  border: 1px solid var(--form-element-border);
  border-radius: 5px;
  background-color: var(--form-element-bg);
  color: var(--text-color);
  font-size: 1em;
}

.feedback-form-section input[type="text"]:focus,
.feedback-form-section input[type="email"]:focus,
.feedback-form-section textarea:focus {
  outline: none;
  border-color: var(--button-bg);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.feedback-form-section textarea {
  resize: vertical;
  min-height: 80px;
}

.feedback-form-section button[type="submit"] {
  background-color: var(--button-bg);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 10px;
}

.feedback-form-section button[type="submit"]:hover {
  background-color: var(--button-hover-bg);
}


#result {
  font-size: 24px;
  font-weight: bold;
  color: var(--result-color);
  min-height: 30px; /* To maintain space even when empty */
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  transition: color 0.3s ease;
}

.number-circle {
  background-color: var(--number-circle-bg);
  border: 2px solid var(--number-circle-border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: var(--text-color);
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
