/* 基础色调：参考 freeletics（黑白高对比） */
:root {
  --bg: #000000;
  --text: #ffffff;
  --muted: #e5e5e5;
  --accent: #00e0ff; /* 细微强调色，可用于链接 hover */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

/* 导航 */
.header {
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid #111;
  z-index: 1000;
}
.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  position: relative;
}
.brand { display:flex; gap:8px; align-items:center; text-decoration:none; }
.brand .title { font-weight:900; font-size:20px; color: var(--text); }
.back-btn{display:none;width:34px;height:34px;border:1px solid #333;border-radius:8px;background:transparent;color:#fff;align-items:center;justify-content:center;text-decoration:none;position:absolute;left:16px;top:50%;transform:translateY(-50%);z-index:1101}
.nav .right a { padding:6px 10px; border-radius:8px; }
.nav a { color: var(--text); text-decoration:none; font-weight:600; }
.nav a:hover { color: var(--muted); }
.nav .left, .nav .right { display: flex; align-items: center; gap: 24px; }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.nav a:hover { color: var(--muted); }
.logo { display: flex; align-items: center; gap: 8px; }
.logo svg { width: 28px; height: 28px; }

/* hero */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px;
  position: relative; /* 为覆盖层定位 */
}
.hero h1 { font-size: 48px; margin: 0 0 16px; }
.hero p { font-size: 18px; color: var(--muted); line-height: 1.4; }
.hero .hero-desc.short { display: none; }
.hero .cta { display: flex; gap: 12px; margin-top: 16px; justify-content: center; }

/* 悬浮覆盖层：文案在视频之上 */
.hero-overlay .hero-bg {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.hero-overlay .hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center; /* 居中 */
  padding: 24px;
}
.hero-overlay .hero-inner {
  max-width: 800px;
  text-align: center;
  padding: 24px;
  border-radius: 12px;
}

/* 之前的独立视频块不再需要，但保留基础按钮样式 */
.button {
  background: #fff;
  color: #000;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}
.button.secondary { background: transparent; color: var(--text); border: 1px solid #444; }
.button:hover { filter: brightness(0.9); }

/* section 标题 */
.section { max-width: 1200px; margin: 0 auto; padding: 48px 16px; }
.section h2 { font-size: 32px; margin: 0 0 24px; }

/* detail hero layout */
.detail-hero { display: block; }
.detail-hero .media { position: relative; border-radius: 10px; overflow: hidden; height: 520px; background: #000; background-position: bottom center; background-size: 100% auto; background-repeat: no-repeat; }
.detail-hero .media picture { position: absolute; inset: 0; display: block; }
.detail-hero .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.detail-hero .overlay-bottom { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-hero .overlay-right { position: absolute; left: 24px; bottom: 128px; width: 42%; max-width: 520px; text-align: left; }
.detail-hero .play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 2; }
.detail-hero .play-overlay .play { width: 68px; height: 68px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); font-weight: 900; font-size: 24px; }
.detail-hero .play-overlay .play:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.3); cursor: pointer; }
.overlay-right h1 { font-size: 36px; margin: 0 0 12px; }
.overlay-right p { color: var(--muted); }
.overlay-bottom .badges { display: flex; gap: 8px; flex-wrap: wrap; }
.overlay-bottom .play-btn { background: #fff; color: #000; border: none; padding: 8px 12px; border-radius: 8px; font-weight: 700; }
.detail-hero .overlay-bottom .badge { display: inline-grid; justify-items: center; gap: 8px; padding: 8px 10px; background: rgba(255,255,255,0.06); border: none; border-radius: 8px; min-width: 86px; }
.detail-hero .overlay-bottom .badge .icon svg { width: 18px; height: 18px; }
.detail-hero .overlay-bottom .badge .label { font-size: 12px; }
.detail-hero .content-right { display: none; }
.page-recipes .detail-hero .media { background-size: cover; }
.page-recipes .detail-hero .media img { object-fit: cover; }
.page-recipes .detail-hero .overlay-bottom .badge { background: rgba(0,0,0,0.34); border: 1px solid rgba(255,255,255,0.18); }
.page-recipes .detail-hero .overlay-bottom .badge .label { color: rgba(255,255,255,0.92); }

.page-recipes .section h2 { letter-spacing: 0.2px; }
.page-recipes .tools-list { grid-template-columns: 1fr 1fr; gap: 12px; }
.page-recipes .section h2 { position: relative; display: inline-block; padding-bottom: 6px; }
.page-recipes .section h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 999px; background: linear-gradient(90deg, rgba(79,184,173,0.95), rgba(103,124,199,0.95)); opacity: 0.55; }
.page-recipes .tool-item { position: relative; padding: 10px 12px 10px 14px; border: 0; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); box-shadow: 0 10px 20px rgba(0,0,0,0.22); }
.page-recipes .tool-item::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 999px; background: rgba(79,184,173,0.9); }
.page-recipes .tool-item:nth-child(3n+2)::before { background: rgba(103,124,199,0.9); }
.page-recipes .tool-item:nth-child(3n)::before { background: rgba(240,117,128,0.9); }
.page-recipes .tool-label { color: rgba(255,255,255,0.92); }
.page-recipes .desc { line-height: 1.65; }
.page-recipes .desc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.page-recipes .desc li { position: relative; padding: 12px 14px 12px 16px; border: 0; border-radius: 14px; background: radial-gradient(120% 120% at 0% 0%, rgba(79,184,173,0.12), rgba(255,255,255,0.02) 55%, rgba(255,255,255,0.01)); box-shadow: 0 10px 20px rgba(0,0,0,0.22); }
.page-recipes .desc li::before { content: ""; position: absolute; inset: 0; border-radius: 14px; background: linear-gradient(120deg, rgba(255,255,255,0.10), rgba(255,255,255,0)); opacity: 0.35; pointer-events: none; }
.page-recipes .desc li::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 999px; background: rgba(240,117,128,0.9); }
.page-recipes .desc li:nth-child(2n)::after { background: rgba(103,124,199,0.9); }
.page-recipes .desc li p { margin: 0; color: rgba(255,255,255,0.92); }
.page-recipes .desc br { display: none; }

