:root{
  --bg:#070812;
  --bg-2:#0e1020;
  --panel:rgba(13,16,33,0.78);
  --panel-strong:rgba(11,14,28,0.92);
  --line:rgba(64,245,255,0.18);
  --text:#f4f7ff;
  --muted:#a7b0d6;
  --cyan:#40f5ff;
  --pink:#ff3fd8;
  --purple:#7c5cff;
  --lime:#9eff57;
  --yellow:#ffd34d;
  --danger:#ff6868;
  --success:#5effb1;
  --shadow:0 0 0 1px rgba(255,255,255,0.02), 0 20px 50px rgba(0,0,0,0.35);
  --radius:22px;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:Arial, Helvetica, sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,63,216,0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(64,245,255,0.10), transparent 28%),
    linear-gradient(180deg, #070812 0%, #090b18 50%, #05060d 100%);
  min-height:100vh;
  overflow-x:hidden;
}

.bg-grid{
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.25;
  background-image:
    linear-gradient(rgba(64,245,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64,245,255,0.08) 1px, transparent 1px);
  background-size:32px 32px;
  mask-image:linear-gradient(to bottom, rgba(255,255,255,0.8), transparent 92%);
}

.bg-glow{
  position:fixed;
  width:360px;
  height:360px;
  border-radius:50%;
  filter:blur(60px);
  pointer-events:none;
  opacity:.22;
}

.glow-1{
  top:60px;
  left:-80px;
  background:var(--pink);
  animation:floatGlow 10s ease-in-out infinite;
}

.glow-2{
  right:-120px;
  bottom:20px;
  background:var(--cyan);
  animation:floatGlow 12s ease-in-out infinite reverse;
}

@keyframes floatGlow{
  0%,100%{ transform:translateY(0) translateX(0) scale(1); }
  50%{ transform:translateY(-20px) translateX(12px) scale(1.08); }
}

.app-shell{
  position:relative;
  z-index:2;
  width:min(1200px, calc(100% - 24px));
  margin:0 auto;
  padding:30px 0 60px;
}

.hero{
  text-align:center;
  padding:30px 12px 18px;
}

.hero-badge{
  display:inline-block;
  padding:10px 16px;
  border:1px solid rgba(64,245,255,0.35);
  border-radius:999px;
  background:rgba(64,245,255,0.08);
  color:var(--cyan);
  font-size:13px;
  letter-spacing:.12em;
  text-transform:uppercase;
  box-shadow:0 0 20px rgba(64,245,255,0.12);
}

.hero h1{
  margin:18px 0 12px;
  font-size:clamp(2rem, 4vw, 3.6rem);
  line-height:1.05;
  text-shadow:0 0 18px rgba(64,245,255,0.18), 0 0 30px rgba(255,63,216,0.10);
}

.hero-text{
  max-width:860px;
  margin:0 auto;
  color:var(--muted);
  font-size:clamp(1rem, 2vw, 1.12rem);
  line-height:1.7;
}

.hero-highlights{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  margin-top:22px;
}

.hero-highlights span{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.09);
  background:rgba(255,255,255,0.03);
  color:#d9e1ff;
  font-size:.92rem;
}

.panel{
  background:var(--panel);
  border:1px solid rgba(255,255,255,0.06);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  backdrop-filter:blur(14px);
}

.calculator-panel,
.educational-section,
.faq-section,
.inner-panel{
  padding:22px;
  margin-top:18px;
}

.panel-title-wrap h2,
.section-top h2,
.educational-section h2,
.faq-section h2{
  margin:0 0 8px;
  font-size:clamp(1.4rem, 2.4vw, 2rem);
}

.panel-title-wrap p,
.section-top p,
.educational-section p{
  margin:0;
  color:var(--muted);
  line-height:1.75;
}

.calc-form{
  margin-top:18px;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:16px;
}

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

.col-12{ grid-column:span 12; }
.col-6{ grid-column:span 6; }

.field label{
  font-size:.95rem;
  color:#dfe8ff;
  font-weight:700;
}

.field input,
.field select{
  width:100%;
  min-height:54px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.09);
  background:rgba(8,12,26,0.88);
  color:var(--text);
  padding:14px 16px;
  outline:none;
  font-size:1rem;
  transition:.25s ease;
}

.field input::placeholder{
  color:#7d87ad;
}

.field input:focus,
.field select:focus{
  border-color:rgba(64,245,255,0.55);
  box-shadow:0 0 0 4px rgba(64,245,255,0.10), 0 0 18px rgba(64,245,255,0.12);
}

.advanced-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:14px;
  margin-top:18px;
}

.advanced-bar span{
  color:var(--muted);
  font-size:.95rem;
}

.advanced-fields{
  margin-top:18px;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.02);
}

.action-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:22px;
}

