* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.4s, color 0.4s;
}

/* Light / Dark */
body.light {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: #000;
}

body.dark {
  background: #121212;
  color: #fff;
}

.container {
  background: white;
  padding: 25px;
  width: 100%;
  max-width: 360px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  animation: fadeIn 0.8s ease;
}

body.dark .container {
  background: #1f1f1f;
}

/* Top bar */
.top-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.mode-btn {
  border: none;
  background: none;
  font-size: 20px;
  cursor: pointer;
}

input, select {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.gender-box {
  display: flex;
  justify-content: space-around;
}

.unit-toggle {
  display: flex;
  gap: 10px;
}

#feetBox {
  display: none;
  gap: 10px;
}

button {
  width: 100%;
  padding: 12px;
  background: #2a5298;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #1e3c72;
  transform: scale(1.05);
}

/* Result Box */
.result-box {
  margin-top: 15px;
  padding: 15px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.5s ease;
}

.result-box.show {
  opacity: 1;
  transform: translateY(0);
}

/* Colors */
.blue { background: #cce5ff; color: #004085; }
.green { background: #d4edda; color: #155724; }
.orange { background: #ffe5b4; color: #856404; }
.red { background: #f8d7da; color: #721c24; }

/* Progress Bar */
.progress-container {
  width: 100%;
  height: 12px;
  background: #eee;
  border-radius: 10px;
  margin-top: 15px;
  overflow: hidden;
}

#bmiProgress {
  height: 100%;
  width: 0%;
  transition: width 0.6s ease;
}

/* BMI Chart */
.bmi-chart {
  display: flex;
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
}

.bar {
  flex: 1;
  padding: 6px 0;
  color: white;
}

.normal-range {
  border: 2px solid black;
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
