/* ============================================================
   格式工坊 FormatForge — 设计系统
   深色玻璃拟态 + 极光渐变 + 动画
   ============================================================ */

/* ---------- CSS 变量 / 主题 ---------- */
:root {
  /* 深色主题 (默认) */
  --bg: #070b16;
  --bg-2: #0b1120;
  --bg-3: #101a30;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.10);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --text: #e8ecf6;
  --text-dim: #a5b0c4;
  --text-faint: #6b7a93;
  --accent-1: #6366f1;   /* 靛蓝 */
  --accent-2: #22d3ee;   /* 青 */
  --accent-3: #f472b6;   /* 粉 */
  --accent-4: #8b5cf6;   /* 紫 */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --grad: linear-gradient(120deg, #6366f1, #22d3ee 55%, #f472b6);
  --grad-soft: linear-gradient(120deg, rgba(99,102,241,.25), rgba(34,211,238,.2) 55%, rgba(244,114,182,.22));
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;
  --nav-h: 68px;
}

html[data-theme="light"] {
  --bg: #f5f7fc;
  --bg-2: #ffffff;
  --bg-3: #eef1f9;
  --glass: rgba(255, 255, 255, 0.75);
  --glass-strong: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(15, 23, 42, 0.10);
  --glass-border-strong: rgba(15, 23, 42, 0.18);
  --text: #0f172a;
  --text-dim: #475569;
  --text-faint: #94a3b8;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.10);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* 修复：hidden 属性不得被 .btn 等 display 规则覆盖 */
[hidden] { display: none !important; }

/* 锚点跳转时避免被吸顶导航遮挡 */
.section[id], #how, #features, #formats, #privacy, #faq { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* 尊重系统"减少动态效果"偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

::selection { background: rgba(99, 102, 241, 0.4); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 130, 160, 0.35); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 130, 160, 0.6); }

/* ---------- 极光背景 ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}
.aurora::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(99,102,241,.20), transparent 60%),
    radial-gradient(ellipse 50% 45% at 85% 20%, rgba(34,211,238,.14), transparent 60%),
    radial-gradient(ellipse 55% 50% at 70% 85%, rgba(244,114,182,.12), transparent 60%),
    radial-gradient(ellipse 40% 40% at 30% 75%, rgba(139,92,246,.13), transparent 60%);
}
html[data-theme="light"] .aurora::before {
  background-image:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(99,102,241,.14), transparent 60%),
    radial-gradient(ellipse 50% 45% at 85% 20%, rgba(34,211,238,.10), transparent 60%),
    radial-gradient(ellipse 55% 50% at 70% 85%, rgba(244,114,182,.10), transparent 60%);
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}
html[data-theme="light"] .orb { mix-blend-mode: normal; opacity: .45; }
.orb-1 { width: 520px; height: 520px; background: #6366f1; top: -160px; left: -80px; }
.orb-2 { width: 460px; height: 460px; background: #22d3ee; top: 20%; right: -140px; animation-delay: -8s; }
.orb-3 { width: 420px; height: 420px; background: #f472b6; bottom: -140px; left: 30%; animation-delay: -16s; }

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, -40px) scale(1.12); }
  100% { transform: translate(-50px, 30px) scale(.95); }
}

/* 细网格纹理 */
.grid-texture {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
}
html[data-theme="light"] .grid-texture {
  background-image:
    linear-gradient(rgba(15,23,42,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,.05) 1px, transparent 1px);
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 48px);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(7, 11, 22, 0.55);
  border-bottom: 1px solid var(--glass-border);
  transition: background .3s;
}
html[data-theme="light"] .navbar { background: rgba(245, 247, 252, 0.7); }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: .3px;
}
.brand-logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: var(--shadow-glow);
}
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a.nav-item {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  color: var(--text-dim);
  transition: all .2s;
}
.nav-links a.nav-item:hover { color: var(--text); background: var(--glass); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-dim);
  display: grid;
  place-items: center;
  font-size: 17px;
  transition: all .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--glass-border-strong); background: var(--glass-strong); transform: translateY(-1px); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .22s cubic-bezier(.2,.7,.3,1);
  white-space: nowrap;
  position: relative;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(99, 102, 241, 0.45); }
.btn-ghost {
  background: var(--glass);
  border-color: var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: var(--glass-strong); border-color: var(--glass-border-strong); transform: translateY(-2px); }
