/* ==========================================================================
   视频下载器 · 官网样式
   纯静态，无构建步骤。色板与桌面端 design.py 对齐（zinc + 深海蓝 #1A4A8E）
   ========================================================================== */

:root {
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-alt: #F6F6F7;
  --ink: #18181B;
  --ink-2: #3F3F46;
  --ink-3: #71717A;
  --line: #E7E7EA;
  --line-strong: #D4D4D8;
  --accent: #1A4A8E;
  --accent-hi: #2A63B8;
  --accent-soft: #EDF3FB;
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.06);
  --shadow-md: 0 4px 14px rgba(24, 24, 27, 0.07), 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-lg: 0 30px 70px -28px rgba(24, 24, 27, 0.35), 0 10px 28px -16px rgba(24, 24, 27, 0.16);
  --radius: 16px;
  --wrap: 1120px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

h1, h2, h3 { letter-spacing: -0.022em; line-height: 1.2; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 820px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.995); }
.btn svg { flex: none; }

.btn-primary {
  background: linear-gradient(180deg, #2360AC, #1A4A8E);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 8px 20px -8px rgba(26, 74, 142, 0.6);
}
.btn-primary:hover { background: linear-gradient(180deg, #2A6AC0, #1E5099); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset, 0 12px 26px -10px rgba(26, 74, 142, 0.65); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: #fff; border-color: #BEBEC4; color: var(--ink); box-shadow: var(--shadow-md); }

.btn-ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn-ghost:hover { background: rgba(24, 24, 27, 0.05); color: var(--ink); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 0.875rem; border-radius: 9px; }

.btn-white {
  background: #fff;
  color: #14365F;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45);
}
.btn-white:hover { background: #F4F7FC; color: #14365F; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-3);
  background: var(--surface-alt);
  border: 1px solid var(--line);
}
.pill-dark { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.22); color: #E4EDF9; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: rgba(250, 250, 250, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -20px rgba(24, 24, 27, 0.4); }
.nav-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand:hover { color: var(--ink); }
.brand img { border-radius: 8px; }
.brand-name { font-size: 1rem; letter-spacing: -0.01em; }
.brand .pill { margin-left: 2px; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links > a:not(.btn) {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink-2);
  font-weight: 500;
}
.nav-links > a:not(.btn):hover { background: rgba(24, 24, 27, 0.055); color: var(--ink); }
.nav-github { margin-left: 10px; border: 1px solid var(--line-strong) !important; background: var(--surface); }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
  margin: 3px auto;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; padding: 76px 0 84px; }
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 460px at 12% -8%, #E6EEFB 0%, rgba(230, 238, 251, 0) 62%),
    radial-gradient(760px 420px at 92% -6%, #EDF1FE 0%, rgba(237, 241, 254, 0) 58%),
    radial-gradient(600px 320px at 50% 110%, #F2F5FA 0%, rgba(242, 245, 250, 0) 70%);
  pointer-events: none;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to right, rgba(24, 24, 27, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(24, 24, 27, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(720px 380px at 30% 0%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 380px at 30% 0%, #000 0%, transparent 78%);
  opacity: 0.55;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.hero h1 { font-size: clamp(2.3rem, 4.2vw, 3.55rem); margin: 18px 0 0; line-height: 1.12; }
.hero .lead {
  margin-top: 22px;
  font-size: 1.06rem;
  color: var(--ink-2);
  max-width: 33em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 26px;
  font-size: 0.85rem;
  color: var(--ink-3);
}
.hero-meta li { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta li::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A4A8E' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  background-size: 9px 9px;
  background-position: center;
  background-repeat: no-repeat;
  flex: none;
}

.hero-visual { position: relative; }
.glow {
  position: absolute;
  inset: -8% -6% -14% -6%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(26, 74, 142, 0.28), rgba(26, 74, 142, 0) 70%);
  filter: blur(40px);
  z-index: 0;
}
.window {
  position: relative;
  z-index: 1;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(24, 24, 27, 0.1);
  background: #fff;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}
.window img { width: 100%; height: auto; }

.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(24, 24, 27, 0.08);
  box-shadow: 0 14px 34px -16px rgba(24, 24, 27, 0.35);
  font-size: 0.78rem;
  color: var(--ink-2);
  animation: floaty 6s ease-in-out infinite;
}
.float-a { left: -30px; bottom: -24px; }
.float-b { right: -26px; top: -28px; animation-delay: -3s; }
.fc-title { font-weight: 700; color: var(--ink); font-size: 0.8rem; }
.fc-row { display: inline-flex; gap: 6px; align-items: center; }
.fc-row b { color: var(--accent); font-weight: 600; }
.fc-row span { color: var(--line-strong); }
.fc-bar { display: block; width: 132px; height: 5px; border-radius: 99px; background: #E9EDF4; overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2A63B8, #1A4A8E); }
.fc-sub { color: var(--ink-3); font-size: 0.72rem; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* ---------- 站点条 ---------- */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.6); }
.strip-inner { display: flex; align-items: center; gap: 20px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.strip-label { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}

/* ---------- 区块 ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head-center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 2.6vw, 2.35rem); margin: 12px 0 0; }
.section-desc { margin-top: 14px; color: var(--ink-2); font-size: 1rem; }

/* ---------- 功能卡 ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}
.card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.card .icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 16px;
}
.card .icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 1.03rem; margin-bottom: 8px; }
.card p { color: var(--ink-3); font-size: 0.9rem; line-height: 1.62; }

/* ---------- 截图切换 ---------- */
.shots { display: flex; flex-direction: column; align-items: center; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 26px; }
.tab {
  height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-3);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.16s var(--ease);
}
.tab:hover { color: var(--ink); border-color: var(--line-strong); }
.tab.is-active { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 16px -8px rgba(24, 24, 27, 0.6); }

.shot-frame { width: 100%; max-width: 1020px; transition: opacity 0.2s var(--ease); }
.shot-frame.is-swapping { opacity: 0.25; }
.shot-caption { margin-top: 20px; color: var(--ink-3); font-size: 0.9rem; text-align: center; max-width: 620px; }

/* ---------- 下载 ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.dl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.dl-card-dark {
  color: #EAF1FA;
  border-color: transparent;
  background: radial-gradient(120% 120% at 0% 0%, #1E559F 0%, #14396E 52%, #102F5C 100%);
  box-shadow: 0 30px 60px -30px rgba(20, 57, 110, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.dl-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dl-head h3 { font-size: 1.22rem; }
.dl-card-dark .dl-head h3 { color: #fff; }
.dl-sub { font-size: 0.84rem; color: var(--ink-3); }
.dl-card-dark .dl-sub { color: #A9C1E0; }
.dl-head .pill { margin-left: auto; }
.dl-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(26, 74, 142, 0.1);
  color: var(--accent);
  flex: none;
}
.dl-card-dark .dl-icon { background: rgba(255, 255, 255, 0.14); color: #fff; }
.dl-icon svg { width: 22px; height: 22px; }
.dl-icon-green { background: rgba(16, 185, 129, 0.12); color: #0E7C4A; }
.dl-desc { font-size: 0.9rem; color: var(--ink-3); }
.dl-card-dark .dl-desc { color: #B9CDE6; }
.dl-card .btn { width: 100%; margin-top: 4px; }
.dl-alt { font-size: 0.84rem; text-align: center; color: var(--ink-3); }
.dl-card-dark .dl-alt { color: #A9C1E0; }
.dl-alt:hover { color: var(--accent); }
.dl-card-dark .dl-alt:hover { color: #fff; }
.dl-sha { opacity: 0.8; }
.size { font-weight: 500; opacity: 0.75; font-size: 0.85em; margin-left: 4px; }
.dl-foot { text-align: center; margin-top: 34px; font-size: 0.9rem; color: var(--ink-3); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; max-width: 780px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, var(--line-strong), var(--line));
}
.timeline li { position: relative; display: flex; gap: 24px; padding: 0 0 30px 0; }
.timeline li:last-child { padding-bottom: 0; }
.tl-dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 11px;
  height: 11px;
  margin-top: 7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px #fff;
}
.tl-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tl-meta time { font-size: 0.8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-body h3 { font-size: 1.02rem; margin-bottom: 6px; }
.tl-body p { color: var(--ink-3); font-size: 0.9rem; }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.faq-item[open] { border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 17px 30px 17px 0;
  font-weight: 600;
  font-size: 0.97rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.8px solid var(--ink-3);
  border-bottom: 1.8px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item p { padding: 0 0 18px; color: var(--ink-2); font-size: 0.92rem; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 44px 0 32px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { border-radius: 7px; }
.footer-brand strong { font-size: 0.96rem; }
.footer-brand p { font-size: 0.82rem; color: var(--ink-3); }
.footer-links { display: flex; gap: 22px; font-size: 0.88rem; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-3);
  line-height: 1.7;
}
.footer-legal p { max-width: 620px; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { order: 2; }
  .float-card { display: none; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .section { padding: 64px 0; }
  .wrap { padding: 0 18px; }
  .nav-inner { padding: 0 18px; gap: 12px; }
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: #FFFFFF;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.is-open { display: flex; }
  .nav-links > a:not(.btn) { padding: 11px 12px; }
  .nav-github { margin-left: 0; justify-content: center; }
  .brand .pill { display: none; }
  .float-card { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 0; min-width: 0; padding: 0 12px; }
  .hero-meta { gap: 12px 18px; }
  .section-head { margin-bottom: 34px; }
  .tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .dl-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
