@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #17171f;
  --card: #1c1c26;
  --card2: #22222e;
  --border: rgba(255,255,255,0.07);
  --accent: #f97316;
  --accent2: #fb923c;
  --green: #22c55e;
  --blue: #3b82f6;
  --purple: #a855f7;
  --red: #ef4444;
  --text: #f1f5f9;
  --text2: #94a3b8;
  --text3: #475569;
  --glow: 0 0 40px rgba(249,115,22,0.15);
  --radius: 16px;
  --radius-sm: 10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 99px; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 2px;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo span { color: var(--text); }

.nav-links { display: flex; gap: 8px; }

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 99px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--border);
}

.nav-links a.active {
  color: var(--accent);
  background: rgba(249,115,22,0.12);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249,115,22,0.12) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 80%, rgba(59,130,246,0.06) 0%, transparent 60%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.25);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 10vw, 120px);
  line-height: 0.95;
  letter-spacing: 2px;
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.1s ease both;
}

.hero h1 .accent { color: var(--accent); }

.hero p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text2);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  margin-top: 70px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.4s ease both;
}

.hero-stat { text-align: center; }

.hero-stat .num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  color: var(--accent);
  line-height: 1;
}

.hero-stat .lbl {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 99px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(249,115,22,0.4);
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(249,115,22,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--card);
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 8px 18px;
  font-size: 13px;
}

.btn-ghost:hover { color: var(--text); background: var(--card2); }

.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #16a34a; transform: translateY(-2px); }

/* ── SECTION ── */
section { padding: 90px 20px; position: relative; }
section + section { border-top: 1px solid var(--border); }

.container { max-width: 1180px; margin: 0 auto; }

.section-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 1px;
  line-height: 1.05;
  margin-bottom: 14px;
}

.section-sub {
  color: var(--text2);
  font-size: 16px;
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(249,115,22,0.2);
  transform: translateY(-2px);
}

/* ── CALCULATOR SECTION ── */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.calc-form { display: flex; flex-direction: column; gap: 18px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-group { display: flex; flex-direction: column; gap: 8px; }

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}

.form-group select option { background: var(--bg3); }

/* Gender Toggle */
.gender-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gender-toggle input { display: none; }

.gender-toggle label {
  padding: 12px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.gender-toggle input:checked + label {
  background: var(--accent);
  color: #fff;
}

/* ── RESULTS PANEL ── */
.results-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-hero {
  background: linear-gradient(135deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(249,115,22,0.08) 0%, transparent 70%);
}

.bmi-ring {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.bmi-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }

.bmi-ring-track { fill: none; stroke: var(--bg3); stroke-width: 10; }
.bmi-ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.bmi-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.bmi-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  line-height: 1;
  color: var(--text);
}

.bmi-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
  margin-top: 4px;
}

.result-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.metric-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.metric-card.active::after { transform: scaleX(1); }

.metric-icon {
  font-size: 18px;
  margin-bottom: 10px;
  display: block;
}

.metric-val {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  line-height: 1;
  color: var(--text);
}

.metric-unit {
  font-size: 12px;
  color: var(--text3);
  font-family: 'JetBrains Mono', monospace;
}

.metric-label {
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.goal-plan {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.goal-plan h3 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--accent);
}

.plan-steps { display: flex; flex-direction: column; gap: 12px; }

.plan-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.plan-step .step-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.plan-step .step-text {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
}

.plan-step .step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

/* ── GUIDANCE SECTION ── */
.guidance-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 9px 20px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text2);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.guide-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.guide-card .guide-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.guide-card h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
}

.guide-card p, .guide-card li {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
}

.guide-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-card ul li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.guide-card ul li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
  font-weight: 700;
}

.calorie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 16px;
}

.calorie-table th {
  background: var(--bg3);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
}

.calorie-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}

.calorie-table tr:hover td { background: var(--bg3); color: var(--text); }

