:root {
  --bg: #f4f9ff;
  --card: #ffffff;
  --primary: #1d79ff;
  --secondary: #4a90e2;
  --text: #1c2f42;
  --muted: #657e95;
  --success: #2a8f57;
  --warning: #d18d00;
  --danger: #d13212;
  --radius: 18px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, #eaf2ff 0%, #f6fbff 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  width: min(100%, 960px);
}

.hero {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(31, 60, 110, 0.11);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  padding: 40px;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-title h1 {
  font-size: clamp(2.1rem, 2.6vw, 3.3rem);
  line-height: 1.05;
  color: var(--text);
}

.hero-title p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 1rem;
}

.hero-title button {
  width: max-content;
  border: none;
  background: var(--primary);
  color: white;
  padding: 14px 24px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-title button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(29, 121, 255, 0.2);
}

.illustration {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top left, #e1f0ff, transparent 45%),
    radial-gradient(circle at bottom right, #d2eaff, transparent 35%);
  border-radius: 24px;
  padding: 28px;
}

.illustration img {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.form-card {
  margin-top: 28px;
  background: white;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 12px 28px rgba(31, 60, 110, 0.08);
  display: none;
}

.form-card.active {
  display: block;
}

.form-card h2 {
  margin-bottom: 18px;
  font-size: 1.6rem;
  color: var(--text);
}

.input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

input,
select {
  border: 1px solid #dce4ee;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--text);
  background: #f9fbff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(29, 121, 255, 0.12);
}

.full-width {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
  align-items: center;
}

.actions button {
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.actions button:hover {
  transform: translateY(-1px);
}

.actions .submit-btn {
  background: var(--secondary);
  color: white;
}

.actions .reset-btn {
  background: #f4f6fb;
  color: var(--text);
}

.result {
  margin-top: 22px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e5efff;
  padding: 22px;
}

.result h3 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.result p {
  margin-bottom: 10px;
  line-height: 1.7;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 10px;
}

.badge.normal {
  background: #e6f7e7;
  color: #246b41;
}

.badge.under {
  background: #fff8dc;
  color: #b3860c;
}

.badge.over {
  background: #fff3e3;
  color: #b86f00;
}

.badge.obese {
  background: #fde8e6;
  color: #9a231e;
}

.error-message {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #f1c0c0;
  background: #fff0f0;
  color: #8b1f1f;
  line-height: 1.6;
  display: none;
}

.error-message.visible {
  display: block;
}

.recommendation {
  margin-top: 14px;
  padding: 16px;
  border-left: 4px solid var(--primary);
  background: #f0f7ff;
  color: var(--text);
  line-height: 1.8;
}

.footer-note {
  margin-top: 12px;
  color: #8b9ab1;
  font-size: 0.92rem;
}

.app-label {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

@media (max-width: 820px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .input-grid {
    grid-template-columns: 1fr;
  }
}
