:root {
  --bg: #f8fafc;
  --border: rgba(0,0,0,0.07);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --green: #10b981;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --orange: #f59e0b;
  --red: #ef4444;
  --teal: #0d9488;
  --surface: #ffffff;
  --accent-main: #0ea5e9;
  --accent-dark: #0284c7;
  --bg-body: #f8fafc;
  --radius-sm: 8px;
  --radius: 24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: linear-gradient(rgba(248, 250, 252, 0.85), rgba(226, 232, 240, 0.85)), url('https://images.unsplash.com/photo-1506126613408-eca07ce68773?auto=format&fit=crop&w=1920&q=80') center/cover fixed;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .hero-title, .result-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 40px; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  animation: slideDown 0.6s ease-out both;
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: translateY(0); } }

.nav-logo { font-size: 20px; font-weight: 800; color: var(--accent-dark); display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: 'Plus Jakarta Sans', sans-serif; }
.nav-logo i { font-size: 24px; color: var(--accent-main); }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s ease; position: relative; }
.nav-link::after { content: ""; position: absolute; left: 16px; bottom: 4px; width: calc(100% - 32px); height: 2px; background: var(--accent-main); border-radius: 999px; transform: scaleX(0); transform-origin: center; transition: transform 0.3s ease; }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link:hover { color: var(--text-primary); background: var(--bg-body); }
.nav-link.active { color: var(--accent-dark); font-weight: 600; }
.nav-cta { font-size: 14px; font-weight: 600; color: #fff; text-decoration: none; padding: 10px 20px; border-radius: 40px; background: var(--accent-main); transition: all 0.2s ease; }
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }

.glass-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: all 0.3s ease;
  overflow: hidden;
}

.page { padding-top: 72px; padding-bottom: 80px; }