.btn-lg { padding: 15px 30px; font-size: 16.5px; border-radius: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------- 通用布局 ---------- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
.section { padding: clamp(60px, 9vw, 110px) 0; position: relative; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(34px, 5vw, 56px); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 7px 15px;
  border-radius: 100px;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.2);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4.6vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-sub { color: var(--text-dim); font-size: 16.5px; margin-top: 16px; }

/* ---------- 玻璃卡片 ---------- */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.glass-hover:hover { transform: translateY(-5px); border-color: var(--glass-border-strong); box-shadow: var(--shadow), var(--shadow-glow); }

/* ---------- 动画出现 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

/* ============================================================
   首页 hero
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: clamp(40px, 7vw, 90px) 0;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 5vw, 64px);
  align-items: center;
  width: 100%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 8px 15px;
  border-radius: 100px;
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% {opacity: 1} 50% {opacity: .4} }

.hero h1 {
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 22px;
}
.hero .sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-dim);
  max-width: 540px;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

/* Hero 入场动画 */
@keyframes heroEnter { from { opacity: 0; transform: translateY(32px); } }
.hero .hero-copy { animation: heroEnter .9s cubic-bezier(.2,.7,.3,1) .1s backwards; }
.hero .hero-visual { animation: heroEnter .9s cubic-bezier(.2,.7,.3,1) .28s backwards; }

.hero-stats { display: flex; gap: clamp(22px, 4vw, 44px); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 13px; color: var(--text-faint); }

/* hero 右侧：转换演示卡片 */
.hero-visual { position: relative; }
.hero-card {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border-strong);
  border-radius: 22px;
  padding: 26px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow), var(--shadow-glow);
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }

.hero-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.hero-card-header .title { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.live-pill {
  font-size: 11.5px; font-weight: 700; color: var(--success);
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  padding: 4px 11px; border-radius: 100px;
  display: flex; align-items: center; gap: 6px;
}
.live-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: pulse 1.6s infinite; }

.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 10px;
}
html[data-theme="light"] .file-row { background: rgba(15,23,42,.03); }
.file-ico {
  width: 42px; height: 42px; flex-shrink: 0;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 20px;
  background: linear-gradient(135deg, rgba(99,102,241,.3), rgba(34,211,238,.25));
  border: 1px solid rgba(255,255,255,.14);
}
.file-meta { flex: 1; min-width: 0; }
.file-meta b { font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta span { font-size: 12px; color: var(--text-faint); }

.convert-arrow { text-align: center; font-size: 22px; padding: 3px 0; color: var(--accent-2); animation: pulseArrow 2.4s ease-in-out infinite; }
@keyframes pulseArrow { 0%,100% { transform: translateY(0); opacity:.7 } 50% { transform: translateY(5px); opacity:1 } }

.hero-mini-progress {
  height: 8px; border-radius: 100px; overflow: hidden;
  background: rgba(255,255,255,.08);
  margin-top: 16px; position: relative;
}
.hero-mini-progress i {
  position: absolute; inset: 0;
  width: 72%;
  background: var(--grad);
  border-radius: 100px;
  animation: loadBar 3.4s ease-in-out infinite;
}
@keyframes loadBar { 0% { width: 8% } 60% { width: 76% } 100% { width: 100% } }
.hero-mini-progress span { position: absolute; right: 0; top: 12px; font-size: 11.5px; color: var(--text-faint); }

/* 浮动的格式标签 */
.float-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ftag {
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 100px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  animation: float 6s ease-in-out infinite;
}
.ftag:nth-child(2n) { animation-delay: -2s; }
.ftag:nth-child(3n) { animation-delay: -4s; }
.ftag i { font-style: normal; margin-right: 5px; }

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  font-size: 12px; color: var(--text-faint);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  letter-spacing: 1.5px;
}
.scroll-hint::after {
  content: ""; width: 1.5px; height: 34px;
  background: linear-gradient(var(--text-faint), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine { 0% { transform: scaleY(0); transform-origin: top } 45% { transform: scaleY(1); transform-origin: top } 55% { transform: scaleY(1); transform-origin: bottom } 100% { transform: scaleY(0); transform-origin: bottom } }

/* ============================================================
   三步流程
   ============================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 28px); }
.step {
  padding: clamp(24px, 3vw, 34px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.step-num {
  width: 54px; height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
  background: var(--grad-soft);
  border: 1px solid var(--glass-border-strong);
  color: var(--text);
}
.step h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 10px; }
.step p { font-size: 14.5px; color: var(--text-dim); }
.step::before {
  content: "";
  position: absolute;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.3), transparent 70%);
  top: -20px; right: -20px;
  pointer-events: none;
}

/* ============================================================
   功能卡片
   ============================================================ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 26px); }
.feature {
  padding: clamp(22px, 3vw, 30px);
  position: relative;
  overflow: hidden;
}
.feature-ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--grad-soft);
  border: 1px solid var(--glass-border-strong);
  margin-bottom: 16px;
}
.feature h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; }
.feature p { font-size: 14.3px; color: var(--text-dim); }
.feature .tag {
  display: inline-block;
  margin-top: 13px;
  font-size: 12px; font-weight: 700;
  padding: 4px 11px; border-radius: 100px;
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.22);
}

/* ============================================================
   格式矩阵
   ============================================================ */
.matrix-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.mtab {
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text-dim);
  transition: all .2s;
}
.mtab:hover { color: var(--text); border-color: var(--glass-border-strong); }
.mtab.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(99,102,241,.35);
}
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 12px;
  min-height: 180px;
}
.format-chip {
  padding: 16px 8px;
  border-radius: 14px;
  text-align: center;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  cursor: default;
  transition: all .2s;
  position: relative;
  animation: popIn .4s cubic-bezier(.2,.7,.3,1.3) backwards;
}
@keyframes popIn { from { opacity: 0; transform: scale(.85); } }
.format-chip:hover { transform: translateY(-3px); border-color: var(--glass-border-strong); background: var(--glass-strong); }
.format-chip .f-ico { font-size: 24px; margin-bottom: 6px; }
.format-chip b { font-size: 13px; letter-spacing: .5px; text-transform: uppercase; display: block; }
.format-chip span { font-size: 11px; color: var(--text-faint); }
.format-chip .f-to {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  gap: 5px; flex-wrap: wrap;
  padding: 6px;
  background: rgba(7, 11, 22, 0.92);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
  font-size: 10.5px; font-weight: 700;
  color: var(--accent-2);
}
html[data-theme="light"] .format-chip .f-to { background: rgba(255,255,255,.96); }
.format-chip:hover .f-to { opacity: 1; }
.format-chip .f-to em { font-style: normal; background: rgba(34,211,238,.15); padding: 2px 6px; border-radius: 6px; border: 1px solid rgba(34,211,238,.2); }