.calorie-table .highlight { color: var(--accent); font-weight: 700; font-family: 'JetBrains Mono', monospace; }

/* ── DIET PLANS ── */
.diet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.diet-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.diet-header {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.diet-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.diet-title { font-size: 18px; font-weight: 700; }
.diet-sub { font-size: 13px; color: var(--text2); margin-top: 2px; }

.meal-list { padding: 0 24px 24px; display: flex; flex-direction: column; gap: 10px; }

.meal-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
}

.meal-time {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  min-width: 70px;
}

.meal-foods { font-size: 13px; color: var(--text2); line-height: 1.5; }

.meal-cals {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
  text-align: right;
}

/* ── WORKOUT SECTION ── */
.workout-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.workout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.workout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.workout-card:hover {
  border-color: rgba(249,115,22,0.3);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.workout-thumb {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.workout-body { padding: 18px; }

.workout-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.workout-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.workout-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
}

/* ── PROGRESS TRACKER ── */
.tracker-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
}

.progress-form { display: flex; flex-direction: column; gap: 16px; }

.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-item {
  display: grid;
  grid-template-columns: auto 1fr repeat(4, auto);
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.history-date { color: var(--text3); font-size: 12px; white-space: nowrap; }
.history-bmi { font-family: 'Bebas Neue', sans-serif; font-size: 22px; }
.history-val { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text2); }
.history-goal {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 99px;
  text-transform: uppercase;
}

/* ── MACRO BAR ── */
.macro-bar-wrap { margin-top: 12px; }
.macro-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text3);
  margin-bottom: 6px;
}
.macro-bar {
  height: 8px;
  background: var(--bg3);
  border-radius: 99px;
  overflow: hidden;
  display: flex;
}
.macro-bar-seg { height: 100%; transition: width 0.6s ease; }
.seg-p { background: var(--blue); }
.seg-c { background: var(--green); }
.seg-f { background: var(--accent); }

/* ── UTIL ── */
.tag-green { background: rgba(34,197,94,0.12); color: var(--green); }
.tag-orange { background: rgba(249,115,22,0.12); color: var(--accent); }
.tag-blue { background: rgba(59,130,246,0.12); color: var(--blue); }
.tag-red { background: rgba(239,68,68,0.12); color: var(--red); }
.tag-purple { background: rgba(168,85,247,0.12); color: var(--purple); }
.bg-orange { background: rgba(249,115,22,0.12); }
.bg-green { background: rgba(34,197,94,0.12); }
.bg-blue { background: rgba(59,130,246,0.12); }
.bg-purple { background: rgba(168,85,247,0.12); }
.bg-red { background: rgba(239,68,68,0.12); }
.c-orange { color: var(--accent); }
.c-green { color: var(--green); }
.c-blue { color: var(--blue); }
.c-red { color: var(--red); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text3);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 15px; }

.divider {
  height: 1px;
  background: var(--border);
  margin: 32px 0;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  background: var(--card2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green);
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  max-width: 320px;
}

.toast.show { transform: translateY(0); opacity: 1; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 6px;
}

@keyframes skeleton {
  to { background-position: -200% 0; }
}

/* ── FOOTER ── */
footer {
  padding: 40px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}

footer strong { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(10,10,15,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    flex-direction: column;
    gap: 8px;
    z-index: 99;
  }
  .mobile-menu.open { display: flex; }
  .mobile-menu a {
    color: var(--text2);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
  }
  .mobile-menu a:hover { background: var(--card); color: var(--text); }

  .calc-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .result-metrics { grid-template-columns: repeat(2,1fr); }
  .tracker-grid { grid-template-columns: 1fr; }
  .history-item { grid-template-columns: auto 1fr; gap: 8px; }
  .history-item .history-bmi, .history-item .history-val, .history-item .history-goal { display: none; }

  section { padding: 60px 16px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 52px; }
  .hero-stats { gap: 28px; }
  .result-metrics { grid-template-columns: 1fr 1fr; }
  .diet-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
}