.hero { text-align: center; padding: 80px 20px 40px; max-width: 600px; margin: 0 auto; animation: fadeUp 0.8s cubic-bezier(0.22,1,0.36,1) 0.2s both; }
.hero-title { font-size: clamp(36px, 5vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin-bottom: 16px; }
.grad-accent { background: linear-gradient(135deg, var(--accent-main), var(--purple)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }

.bmi-section { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
.bmi-container { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.slide-left { opacity: 0; transform: translateX(-40px); animation: slideIn 0.8s cubic-bezier(0.22,1,0.36,1) 0.4s forwards; }
.slide-right { opacity: 0; transform: translateX(40px); animation: slideIn 0.8s cubic-bezier(0.22,1,0.36,1) 0.5s forwards; }
@keyframes slideIn { to { opacity: 1; transform: translateX(0); } }

.bmi-card { padding: 40px; }
.card-header { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.header-icon { width: 48px; height: 48px; border-radius: 14px; background: rgba(14, 165, 233, 0.1); color: var(--accent-main); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.card-header h2 { font-size: 24px; font-weight: 700; color: var(--text-primary); }

.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }

.input-wrapper { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 16px; font-size: 20px; color: var(--text-muted); transition: color 0.3s; }
.input-wrapper input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}
.input-wrapper input:focus { background: #fff; border-color: var(--accent-main); box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1); }
.input-wrapper input:focus + .input-icon, .input-wrapper input:not(:placeholder-shown) ~ .input-icon { color: var(--accent-main); }
.input-wrapper input::placeholder { color: var(--text-muted); font-weight: 400; }

input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.gender-options { display: flex; gap: 12px; }
.gender-btn { flex: 1; cursor: pointer; }
.gender-btn input { display: none; }
.btn-content {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}
.gender-btn input:checked + .btn-content {
  background: var(--accent-main);
  border-color: var(--accent-main);
  color: #fff;
  box-shadow: 0 8px 16px rgba(14, 165, 233, 0.25);
  transform: translateY(-2px);
}
.gender-btn:hover .btn-content { border-color: var(--accent-main); }

.btn-calculate {
  width: 100%;
  padding: 18px;
  margin-top: 16px;
  background: linear-gradient(135deg, var(--accent-main), var(--accent-dark));
  color: #fff;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: all 0.3s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}
.btn-calculate:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(14, 165, 233, 0.4); }
.btn-calculate:active { transform: translateY(0); }

.bmi-result-card { display: flex; flex-direction: column; justify-content: center; }
.empty-state { text-align: center; padding: 40px 20px; transition: opacity 0.4s; }
.empty-icon-wrap { width: 80px; height: 80px; background: rgba(0,0,0,0.03); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.empty-icon { font-size: 40px; color: var(--text-muted); }
.empty-state p { color: var(--text-secondary); font-size: 15px; line-height: 1.6; }

.hidden { display: none !important; }

.result-state { animation: fadeScale 0.6s cubic-bezier(0.22,1,0.36,1) forwards; text-align: center; }
@keyframes fadeScale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.result-title { font-size: 20px; color: var(--text-secondary); margin-bottom: 24px; }

.gauge-container { width: 240px; height: 120px; margin: 0 auto 24px; position: relative; overflow: hidden; }
.gauge { width: 100%; height: 200%; position: absolute; top: 0; left: 0; transform-origin: center; }
.gauge-background, .gauge-fill { width: 100%; height: 100%; border-radius: 50%; position: absolute; top: 0; left: 0; }
.gauge-background { border: 24px solid rgba(0,0,0,0.05); }
.gauge-fill {
  border: 24px solid var(--accent-main);
  border-bottom-color: transparent; border-right-color: transparent;
  transform: rotate(-135deg); 
  transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gauge-cover {
  width: 192px; height: 192px; 
  background: var(--surface);
  border-radius: 50%; 
  position: absolute; 
  bottom: -96px; 
  left: 50%; 
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 30px;
}
.bmi-value { font-size: 40px; font-weight: 800; color: var(--text-primary); line-height: 1; font-family: 'Plus Jakarta Sans', sans-serif; }
.bmi-label { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-top: 4px; }

.status-badge {
  display: inline-block; padding: 8px 20px; border-radius: 40px;
  font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
  transition: all 0.5s ease;
}

.status-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 32px; padding: 0 20px; }

.recommendations { text-align: left; background: rgba(255,255,255,0.6); padding: 24px; border-radius: 20px; }
.recommendations h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--text-primary); }
.recom-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.recom-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.recom-list li i { color: var(--accent-main); font-size: 18px; margin-top: 2px; flex-shrink: 0; }

.status-kurus .gauge-fill { border-color: var(--blue) transparent transparent var(--blue); }
.status-kurus-badge { background: rgba(59,130,246,0.1); color: var(--blue); }
.status-normal .gauge-fill { border-color: var(--green) transparent transparent var(--green); }
.status-normal-badge { background: rgba(16,185,129,0.1); color: var(--green); }
.status-gemuk .gauge-fill { border-color: var(--orange) transparent transparent var(--orange); }
.status-gemuk-badge { background: rgba(245,158,11,0.1); color: var(--orange); }
.status-obesitas .gauge-fill { border-color: var(--red) transparent transparent var(--red); }
.status-obesitas-badge { background: rgba(239,68,68,0.1); color: var(--red); }

footer { padding: 40px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; background: var(--surface); }
.footer-logo { font-size: 18px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 6px; font-family: 'Plus Jakarta Sans', sans-serif;}
.footer-logo i { color: var(--accent-main); }
.footer-links { display: flex; gap: 24px; }
.footer-link { font-size: 14px; color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--accent-main); }
.footer-address { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
.footer-address .address-title { font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.footer-copy { font-size: 14px; color: var(--text-muted); }
.social-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: 22px; transition: all 0.3s ease; text-decoration: none; }
.social-circle:hover { background: var(--accent-main); color: white; border-color: var(--accent-main); transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

@media (max-width: 900px) {
  .bmi-container { grid-template-columns: 1fr; }
  footer > div > div { align-items: flex-start !important; text-align: left; }
}
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  footer { flex-direction: column; text-align: center; }
}