/* ============================================================
   隐私横幅
   ============================================================ */
.privacy {
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
  background: var(--grad-soft);
  border: 1px solid var(--glass-border-strong);
  position: relative;
  overflow: hidden;
}
.privacy .shield {
  width: 76px; height: 76px;
  margin: 0 auto 20px;
  border-radius: 22px;
  display: grid; place-items: center;
  font-size: 36px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow-glow);
  animation: float 5s ease-in-out infinite;
}
.privacy h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin-bottom: 12px; }
.privacy p { color: var(--text-dim); max-width: 640px; margin: 0 auto; font-size: 16px; }
.privacy .badges { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.privacy .badge {
  font-size: 13px; font-weight: 600;
  padding: 8px 16px; border-radius: 100px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  display: flex; align-items: center; gap: 7px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}
.faq-q .chev { transition: transform .3s; font-size: 18px; color: var(--text-faint); flex-shrink: 0; }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  font-size: 14.5px;
  color: var(--text-dim);
  padding: 0 20px;
}
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 18px; }

/* ============================================================
   工具页专用
   ============================================================ */
.page-tool { padding: clamp(20px, 4vw, 40px) 0 80px; }

.tool-grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(18px, 3vw, 28px); align-items: start; }
.tool-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--nav-h) + 18px); }
.tool-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.panel { padding: 22px; border-radius: var(--radius); }
.panel-title {
  font-size: 15.5px; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
  margin-bottom: 16px;
}
.panel-title .pi { font-size: 18px; }
.panel-title small { color: var(--text-faint); font-weight: 500; font-size: 12.5px; }

/* 拖拽区 */
.dropzone {
  border: 2px dashed var(--glass-border-strong);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 56px) 20px;
  text-align: center;
  cursor: pointer;
  transition: all .25s;
  background: var(--glass);
  position: relative;
  overflow: hidden;
}
.dropzone::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}
.dropzone:hover { border-color: var(--accent-2); }
.dropzone.dragover {
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, 0.06);
  transform: scale(1.01);
}
.dropzone.dragover::before { opacity: 1; }
.dz-ico {
  font-size: 52px;
  margin-bottom: 14px;
  display: inline-block;
  animation: bounce 2.4s ease-in-out infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.dropzone h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.dropzone p { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.dropzone input[type=file] { display: none; }
.dropzone .hint {
  font-size: 12px; color: var(--text-faint);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* 配方栏 */
.recipes { display: flex; gap: 10px; flex-wrap: wrap; }
.recipe-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 15px;
  border-radius: 12px;
  font-size: 13.5px; font-weight: 600;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  transition: all .2s;
}
.recipe-btn:hover {
  color: var(--text);
  border-color: var(--accent-2);
  background: rgba(34, 211, 238, 0.08);
  transform: translateY(-2px);
}
.recipe-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* 队列卡片 */
.task {
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: slideIn .4s cubic-bezier(.2,.7,.3,1);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
}
@keyframes slideIn { from { opacity: 0; transform: translateY(-10px); } }
.task-top { display: flex; align-items: center; gap: 13px; }
.task-ico {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 20px;
  background: var(--grad-soft);
  border: 1px solid var(--glass-border-strong);
}
.task-info { flex: 1; min-width: 0; }
.task-name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; }
.task-size { font-size: 12.5px; color: var(--text-faint); }
.task-status { flex-shrink: 0; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.task-remove {
  width: 30px; height: 30px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-size: 15px;
  display: grid; place-items: center;
  transition: all .2s;
}
.task-remove:hover { background: rgba(248, 113, 113, 0.14); color: var(--danger); }

.task-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.task-label { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; }
.format-select {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--glass-border-strong);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  min-width: 110px;
}
.format-select:focus { border-color: var(--accent-2); }
.format-select option { background: var(--bg-2); color: var(--text); }

.settings-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  transition: all .2s;
}
.settings-btn:hover { color: var(--text); border-color: var(--glass-border-strong); }

