/* Base styles */
body {
  font-family: 'Poppins', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: #f0f2f5; /* Default light background */
  margin: 0;
  overflow: hidden; /* Prevents scrollbars */
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
}

/* Dark mode styles */
body.dark-mode {
  background-color: #121212; /* Dark mode background */
  color: #f1f1f1; /* Text color for dark mode */
}

.blobs-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1; /* Places blobs behind other content */
}

/* Adjust blob opacity for dark mode */
body.dark-mode .blob {
  opacity: 0.4; /* Reduce brightness in dark mode */
}

.blob {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,0,150,0.5), rgba(255,0,150,0.1));
  animation: moveBlobs 30s infinite ease-in-out;
  filter: blur(80px);
  opacity: 0.7;
}

.blob:nth-child(2) {
  background: radial-gradient(circle, rgba(0,255,150,0.5), rgba(0,255,150,0.1));
  animation-duration: 35s;
}

.blob:nth-child(3) {
  background: radial-gradient(circle, rgba(0,150,255,0.5), rgba(0,150,255,0.1));
  animation-duration: 40s;
}

.blob:nth-child(4) {
  background: radial-gradient(circle, rgba(255,150,0,0.5), rgba(255,150,0,0.1));
  animation-duration: 45s;
}

.blob:nth-child(5) {
  background: radial-gradient(circle, rgba(150,0,255,0.5), rgba(150,0,255,0.1));
  animation-duration: 50s;
}

@keyframes moveBlobs {
  0%, 100% {
      transform: translateY(-10vh) translateX(0);
  }
  25% {
      transform: translateY(20vh) translateX(10vw);
  }
  50% {
      transform: translateY(-10vh) translateX(20vw);
  }
  75% {
      transform: translateY(10vh) translateX(-10vw);
  }
}

/* Container and Form styles */
.container {
  background: rgba(255, 255, 255, 0.6); /* Semi-transparent background */
  backdrop-filter: blur(10px); /* Blur effect */
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 500px;
  position: relative; /* Ensure it appears above blobs */
  z-index: 1;
  transition: background 0.3s ease;
}

body.dark-mode .container {
  background: rgba(0, 0, 0, 0.5); /* Dark mode container background */
}

h1 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
  color: #007bff;
  font-weight: 600;
  transition: color 0.3s ease;
}

body.dark-mode h1 {
  color: #80bfff; /* Lighter blue for dark mode */
}

form {
  display: flex;
  flex-direction: column;
}

label {
  margin-top: 10px;
  font-weight: 500;
  color: #333;
  transition: color 0.3s ease;
}

body.dark-mode label {
  color: #ddd; /* Light color in dark mode */
}

input[type="text"],
input[type="number"],
input[type="file"] {
  padding: 12px;
  margin-top: 5px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease, background 0.3s ease;
  background: rgba(255, 255, 255, 0.8); /* Ensure input fields are not too transparent */
}

body.dark-mode input[type="text"],
body.dark-mode input[type="number"],
body.dark-mode input[type="file"] {
  background: rgba(30, 30, 30, 0.8); /* Dark mode input fields */
  border-color: #555;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="file"]:focus {
  border-color: #007bff;
  outline: none;
}

button {
  padding: 15px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

body.dark-mode button {
  background-color: #0056b3;
}

a#download-link {
  margin-top: 20px;
  text-align: center;
  display: block;
  color: #007bff;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

body.dark-mode a#download-link {
  color: #80bfff; /* Adjusted link color for dark mode */
}

a#download-link:hover {
  color: #0056b3;
}

/* Sun/Moon Toggle Button */
#theme-toggle {
  position: fixed;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;
  transition: color 0.3s ease;
}

body.dark-mode #theme-toggle {
  color: #f1f1f1; /* Light color for the toggle in dark mode */
}

.inline-field {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between HU Type input and checkbox */
}

.inline-field label {
  margin-bottom: 0; /* Aligns the label with input field */
}

#theme-toggle,
#download-example,
#download-material {
    margin-right: 10px; /* Add space between buttons */
}

#download-example,
#download-material {
    background-color: #007bff; /* Same color as the other buttons */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#download-example:hover,
#download-material:hover {
    background-color: #0056b3; /* Darker blue on hover */
}
