/* ============================================================
   轻盈 FIT · 减肥定制方案 样式表
   ============================================================ */

:root {
  /* 中性色 */
  --bg: #0f1226;
  --bg-soft: #161a36;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --text: #eef1ff;
  --text-soft: #b6bdd9;
  --text-mute: #7e88a8;

  /* 主题色（默认 - 渐变紫蓝） */
  --accent: #7c5cff;
  --accent-2: #4dd0e1;
  --accent-grad: linear-gradient(135deg, #7c5cff, #4dd0e1);

  /* 男生主题 */
  --male: #4f8cff;
  --male-2: #22d3ee;
  --male-grad: linear-gradient(135deg, #2563eb, #06b6d4);

  /* 女生主题 */
  --female: #ff5c8a;
  --female-2: #ffb86c;
  --female-grad: linear-gradient(135deg, #ec4899, #f59e0b);

  /* 尺寸 */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.25);
  --maxw: 1160px;
}

/* 男生主题切换 */
body.theme-male {
  --accent: var(--male);
  --accent-2: var(--male-2);
  --accent-grad: var(--male-grad);
}
/* 女生主题切换 */
body.theme-female {
  --accent: var(--female);
  --accent-2: var(--female-2);
  --accent-grad: var(--female-grad);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: rgba(15, 18, 38, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; }
.logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-grad);
  color: #fff; font-weight: 900;
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.4);
}
.logo-sub { color: var(--accent-2); margin-left: 2px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  color: var(--text-soft); font-size: 0.95rem; font-weight: 500;
  position: relative; transition: color 0.2s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--accent-grad); border-radius: 2px;
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: 0.3s;
}

/* ============================================================
   英雄区
   ============================================================ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(900px 500px at 15% 20%, rgba(124, 92, 255, 0.35), transparent 60%),
    radial-gradient(800px 500px at 85% 30%, rgba(77, 208, 225, 0.28), transparent 60%),
    radial-gradient(700px 400px at 50% 100%, rgba(255, 92, 138, 0.18), transparent 70%);
  filter: blur(8px);
  animation: floatBg 12s ease-in-out infinite alternate;
}
body.theme-male .hero-bg {
  background:
    radial-gradient(900px 500px at 15% 20%, rgba(79, 140, 255, 0.4), transparent 60%),
    radial-gradient(800px 500px at 85% 30%, rgba(34, 211, 238, 0.3), transparent 60%);
}
body.theme-female .hero-bg {
  background:
    radial-gradient(900px 500px at 15% 20%, rgba(255, 92, 138, 0.4), transparent 60%),
    radial-gradient(800px 500px at 85% 30%, rgba(255, 184, 108, 0.3), transparent 60%);
}
@keyframes floatBg {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-24px) scale(1.05); }
}
.hero-inner { position: relative; z-index: 1; max-width: 820px; }
.hero-eyebrow {
  display: inline-block; padding: 7px 18px; border-radius: 999px;
  background: var(--bg-card-strong); border: 1px solid var(--border);
  color: var(--text-soft); font-size: 0.85rem; letter-spacing: 2px;
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.4rem); font-weight: 900;
  line-height: 1.15; letter-spacing: -1px; margin-bottom: 24px;
}
.grad {
  background: var(--accent-grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-soft);
  max-width: 640px; margin: 0 auto 40px;
}
.hl { color: var(--accent-2); font-weight: 700; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-stats {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.6rem; font-weight: 900; color: var(--accent-2); }
.hero-stats span { font-size: 0.85rem; color: var(--text-mute); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: var(--text-mute); font-size: 0.85rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 999px;
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.5px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 10px 26px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(124, 92, 255, 0.5); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: var(--bg-card-strong); color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ============================================================
   通用区块
   ============================================================ */
.section { padding: 96px 0; position: relative; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-tag {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: var(--bg-card-strong); border: 1px solid var(--border);
  color: var(--accent-2); font-size: 0.8rem; letter-spacing: 1px;
  margin-bottom: 16px; font-weight: 700;
}
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900;
  letter-spacing: -0.5px; margin-bottom: 14px;
}
.section-head p { color: var(--text-soft); }

/* ============================================================
   性别选择卡片
   ============================================================ */