.primary-button,
.secondary-button,
.ghost-button{
  appearance:none;
  border:none;
  cursor:pointer;
  border-radius:16px;
  min-height:54px;
  padding:0 20px;
  font-weight:800;
  letter-spacing:.02em;
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.primary-button{
  color:#061017;
  background:linear-gradient(90deg, var(--cyan), #85fff2);
  box-shadow:0 10px 30px rgba(64,245,255,0.25);
}

.secondary-button{
  color:var(--text);
  background:linear-gradient(90deg, rgba(255,63,216,0.25), rgba(124,92,255,0.25));
  border:1px solid rgba(255,255,255,0.09);
}

.ghost-button{
  color:var(--pink);
  background:rgba(255,63,216,0.08);
  border:1px solid rgba(255,63,216,0.24);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover{
  transform:translateY(-2px);
}

.feedback{
  margin-top:18px;
  min-height:24px;
  font-weight:700;
  color:var(--muted);
}

.feedback.success{ color:var(--success); }
.feedback.error{ color:var(--danger); }
.feedback.loading{ color:var(--cyan); }

.results-section{
  margin-top:18px;
}

.results-grid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:16px;
  margin-top:16px;
}

.metric-card{
  grid-column:span 4;
  border-radius:20px;
  padding:18px;
  background:linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border:1px solid rgba(255,255,255,0.06);
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}

.metric-card::before{
  content:"";
  position:absolute;
  inset:auto -20% -60% auto;
  width:150px;
  height:150px;
  background:radial-gradient(circle, rgba(64,245,255,0.18), transparent 70%);
  pointer-events:none;
}

.metric-label{
  color:var(--muted);
  font-size:.92rem;
  margin-bottom:8px;
}

.metric-value{
  font-size:clamp(1.35rem, 2.2vw, 2rem);
  font-weight:900;
  line-height:1.1;
  margin-bottom:8px;
}

.metric-note{
  color:#d9e1ff;
  font-size:.93rem;
  line-height:1.55;
}

.split-layout{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-top:18px;
}

.macro-list,
.body-list{
  display:grid;
  gap:14px;
}

.macro-card,
.body-card{
  border-radius:18px;
  padding:16px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.025);
}

.macro-top,
.body-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.macro-title,
.body-title{
  font-weight:800;
}

.macro-value,
.body-value{
  color:var(--cyan);
  font-weight:900;
}

.progress{
  width:100%;
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.04);
}

.progress > span{
  display:block;
  height:100%;
  border-radius:999px;
}

.bar-protein{ background:linear-gradient(90deg, var(--cyan), #7af7ff); }
.bar-carb{ background:linear-gradient(90deg, var(--yellow), #ffe98a); }
.bar-fat{ background:linear-gradient(90deg, var(--pink), #ff8dea); }

.macro-subtext,
.body-subtext{
  margin-top:10px;
  color:var(--muted);
  line-height:1.55;
  font-size:.94rem;
}

.meal-plans{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}

.meal-plan-card{
  border-radius:18px;
  padding:16px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.025);
}

.meal-plan-card h4{
  margin:0 0 14px;
  font-size:1.06rem;
}

.meal-line{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,0.06);
  color:#dbe4ff;
}

.meal-line:last-child{
  border-bottom:none;
}

.meal-kcal{
  color:var(--lime);
  font-weight:800;
}

.message-list{
  margin:0;
  padding-left:20px;
  color:#dbe4ff;
}

.message-list li{
  margin:0 0 10px;
  line-height:1.7;
}

.educational-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
}

.edu-card{
  border-radius:18px;
  padding:18px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.025);
}

.edu-card h3{
  margin:0 0 8px;
  font-size:1rem;
}

.edu-card p{
  margin:0;
  color:var(--muted);
}

.educational-note{
  margin-top:18px !important;
}

.faq-list{
  display:grid;
  gap:12px;
  margin-top:16px;
}

.faq-item{
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.025);
  overflow:hidden;
}

.faq-question{
  width:100%;
  text-align:left;
  background:none;
  color:var(--text);
  border:none;
  padding:18px;
  font-size:1rem;
  font-weight:800;
  cursor:pointer;
  position:relative;
}

.faq-question::after{
  content:"+";
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  color:var(--cyan);
  font-size:1.3rem;
}

.faq-item.active .faq-question::after{
  content:"−";
}

.faq-answer{
  display:none;
  padding:0 18px 18px;
  color:var(--muted);
  line-height:1.7;
}

.faq-item.active .faq-answer{
  display:block;
}

.hidden{
  display:none !important;
}

.neon{
  color:var(--cyan);
  text-shadow:0 0 14px rgba(64,245,255,0.25);
}

@media (max-width: 1024px){
  .metric-card{
    grid-column:span 6;
  }

  .split-layout{
    grid-template-columns:1fr;
  }

  .educational-grid{
    grid-template-columns:repeat(2, 1fr);
  }
}

@media (max-width: 768px){
  .app-shell{
    width:min(100% - 16px, 1200px);
    padding-top:18px;
  }

  .calculator-panel,
  .educational-section,
  .faq-section,
  .inner-panel{
    padding:18px;
  }

  .col-6,
  .col-12{
    grid-column:span 12;
  }

  .metric-card{
    grid-column:span 12;
  }

  .educational-grid{
    grid-template-columns:1fr;
  }

  .action-row{
    flex-direction:column;
  }

  .primary-button,
  .secondary-button{
    width:100%;
  }

  .hero-highlights{
    gap:8px;
  }

  .hero-highlights span{
    font-size:.85rem;
  }
}