* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, #e0f7fa, #ffe0f0);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  transition: background 0.4s ease;
}

#toggle-dark {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #222;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 0 10px #00000055;
}

.container.glass {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  text-align: center;
  width: 320px;
}

h1 {
  color: #333;
  margin-bottom: 20px;
}

.unit-toggle {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  color: #444;
}

.unit-toggle input {
  margin-right: 5px;
}

.note {
  font-size: 0.85rem;
  color: #e67e22;
  margin-bottom: 12px;
}

input {
  width: 100%;
  padding: 12px;
  margin-bottom: 16px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
  font-size: 1rem;
}

.glow-button {
  padding: 12px 24px;
  background: linear-gradient(45deg, #00c6ff, #0072ff);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 114, 255, 0.5);
  transition: transform 0.2s ease;
}

.glow-button:hover {
  transform: scale(1.05);
}

#result {
  margin-top: 20px;
  font-size: 1.2rem;
}

.bmi-result {
  padding: 10px;
  border-radius: 10px;
  margin-top: 10px;
  display: inline-block;
  font-weight: bold;
  color: white;
}

.underweight { background: #f39c12; }
.normal { background: #2ecc71; }
.overweight { background: #e67e22; }
.obese { background: #e74c3c; }

.loader {
  border: 4px solid #eee;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
  margin: 15px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

body.dark-mode {
  background: linear-gradient(135deg, #1a1a1a, #333);
}

body.dark-mode .glass {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

body.dark-mode input {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

body.dark-mode .unit-toggle {
  color: #ccc;
}

body.dark-mode .note {
  color: #f4d03f;
}

body.dark-mode .glow-button {
  background: linear-gradient(45deg, #ff6a00, #ee0979);
  box-shadow: 0 4px 20px rgba(255, 105, 180, 0.3);
}