.task-progress-wrap { display: flex; align-items: center; gap: 12px; }
.progress {
  flex: 1;
  height: 8px;
  border-radius: 100px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  position: relative;
}
.progress i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: var(--grad);
  transition: width .3s ease;
  position: relative;
  overflow: hidden;
}
.progress i::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.progress-pct { font-size: 12.5px; font-weight: 700; color: var(--text-dim); min-width: 42px; text-align: right; }

.task-actions { display: flex; gap: 8px; }
.task-actions .btn { flex: 1; }

/* 状态徽章 */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 100px; font-size: 11.5px; font-weight: 700; }
.status-queued { background: rgba(148, 163, 184, 0.14); color: var(--text-dim); border: 1px solid rgba(148,163,184,.25); }
.status-converting { background: rgba(34, 211, 238, 0.12); color: var(--accent-2); border: 1px solid rgba(34,211,238,.3); }
.status-loading { background: rgba(139, 92, 246, 0.12); color: var(--accent-4); border: 1px solid rgba(139,92,246,.3); }
.status-done { background: rgba(52, 211, 153, 0.12); color: var(--success); border: 1px solid rgba(52,211,153,.3); }
.status-error { background: rgba(248, 113, 113, 0.12); color: var(--danger); border: 1px solid rgba(248,113,113,.3); }

/* 空状态 */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty-state .ei { font-size: 44px; margin-bottom: 12px; opacity: .6; }
.empty-state p { font-size: 14.5px; }

/* 检测警告 */
.detect-warn {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--warning);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  padding: 6px 11px;
  border-radius: 9px;
}

/* 设置面板 */
.settings-panel {
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 12px;
  background: var(--bg-2);
  border: 1px solid var(--glass-border);
  display: none;
}
.settings-panel.open { display: block; animation: slideDown .25s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } }
.setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.setting-field { display: flex; flex-direction: column; gap: 6px; }
.setting-field label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.setting-field select, .setting-field input[type=number], .setting-field input[type=text] {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--glass-border);
  outline: none;
  transition: border-color .2s;
}
.setting-field select:focus, .setting-field input:focus { border-color: var(--accent-2); }
.adv-toggle {
  margin-top: 14px;
  font-size: 13px; font-weight: 600;
  color: var(--accent-2);
  background: none; border: none;
  display: flex; align-items: center; gap: 6px;
  padding: 0;
}
.adv-args { margin-top: 10px; display: none; }
.adv-args.show { display: block; }
.adv-args textarea {
  width: 100%;
  min-height: 70px;
  padding: 11px 13px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--glass-border);
  outline: none;
  resize: vertical;
}

/* Toast */
.toast-wrap { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 18px;
  border-radius: 13px;
  font-size: 14px; font-weight: 600;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border-strong);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  color: var(--text);
  animation: toastIn .35s cubic-bezier(.2,.7,.3,1.3);
  max-width: 360px;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
.toast .t-ico { font-size: 18px; }

/* 顶部加载条（ffmpeg 核心下载进度） */
.loadbar-top { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200; background: rgba(255,255,255,.06); display: none; }
.loadbar-top i { display: block; height: 100%; width: 0%; background: var(--grad); transition: width .2s; }
.loadbar-top.show { display: block; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  border-top: 1px solid var(--glass-border);
  padding: 40px 0 34px;
  margin-top: 40px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer .brand { font-size: 17px; }
.footer-copy { font-size: 13px; color: var(--text-faint); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { font-size: 13px; color: var(--text-dim); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 46px; text-align: left; }
  .features, .steps { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-side { position: static; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .features, .steps { grid-template-columns: 1fr; }
  .setting-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .stat b { font-size: 21px; }
  .hero-cta .btn { flex: 1; }
  .task-row { flex-direction: column; align-items: stretch; }
  .format-select { width: 100%; }
}