@media (max-width: 600px) {
  .page-recipes .tools-list { grid-template-columns: 1fr; }
}

/* 程序卡片 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #0a0a0a;
  border: 1px solid #111;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  height: 280px;
}
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card picture { position: absolute; inset: 0; display: block; }
.card picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card { background-position: center; background-size: cover; background-repeat: no-repeat; }
.card .content { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; text-align: center; color: var(--text); }
.card .title { font-weight: 800; font-size: 24px; color: var(--text); }
.card .desc { color: var(--text); font-size: 16px; margin-top: 12px; display: none; }
.card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 999px;
}
.card a { color: var(--text); text-decoration: none; }
.card:hover { border-color: #111; }
.card:hover img { opacity: 0; }
.card:hover { background-image: var(--bg-svg); }
.card:hover picture { display: none; }
.card:hover > img { display: none; }
.card:hover .content { background: transparent; }

/* 点击/聚焦时也应用纯色背景（兼容移动端无 hover 场景） */
.card:active { background-image: var(--bg-svg); }
.card:active picture { display: none; }
.card:active > img { display: none; }
.card:active .content { background: transparent; }
.card:hover .desc { display: block; }

.video-section .video-card { position: relative; border-radius: 12px; overflow: hidden; }
.video-section img { width: 100%; height: 360px; object-fit: cover; display: block; }
.video-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--text); background: linear-gradient(180deg, rgba(0,0,0,0.0), rgba(0,0,0,0.35)); }
.video-overlay .play { width: 68px; height: 68px; border-radius: 999px; display: grid; place-items: center; background: rgba(255,255,255,0.15); border: 1px solid #444; font-weight: 900; font-size: 24px; }
.video-overlay .label { font-weight: 700; font-size: 20px; }
.video-card:hover .video-overlay .play { background: rgba(255,255,255,0.25); }

.video-modal[hidden] { display: none; }
.video-modal { position: fixed; inset: 0; z-index: 2000; }
.video-modal { position: fixed; inset: 0; z-index: 2000; display: grid; align-items: start; justify-items: center; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.video-modal-content { position: relative; width: 90vw; max-width: 960px; height: 54vw; max-height: 540px; margin: 18vh auto 0; background: rgba(0,0,0,0.6); border-radius: 12px; overflow: hidden; }
.video-modal-content video { position: relative; z-index: 0; }
.video-close { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.1); color: var(--text); border: 1px solid #333; border-radius: 8px; padding: 6px 10px; font-weight: 700; cursor: pointer; }
.video-close { z-index: 2; }
/* smaller subscribe modal */
.subscribe-modal-content { width: 480px; max-width: 92vw; height: auto; margin: 22vh auto 0; }

/* 页脚 */
.footer { border-top: 1px solid #111; margin-top: 48px; }
.footer .inner { max-width: 1200px; margin: 0 auto; padding: 24px 16px; color: var(--muted); font-size: 14px; }

/* 响应式 */
@media (max-width: 900px) {
  .nav { flex-direction: column; gap: 10px; }
  .nav .left, .nav .right { gap: 12px; flex-wrap: wrap; }
  .nav .right { display: none; }
  .hero h1 { font-size: 36px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .section { padding: 32px 12px; }
  .hero-overlay .hero-inner { max-width: 92vw; padding: 16px; }
  .back-btn { display:flex; }
  .brand .home { margin-left: 0; }
  .brand { position: relative; justify-content: center; width: 100%; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 28px; }
  .hero .hero-desc.long { display: none; }
  .hero .hero-desc.short { display: block; font-size: 16px; }
  .cards { grid-template-columns: 1fr; }
  .nutrition .nt-grid { grid-template-columns: 1fr 1fr; }
  .nt-card img { height: 220px; }
  .video-section img { height: 240px; }
  .video-modal-content { width: 92vw; height: 52vw; max-height: none; }
  .detail-hero .media { height: 400px; }
  .detail-hero .overlay-right { left: 16px; bottom: 88px; width: 86%; text-align: left; }
  .usp-grid { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: 1fr; }
  .preview-right { grid-template-columns: 100px 1fr; }
  .video-overlay .label { font-size: 16px; }
  .usp-grid { gap: 12px; grid-template-columns: 1fr; }
  .usp-card { display: block; height: auto; min-height: 120px; }
  .usp-card img { position: static; width: 100%; height: 160px; object-fit: cover; display:block; }
  .usp-card .content { position: static; background: transparent; padding: 10px 12px; }
  .usp-card .title { font-size: 16px; }
  .usp-card .desc { font-size: 13px; margin-top: 4px; }
}
  
.nutrition .nt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.recipes .nt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.nt-card { position: relative; border-radius: 12px; overflow: hidden; display: block; transition: transform 180ms ease, box-shadow 180ms ease; }
.nt-card img { width: 100%; height: 280px; object-fit: cover; display: block; }
.nt-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 20%, rgba(0,0,0,0.6) 80%); opacity: 0.6; transition: opacity 180ms ease; }
.nt-content { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; }
.nt-title { font-weight: 800; font-size: 24px; color: var(--text); }
.nt-desc { color: var(--muted); font-size: 14px; margin-top: 6px; }
.nt-card:hover { transform: scale(1.02); box-shadow: 0 12px 24px rgba(0,0,0,0.35); }
.nt-card:hover::after { opacity: 0.75; }

@media (max-width: 600px) {
  .nt-title { font-size: 20px; }
  .recipes .nt-grid { grid-template-columns: 1fr; }
}
.usp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.usp-card { position: relative; height: 220px; border: 1px solid #111; border-radius: 10px; overflow: hidden; }
.usp-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.usp-card .content { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(0,0,0,0.5); border-radius: 8px; padding: 8px 10px; }
.usp-card .title { font-weight: 800; }
.usp-card .desc { color: var(--muted); font-size: 12px; margin-top: 4px; }

.preview-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
.preview-left { color: var(--muted); }
.preview-title { color: var(--text); font-size: 24px; font-weight: 800; margin: 0 0 8px; }
.preview-desc { color: var(--muted); line-height: 1.5; }
.preview-right { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.preview-subtitle { grid-column: 1 / -1; font-size: 18px; font-weight: 800; margin: 0 0 8px; }
.donut { width: 120px; height: 120px; border-radius: 999px; background: conic-gradient(#4fb8ad 0%, #677cc7 0%, #f07580 0%); }
.donut-wrap { position: relative; width: 120px; height: 120px; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; gap: 4px; font-weight: 800; }
.donut-center .pct { font-size: 14px; }
.donut-legend { display: grid; gap: 6px; }
.donut-legend .item { display: flex; align-items: center; gap: 8px; }
.donut-legend .swatch { width: 12px; height: 12px; border-radius: 2px; }

.tools-list { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.tool-item { display: block; }
.tool-label { font-size: 14px; color: var(--text); white-space: nowrap; }
.hamburger{display:none;width:34px;height:34px;border:1px solid #333;border-radius:8px;background:transparent;color:#fff;align-items:center;justify-content:center;cursor:pointer;position:absolute;right:16px;top:50%;transform:translateY(-50%);z-index:1101}
.hamburger span{display:block;width:18px;height:2px;background:#fff;position:relative}
.hamburger span::before,.hamburger span::after{content:"";position:absolute;left:0;width:18px;height:2px;background:#fff}
.hamburger span::before{top:-6px}
.hamburger span::after{top:6px}
.drawer{position:fixed;inset:0;display:none;z-index:2000}
.drawer[data-open="true"]{display:block}
.drawer-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.6)}
.drawer-panel{position:absolute;left:0;top:0;width:76vw;max-width:320px;height:100vh;background:#0e0e0e;border-right:1px solid #222;display:flex;flex-direction:column;padding:16px;gap:12px}
.drawer-panel a{color:#fff;text-decoration:none;padding:10px;border-radius:8px}
.drawer-close{position:absolute;right:8px;top:8px;background:transparent;border:none;color:#fff;font-size:18px}
/* ensure mobile shows hamburger even if earlier rules hide it */
@media (max-width: 900px) { .hamburger { display: flex; } }
@media (max-width: 900px) { .usp-grid { grid-template-columns: repeat(1, 1fr) !important; } }
@media (max-width: 900px) { .preview-grid { grid-template-columns: repeat(1, 1fr) !important; } }