.gender-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
.gender-card {
  position: relative; text-align: left;
  padding: 40px 32px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  overflow: hidden;
}
.gender-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--card-grad); opacity: 0; transition: opacity 0.4s;
  z-index: 0;
}
.gender-card.male { --card-grad: radial-gradient(400px 200px at 20% 0%, rgba(79, 140, 255, 0.25), transparent 70%); }
.gender-card.female { --card-grad: radial-gradient(400px 200px at 20% 0%, rgba(255, 92, 138, 0.25), transparent 70%); }
.gender-card > * { position: relative; z-index: 1; }
.gender-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.gender-card:hover::before { opacity: 1; }
.gender-card.male:hover { border-color: var(--male); }
.gender-card.female:hover { border-color: var(--female); }
.gender-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}
.gender-card.male.active { border-color: var(--male); box-shadow: 0 0 0 2px var(--male), var(--shadow); }
.gender-card.female.active { border-color: var(--female); box-shadow: 0 0 0 2px var(--female), var(--shadow); }

.gender-emoji {
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 18px;
  font-size: 2rem; font-weight: 900; color: #fff; margin-bottom: 22px;
}
.gender-card.male .gender-emoji { background: var(--male-grad); }
.gender-card.female .gender-emoji { background: var(--female-grad); }
.gender-card h3 { font-size: 1.5rem; font-weight: 900; margin-bottom: 8px; }
.gender-card > p { color: var(--text-soft); margin-bottom: 20px; }
.gender-card ul { list-style: none; margin-bottom: 26px; }
.gender-card ul li {
  position: relative; padding-left: 28px; margin-bottom: 10px;
  color: var(--text-soft); font-size: 0.95rem;
}
.gender-card ul li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-grad); color: #fff;
  font-size: 0.7rem; font-weight: 900;
}
.gender-card.male ul li::before { background: var(--male-grad); }
.gender-card.female ul li::before { background: var(--female-grad); }
.gender-go {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; color: var(--accent);
}
.gender-card.male .gender-go { color: var(--male); }
.gender-card.female .gender-go { color: var(--female); }

/* ============================================================
   BMI 卡片
   ============================================================ */
.bmi-card {
  max-width: 760px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
  box-shadow: var(--shadow-soft);
}
.bmi-inputs {
  display: grid; grid-template-columns: 1fr 1fr auto;
  gap: 16px; align-items: end;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 0.88rem; color: var(--text-soft); font-weight: 500; }
.field input, .field select {
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-size: 1rem; transition: border-color 0.2s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}
.bmi-result {
  margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 24px;
}
.bmi-value { text-align: center; }
.bmi-num {
  display: block; font-size: 3.4rem; font-weight: 900; line-height: 1;
  background: var(--accent-grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.bmi-label { font-size: 0.9rem; color: var(--text-mute); }
.bmi-bar-track {
  position: relative; height: 12px; border-radius: 999px;
  background: linear-gradient(90deg, #4dd0e1 0%, #4ade80 35%, #facc15 60%, #f87171 100%);
}
.bmi-bar-pointer {
  position: absolute; top: 50%; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; border: 3px solid var(--accent);
  transform: translate(-50%, -50%); left: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); transition: left 0.6s ease;
}
.bmi-bar-legend {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--text-mute); margin-top: 8px;
}
.bmi-note { text-align: center; color: var(--text-soft); font-size: 0.95rem; }

/* ============================================================
   定制表单
   ============================================================ */
.plan-form {
  max-width: 860px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px;
  box-shadow: var(--shadow-soft);
}
.form-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05); border: 1px dashed var(--border);
  color: var(--text-soft); margin-bottom: 28px;
}
.form-banner.ok {
  background: rgba(77, 208, 225, 0.12); border-color: var(--accent-2); color: var(--text);
}
.form-banner-emoji { font-size: 1.2rem; }
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.field-wide { grid-column: 1 / -1; }
.form-actions {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 32px; flex-wrap: wrap;
}
.form-tip { text-align: center; color: var(--text-mute); font-size: 0.85rem; margin-top: 16px; }

/* ============================================================
   方案结果
   ============================================================ */
.overview {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px; margin-bottom: 40px;
}
.overview-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 20px; text-align: center;
  transition: transform 0.25s, border-color 0.25s;
}
.overview-item:hover { transform: translateY(-4px); border-color: var(--accent); }
.overview-item .ov-label { font-size: 0.82rem; color: var(--text-mute); margin-bottom: 8px; }
.overview-item .ov-value {
  font-size: 1.7rem; font-weight: 900; line-height: 1.2;
  background: var(--accent-grad); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.overview-item .ov-unit { font-size: 0.78rem; color: var(--text-soft); margin-top: 4px; }

.plan-block {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; margin-bottom: 28px;
  box-shadow: var(--shadow-soft);
}
.plan-block-head {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border);
}
.plan-block-head h3 { font-size: 1.5rem; font-weight: 900; }
.plan-block-sub { color: var(--text-mute); font-size: 0.9rem; }

