html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

#page-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #4CAF50;
  margin-bottom: 8px;
}

#page-subtitle {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-bottom: 32px;
}

#calc-section {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px 20px;
  margin-bottom: 24px;
}

.input-group {
  margin-bottom: 24px;
}

#gender-label,
#height-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #555;
  margin-bottom: 10px;
}

#gender-buttons {
  display: flex;
  gap: 12px;
}

.gender-btn {
  flex: 1;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 600;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fafafa;
  color: #666;
  cursor: pointer;
  transition: all 0.25s ease;
}

.gender-btn:hover {
  border-color: #bbb;
}

.gender-btn.active {
  border-color: #4CAF50;
  background: #e8f5e9;
  color: #2E7D32;
}

#gender-male.active {
  border-color: #2196F3;
  background: #e3f2fd;
  color: #1565C0;
}

#gender-female.active {
  border-color: #E91E63;
  background: #fce4ec;
  color: #C2185B;
}

#height-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

#height-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: #e0e0e0;
  outline: none;
}

#height-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(76,175,80,0.3);
}

#height-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4CAF50;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(76,175,80,0.3);
}

#height-number {
  width: 80px;
  padding: 10px 12px;
  font-size: 16px;
  text-align: center;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fafafa;
  color: #333;
  outline: none;
  transition: border-color 0.25s ease;
}

#height-number:focus {
  border-color: #4CAF50;
}

#result-section {
  margin-bottom: 28px;
}

#result-title,
#bmi-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #4CAF50;
}

#result-card {
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}

#standard-weight {
  margin-bottom: 16px;
}

#standard-label {
  display: block;
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
}

#standard-value {
  font-size: 48px;
  font-weight: 800;
  color: #2E7D32;
  line-height: 1;
}

#standard-unit {
  font-size: 18px;
  color: #4CAF50;
  font-weight: 600;
  margin-left: 4px;
}

#ideal-range {
  margin-bottom: 20px;
}

#range-label {
  display: block;
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}

#range-min,
#range-max {
  font-size: 22px;
  font-weight: 700;
  color: #2E7D32;
}

#range-separator {
  font-size: 18px;
  color: #999;
  margin: 0 8px;
}

#range-unit {
  font-size: 14px;
  color: #4CAF50;
  font-weight: 600;
  margin-left: 4px;
}

#range-bar-container {
  margin-top: 8px;
}

#range-bar-bg {
  position: relative;
  height: 10px;
  background: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
}

#range-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #66BB6A, #4CAF50);
  border-radius: 5px;
  transition: margin-left 0.3s ease, width 0.3s ease;
  min-width: 4px;
}

#range-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

#bmi-section {
  margin-top: 8px;
}

#bmi-table {
  margin-bottom: 16px;
}

.bmi-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 6px;
  background: #fafafa;
  transition: all 0.25s ease;
}

.bmi-row.highlight {
  background: #e8f5e9;
  border-left: 4px solid #4CAF50;
  padding-left: 12px;
}

.bmi-category {
  width: 50px;
  font-weight: 700;
  font-size: 14px;
  color: #333;
  flex-shrink: 0;
}

.bmi-bmi {
  width: 140px;
  font-size: 13px;
  color: #666;
  flex-shrink: 0;
}

.bmi-weight-range {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  flex: 1;
  text-align: right;
}

#bmi-underweight .bmi-category { color: #FFC107; }
#bmi-underweight .bmi-weight-range { color: #F9A825; }

#bmi-normal .bmi-category { color: #4CAF50; }
#bmi-normal .bmi-weight-range { color: #2E7D32; }

#bmi-overweight .bmi-category { color: #FF9800; }
#bmi-overweight .bmi-weight-range { color: #E65100; }

#bmi-obese .bmi-category { color: #F44336; }
#bmi-obese .bmi-weight-range { color: #C62828; }

#bmi-bar-container {
  width: 100%;
  margin-top: 8px;
}

#bmi-canvas {
  display: block;
  width: 100%;
  height: 40px;
}

#__fork {
  text-align: center;
  margin-bottom: 24px;
}

#__fork button {
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  color: #4CAF50;
  background: #fff;
  border: 2px solid #4CAF50;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.25s ease;
}

#__fork button:hover {
  background: #4CAF50;
  color: #fff;
}

#features {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px 20px;
  margin-bottom: 16px;
}

#features h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

#features p {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

#scenarios {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px 20px;
  margin-bottom: 16px;
}

#scenarios h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 12px;
}

#scenarios ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#scenarios li {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
}

#scenarios li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
}

#FAQ {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px 20px;
  margin-bottom: 16px;
}

#FAQ h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
}

#FAQ dt {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

#FAQ dt:first-of-type {
  border-top: none;
  padding-top: 0;
}

#FAQ dd {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
  margin: 0 0 8px;
}

footer .page-info {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  padding: 20px 0;
}

footer .page-info a {
  color: #4CAF50;
  text-decoration: none;
}

footer .page-info a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  #app {
    padding: 12px 12px 24px;
  }

  #page-title {
    font-size: 24px;
  }

  #calc-section {
    padding: 16px 12px;
    border-radius: 12px;
  }

  .gender-btn {
    padding: 12px 16px;
    font-size: 16px;
  }

  #standard-value {
    font-size: 40px;
  }

  #range-min,
  #range-max {
    font-size: 20px;
  }

  .bmi-bmi {
    width: 110px;
    font-size: 12px;
  }

  .bmi-category {
    width: 42px;
    font-size: 13px;
  }

  .bmi-weight-range {
    font-size: 13px;
  }

  #features,
  #scenarios,
  #FAQ {
    padding: 16px 12px;
    border-radius: 12px;
  }
}