/* 营养素 */
.macros {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px;
}
.macro-item {
  text-align: center; padding: 22px 16px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
}
.macro-item .m-label { font-size: 0.82rem; color: var(--text-mute); margin-bottom: 6px; }
.macro-item .m-grams { font-size: 1.6rem; font-weight: 900; color: var(--accent-2); }
.macro-item .m-kcal { font-size: 0.85rem; color: var(--text-soft); margin-top: 4px; }
.macro-bar {
  height: 6px; border-radius: 999px; margin-top: 12px;
  background: var(--accent-grad); transition: width 0.8s;
}

/* 餐次 */
.meals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.meal {
  padding: 22px; border-radius: var(--radius); background: var(--bg);
  border: 1px solid var(--border);
}
.meal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.meal-head h4 { font-size: 1.1rem; font-weight: 700; }
.meal-kcal { color: var(--accent-2); font-weight: 700; font-size: 0.9rem; }
.meal ul { list-style: none; }
.meal ul li {
  padding: 6px 0; color: var(--text-soft); font-size: 0.92rem;
  border-bottom: 1px dashed var(--border);
}
.meal ul li:last-child { border-bottom: none; }
.meal ul li b { color: var(--text); }

/* 周计划 */
.week-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}
.day {
  padding: 20px; border-radius: var(--radius); background: var(--bg);
  border: 1px solid var(--border); transition: transform 0.25s, border-color 0.25s;
}
.day:hover { transform: translateY(-4px); border-color: var(--accent); }
.day-name { font-weight: 900; margin-bottom: 6px; }
.day-name.rest { color: var(--text-mute); }
.day-type {
  font-size: 0.85rem; color: var(--accent-2); font-weight: 700;
  margin-bottom: 10px;
}
.day-type.rest { color: var(--text-mute); }
.day-detail { font-size: 0.85rem; color: var(--text-soft); line-height: 1.5; }

/* 锦囊 */
.tips-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tips-list li {
  position: relative; padding: 16px 18px 16px 44px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-soft); font-size: 0.92rem;
}
.tips-list li::before {
  content: "💡"; position: absolute; left: 14px; top: 14px;
}

.result-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* 通用锦囊卡片 */
.tips-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}
.tip-card {
  padding: 28px; border-radius: var(--radius); background: var(--bg-card);
  border: 1px solid var(--border); transition: transform 0.25s, border-color 0.25s;
}
.tip-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.tip-card .tc-icon {
  font-size: 1.8rem; margin-bottom: 14px; display: block;
}
.tip-card h4 { font-size: 1.15rem; font-weight: 800; margin-bottom: 8px; }
.tip-card p { color: var(--text-soft); font-size: 0.92rem; }

/* 免责声明 */
.disclaimer { background: var(--bg-soft); padding: 32px 0; border-top: 1px solid var(--border); }
.disclaimer p {
  color: var(--text-mute); font-size: 0.88rem; text-align: center;
  max-width: 900px; margin: 0 auto; line-height: 1.8;
}

/* 页脚 */
.footer { background: var(--bg); padding: 40px 0; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.footer-meta { color: var(--text-mute); font-size: 0.85rem; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .navbar { padding: 14px 20px; }
  .gender-cards { grid-template-columns: 1fr; }
  .bmi-inputs { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .macros { grid-template-columns: 1fr; }
  .meals { grid-template-columns: 1fr; }
  .tips-list { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
  .section { padding: 72px 0; }
  .plan-block, .plan-form, .bmi-card { padding: 26px 22px; }
}

/* 入场动画 */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* 打印样式 */
@media print {
  .navbar, .hero, .nav-toggle, .form-actions, .result-actions, .scroll-hint, .disclaimer { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding: 20px 0; }
  .plan-block, .overview-item, .meal, .day, .tip-card {
    background: #fff !important; border: 1px solid #ccc !important; color: #000 !important;
    box-shadow: none !important;
  }
  .ov-value, .m-grams, .bmi-num, .grad { -webkit-text-fill-color: #000 !important; color: #000 !important; }
}
