/* ============================================================
   MediaForge - 设计系统
   Deep-tech 语言 / 单 accent（cyan）/ 双模式
   Dials: VARIANCE 7 / MOTION 5 / DENSITY 4
   ============================================================ */

/* ---------- 字体 ---------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/SpaceGrotesk-Variable.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

/* ---------- 设计令牌 ---------- */
:root {
  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  --nav-h: 68px;
  --container: 1200px;
  --gap: 24px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.35s;
}

/* 亮色模式（默认令牌） */
:root, [data-theme="light"] {
  --bg: #f6f6f7;
  --bg-elev: #ffffff;
  --bg-soft: #eef0f2;
  --surface: #ffffff;
  --surface-2: #f3f4f6;
  --surface-3: #e7e9ec;
  --border: rgba(9, 9, 11, 0.10);
  --border-strong: rgba(9, 9, 11, 0.18);
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #8b8b93;
  --accent: #0891b2;
  --accent-strong: #0e7490;
  --accent-soft: rgba(8, 145, 178, 0.10);
  --accent-contrast: #ffffff;
  --ok: #16a34a;
  --err: #dc2626;
  --warn: #d97706;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.04), 0 1px 3px rgba(9, 9, 11, 0.05);
  --shadow-md: 0 4px 14px rgba(9, 9, 11, 0.07), 0 2px 4px rgba(9, 9, 11, 0.05);
  --shadow-lg: 0 18px 48px rgba(9, 9, 11, 0.12), 0 4px 12px rgba(9, 9, 11, 0.06);
  --glow: 0 0 0 1px rgba(8, 145, 178, 0.22), 0 8px 32px rgba(8, 145, 178, 0.18);
  --grid-line: rgba(9, 9, 11, 0.05);
  color-scheme: light;
}

/* 深色模式 */
[data-theme="dark"] {
  --bg: #08080c;
  --bg-elev: #0d0d13;
  --bg-soft: #101017;
  --surface: #12121a;
  --surface-2: #181821;
  --surface-3: #20202b;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f2f4;
  --text-2: #a5a5b0;
  --text-3: #6e6e7a;
  --accent: #22d3ee;
  --accent-strong: #67e8f9;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --accent-contrast: #062033;
  --ok: #4ade80;
  --err: #f87171;
  --warn: #fbbf24;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.55);
  --glow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 8px 36px rgba(34, 211, 238, 0.14);
  --grid-line: rgba(255, 255, 255, 0.05);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08080c;
    --bg-elev: #0d0d13;
    --bg-soft: #101017;
    --surface: #12121a;
    --surface-2: #181821;
    --surface-3: #20202b;
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #f2f2f4;
    --text-2: #a5a5b0;
    --text-3: #6e6e7a;
    --accent: #22d3ee;
    --accent-strong: #67e8f9;
    --accent-soft: rgba(34, 211, 238, 0.12);
    --accent-contrast: #062033;
    --ok: #4ade80;
    --err: #f87171;
    --warn: #fbbf24;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.55);
    --glow: 0 0 0 1px rgba(34, 211, 238, 0.25), 0 8px 36px rgba(34, 211, 238, 0.14);
    --grid-line: rgba(255, 255, 255, 0.05);
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 背景网格 + 光晕 */
.bg-scene {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 42% at 18% 0%, var(--accent-soft), transparent 62%),
    radial-gradient(46% 34% at 88% 8%, rgba(139, 92, 246, 0.07), transparent 60%),
    var(--bg);
}
.bg-scene::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(72% 52% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(72% 52% at 50% 0%, #000 30%, transparent 78%);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, video, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-contrast); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.accent { color: var(--accent); }
.muted { color: var(--text-2); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; position: relative; }
.section-tight { padding: 56px 0; }

/* 区块标题（禁止 split-header；上下堆叠） */
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 14px; }
.section-head p { color: var(--text-2); font-size: 17px; max-width: 60ch; }

/* ---------- 导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #2563eb));
  color: var(--accent-contrast); box-shadow: var(--glow);
}
.logo-mark svg { width: 18px; height: 18px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 12px; border-radius: var(--radius-full); font-size: 14.5px; font-weight: 500;
  color: var(--text-2); transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-full); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2); display: grid; place-items: center;
  transition: all var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }
.btn-nav {
  height: 38px; padding: 0 18px; border-radius: var(--radius-full); display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: all var(--dur) var(--ease);
}
.btn-nav:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* 移动端菜单 */
.menu-toggle { display: none; }
.mobile-menu {
  display: none; position: fixed; inset: 0; z-index: 90;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px);
  padding: calc(var(--nav-h) + 16px) 24px 24px;
  flex-direction: column; gap: 6px;
}
.mobile-menu a {
  padding: 14px 16px; border-radius: var(--radius-md); font-size: 17px; font-weight: 600;
  color: var(--text-2); border: 1px solid transparent; display: flex; align-items: center; justify-content: space-between;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--accent); background: var(--accent-soft); border-color: var(--border); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: var(--radius-full); font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 26px; border: 1px solid transparent; white-space: nowrap;
  transition: transform 0.18s var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 40%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); transform: translateY(-1px); }
.btn-lg { padding: 16px 34px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-danger { background: color-mix(in srgb, var(--err) 14%, transparent); color: var(--err); }
.btn-danger:hover { background: color-mix(in srgb, var(--err) 24%, transparent); }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--radius-full);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.badge-accent { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.badge svg { width: 14px; height: 14px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; margin: 20px 0 22px; }
.hero h1 .accent { position: relative; }
.hero-sub { font-size: 18px; color: var(--text-2); max-width: 46ch; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust { display: flex; align-items: center; gap: 10px; margin-top: 26px; font-size: 13.5px; color: var(--text-3); }
.hero-trust svg { width: 15px; height: 15px; color: var(--ok); }

/* Hero 右侧：真实工具 demo 窗口 */
.demo-window {
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden;
  transform: perspective(1200px) rotateY(-4deg) rotateX(1.5deg);
  transition: transform var(--dur) var(--ease);
}
.demo-window:hover { transform: perspective(1200px) rotateY(-1deg) rotateX(0.5deg); }
.demo-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.demo-dots { display: flex; gap: 6px; }
.demo-dots span { width: 10px; height: 10px; border-radius: 50%; }
.demo-dots span:nth-child(1) { background: #f87171; }
.demo-dots span:nth-child(2) { background: #fbbf24; }
.demo-dots span:nth-child(3) { background: #4ade80; }
.demo-title { margin-left: 10px; font-size: 12.5px; color: var(--text-3); font-family: var(--font-mono); }
.demo-body { padding: 20px; }
.demo-drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 34px 20px; text-align: center; color: var(--text-3); transition: all var(--dur) var(--ease);
  background: var(--surface-2);
}
.demo-drop.hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.demo-drop svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--text-3); }
.demo-drop p { font-size: 14px; }
.demo-drop span { font-size: 12px; }
.demo-compare { margin-top: 14px; display: none; }
.demo-compare.show { display: block; }
.compare-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: var(--radius-md); background: var(--surface-2); margin-bottom: 10px; }
.compare-row .lbl { font-size: 13px; color: var(--text-2); }
.compare-row .val { font-family: var(--font-mono); font-weight: 600; font-size: 14px; }
.compare-row .saved { color: var(--ok); }

/* 品牌信任条（hero 之下） */
.trust-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 20px 0; background: var(--bg-elev); }
.trust-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.trust-item svg { width: 17px; height: 17px; color: var(--accent); }

/* ---------- 工具 bento 网格 ---------- */
.tool-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto; gap: var(--gap); }
.tool-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px; border-radius: var(--radius-xl); border: 1px solid var(--border);
  background: var(--surface); overflow: hidden;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.tool-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 60% at var(--mx, 100%) 0%, var(--accent-soft), transparent 60%);
  opacity: 0; transition: opacity var(--dur) var(--ease);
}
.tool-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); box-shadow: var(--shadow-md); }
.tool-card:hover::after { opacity: 1; }
.tool-card.wide { grid-column: span 1; }
.tool-card.tall { grid-row: span 1; }
.tool-icon {
  width: 52px; height: 52px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
}
.tool-icon svg { width: 25px; height: 25px; }
.tool-card h3 { font-size: 20px; margin-bottom: 8px; }
.tool-card p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; margin-bottom: 18px; }
.tool-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); font-family: var(--font-mono); }
.tool-link { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; color: var(--text); transition: color var(--dur) var(--ease), gap var(--dur) var(--ease); }
.tool-card:hover .tool-link { color: var(--accent); gap: 12px; }
.tool-link svg { width: 16px; height: 16px; }

/* ---------- 步骤 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); counter-reset: step; }
.step {
  position: relative; padding: 26px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface); overflow: hidden;
}
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 14px; right: 18px; font-family: var(--font-mono); font-size: 44px; font-weight: 600;
  color: var(--surface-3); line-height: 1; user-select: none;
}
.step .step-icon { width: 42px; height: 42px; border-radius: var(--radius-md); background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.step .step-icon svg { width: 21px; height: 21px; }
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { color: var(--text-2); font-size: 14px; line-height: 1.55; }

/* ---------- 特性区块（核心/详细/附加） ---------- */
.feat-core { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.feat-core .fc { padding: 26px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--border); }
.fc-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.fc-icon svg { width: 22px; height: 22px; }
.feat-core h3 { font-size: 16.5px; margin-bottom: 7px; }
.feat-core p { color: var(--text-2); font-size: 14px; }

.feat-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 56px; align-items: start; }
.fd { display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.fd .fd-icon { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--accent); display: grid; place-items: center; }
.fd .fd-icon svg { width: 22px; height: 22px; }
.fd h3 { font-size: 16.5px; margin-bottom: 6px; }
.fd p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.fd .fd-tag { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--text-3); font-family: var(--font-mono); }

.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.extra { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.extra svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.extra h4 { font-size: 15px; margin-bottom: 4px; }
.extra p { color: var(--text-2); font-size: 13.5px; line-height: 1.5; }

/* ---------- 对比滑杆 ---------- */
.compare-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); user-select: none; background: var(--surface); touch-action: none; cursor: ew-resize; aspect-ratio: 16 / 9; max-height: 480px; }
.compare-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.compare-after { position: absolute; inset: 0; overflow: hidden; }
.compare-after img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.compare-handle {
  position: absolute; top: 0; bottom: 0; width: 3px; background: var(--accent); cursor: ew-resize; z-index: 5;
  touch-action: none;
}
.compare-handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: var(--accent-contrast);
  display: grid; place-items: center; box-shadow: var(--shadow-md);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23062033' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7l-4 5 4 5'/%3E%3Cpath d='M16 7l4 5-4 5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.compare-label { position: absolute; top: 14px; padding: 5px 11px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; background: rgba(8, 8, 12, 0.72); color: #fff; backdrop-filter: blur(6px); z-index: 4; }
.compare-label.before { left: 14px; }
.compare-label.after { right: 14px; }
.compare-caption { text-align: center; margin-top: 14px; font-size: 13.5px; color: var(--text-3); }
.compare-zoom {
  position: absolute; right: 45px; bottom: 12px; z-index: 8; width: 34px; height: 34px;
  border-radius: 999px; border: 1px solid var(--border); background: rgba(8,8,12,0.72); color: #fff;
  display: grid; place-items: center; cursor: pointer; transition: background .15s ease, transform .15s ease;
}
.compare-zoom:hover { background: var(--accent); color: var(--accent-contrast); transform: translateY(-1px); }

/* 全屏放大查看 */
.viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(8,8,12,0.94); display: flex; align-items: center; justify-content: center; }
.viewer[hidden] { display: none; }
.viewer-stage { position: absolute; inset: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.viewer-stage.dragging { cursor: grabbing; }
.viewer-stage img { display: block; max-width: none; max-height: none; will-change: transform; }
.viewer-close {
  position: absolute; top: 16px; right: 16px; z-index: 10; width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(18,18,26,0.9); color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: background .15s ease;
}
.viewer-close:hover { background: var(--accent); color: var(--accent-contrast); }
.viewer-bar {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  max-width: min(92vw, 640px); padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(18,18,26,0.9); color: var(--text-2);
}
.viewer-btn {
  width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
  color: var(--text-1); font-size: 16px; line-height: 1; display: grid; place-items: center; cursor: pointer; transition: background .15s ease, color .15s ease;
}
.viewer-btn:hover,
.viewer-btn-text:hover { background: var(--accent); color: var(--accent-contrast); }
.viewer-btn-text {
  width: auto; height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface-3); color: var(--text-1); font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.viewer-zoom { font-family: var(--font-mono); font-size: 13px; color: var(--text-1); min-width: 46px; text-align: center; }

/* 全屏图片层：before/after 叠放，contain 居中，整体可缩放平移 */
.viewer-canvas { position: absolute; inset: 0; will-change: transform; }
.viewer-canvas img { width: 100%; height: 100%; object-fit: contain; display: block; }
.viewer-canvas img#ic-v-after { position: absolute; inset: 0; }
/* 全屏独立拖拽层：与图片不在同一容器，覆盖整屏可拖动 */
.viewer-slider { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.viewer-slider .compare-handle {
  position: absolute; top: 0; bottom: 0; width: 3px; left: 50%; background: var(--accent);
  cursor: ew-resize; touch-action: none; pointer-events: auto;
}
/* 扩大 handle 命中区域，便于在全屏里抓取 */
.viewer-slider .compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -9px; right: -9px; }

/* ---------- 工具面板 ---------- */
.tool-shell {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: stretch;
}
.panel {
  border-radius: var(--radius-xl); border: 1px solid var(--border);
  background: var(--surface); box-shadow: var(--shadow-md); overflow: hidden;
}
.panel-head { padding: 18px 24px; border-bottom: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { font-size: 16px; }
.panel-head .ph-note { font-size: 12.5px; color: var(--text-3); }
.panel-body { padding: 24px; }

/* 上传区 */
.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 56px 24px; text-align: center; cursor: pointer;
  transition: all var(--dur) var(--ease); background: var(--surface-2); position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; transition: transform var(--dur) var(--ease); }
.dropzone:hover .dz-icon, .dropzone.drag .dz-icon { transform: translateY(-4px) scale(1.05); }
.dropzone .dz-icon svg { width: 26px; height: 26px; }
.dropzone h3 { font-size: 18px; margin-bottom: 6px; }
.dropzone p { color: var(--text-3); font-size: 13.5px; }
.dropzone .dz-formats { margin-top: 14px; display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dropzone .dz-formats span { font-family: var(--font-mono); font-size: 11.5px; padding: 3px 9px; border-radius: var(--radius-full); background: var(--surface); border: 1px solid var(--border); color: var(--text-3); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* 文件卡片 */
.file-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--border); }
.file-card .fc-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.file-card .fc-icon svg { width: 21px; height: 21px; }
.file-card .fc-info { flex: 1; min-width: 0; }
.file-card .fc-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card .fc-meta { font-size: 12.5px; color: var(--text-3); font-family: var(--font-mono); }
.file-card .fc-actions { display: flex; gap: 6px; }
.file-card .fc-actions button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); display: grid; place-items: center; transition: all var(--dur) var(--ease); }
.file-card .fc-actions button:hover { color: var(--err); border-color: var(--err); }

/* 控件 */
.field { margin-bottom: 20px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 9px; }
.field-hint { font-size: 12.5px; color: var(--text-3); margin-top: 7px; }
.field-row { display: flex; gap: 16px; flex-wrap: wrap; }
.field-row > .field { flex: 1; min-width: 140px; }

select, input[type="text"], input[type="url"], input[type="number"] {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-size: 14.5px; font-family: inherit; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select option { background: var(--surface); }

/* 滑块 */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: var(--radius-full); background: var(--surface-3); outline: none; }
.range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,0.3); cursor: pointer; transition: transform 0.15s var(--ease); }
.range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 3px solid var(--surface); cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-top: 6px; font-family: var(--font-mono); }
.range-val { font-family: var(--font-mono); font-size: 13px; color: var(--accent); font-weight: 600; }

/* 选项 chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 16px; border-radius: var(--radius-full); font-size: 13.5px; font-weight: 600;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2);
  transition: all var(--dur) var(--ease); user-select: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 32%, transparent); }
.chip input { display: none; }

/* 进度 */
.progress-track { height: 8px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-strong)); transition: width 0.25s var(--ease); position: relative; }
.progress-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent); transform: translateX(-100%); animation: shimmer 1.6s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.progress-info { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); margin-top: 8px; font-family: var(--font-mono); }
.progress-info b { color: var(--text); }

/* 状态 */
.status { display: flex; align-items: center; gap: 9px; padding: 13px 16px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; }
.status svg { width: 17px; height: 17px; flex-shrink: 0; }
.status-idle { color: var(--text-3); background: var(--surface-2); }
.status-running { color: var(--accent); background: var(--accent-soft); }
.status-running svg { animation: spin 1.1s linear infinite; }
.status-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent); }
.status-err { color: var(--err); background: color-mix(in srgb, var(--err) 13%, transparent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 结果区 */
.result-card { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.result-preview { background: repeating-conic-gradient(var(--surface-3) 0% 25%, var(--surface-2) 0% 50%) 0 0 / 22px 22px; display: grid; place-items: center; min-height: 220px; aspect-ratio: 16 / 9; max-height: 420px; position: relative; }
.result-preview img, .result-preview video { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.result-meta { padding: 16px 18px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-meta .rm-size { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.result-meta .rm-saved { color: var(--ok); }
.result-meta .rm-actions { display: flex; gap: 8px; }

/* 录制预览 */
.recorder-stage { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: #000; aspect-ratio: 16 / 9; position: relative; display: grid; place-items: center; }
.recorder-stage video { width: 100%; height: 100%; object-fit: contain; }
.recorder-stage .stage-empty { color: #6b6b76; text-align: center; font-size: 14px; }
.recorder-stage .stage-empty svg { width: 40px; height: 40px; margin: 0 auto 10px; }
.rec-timer { position: absolute; top: 14px; right: 14px; display: none; align-items: center; gap: 8px; padding: 6px 13px; border-radius: var(--radius-full); background: rgba(8, 8, 12, 0.78); color: #fff; font-family: var(--font-mono); font-size: 13.5px; backdrop-filter: blur(6px); z-index: 3; }
.rec-timer.on { display: inline-flex; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #f87171; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
.rec-controls { display: flex; justify-content: center; gap: 12px; margin-top: 20px; }
.rec-btn { width: 56px; height: 56px; border-radius: 50%; border: none; display: grid; place-items: center; transition: transform 0.18s var(--ease), opacity var(--dur) var(--ease); }
.rec-btn:active { transform: scale(0.93); }
.rec-btn svg { width: 22px; height: 22px; }
.rec-btn.rec { background: #ef4444; color: #fff; box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4); }
.rec-btn.pause { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
.rec-btn.stop { background: var(--surface-2); color: var(--err); border: 1px solid var(--border-strong); }
.rec-btn:disabled { opacity: 0.35; pointer-events: none; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 22px; background: none; border: none; text-align: left; font-size: 15.5px; font-weight: 600; color: var(--text); font-family: inherit; }
.faq-q svg { width: 18px; height: 18px; color: var(--text-3); transition: transform var(--dur) var(--ease); flex-shrink: 0; }
.faq-item.open .faq-q svg { transform: rotate(45deg); color: var(--accent); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--dur) var(--ease); }
.faq-a-inner { padding: 0 22px 20px; color: var(--text-2); font-size: 14.5px; line-height: 1.65; }

/* ---------- 相关工具 ---------- */
.rel-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.rel-tool { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); transition: all var(--dur) var(--ease); }
.rel-tool:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rel-tool .rt-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.rel-tool .rt-icon svg { width: 20px; height: 20px; }
.rel-tool h4 { font-size: 15px; margin-bottom: 2px; }
.rel-tool p { font-size: 12.5px; color: var(--text-3); }

/* ---------- CTA 区块 ---------- */
.cta-band { border-radius: var(--radius-xl); border: 1px solid var(--border); background: linear-gradient(140deg, var(--surface), var(--surface-2)); padding: 56px; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(52% 70% at 50% 0%, var(--accent-soft), transparent 66%); }
.cta-band h2 { font-size: clamp(26px, 3.6vw, 40px); margin-bottom: 12px; position: relative; }
.cta-band p { color: var(--text-2); margin-bottom: 28px; font-size: 16px; position: relative; }
.cta-band .btn { position: relative; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-elev); padding: 60px 0 34px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 16px; }
.footer-brand p { color: var(--text-3); font-size: 13.5px; margin-top: 12px; max-width: 30ch; line-height: 1.6; }
.footer-col a { display: block; padding: 5px 0; color: var(--text-2); font-size: 14px; transition: color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.footer-col a:hover { color: var(--accent); transform: translateX(3px); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.footer-bottom .legal { display: flex; gap: 20px; }
.footer-bottom .legal a:hover { color: var(--accent); }
.footer-bottom .updated { color: var(--text-3); }

/* ---------- 工具页头部 ---------- */
.tool-hero { padding: 56px 0 44px; }
.tool-hero h1 { font-size: clamp(30px, 4.4vw, 48px); margin: 16px 0 14px; letter-spacing: -0.025em; }
.tool-hero p { color: var(--text-2); font-size: 16.5px; max-width: 56ch; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs svg { width: 13px; height: 13px; }

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .demo-window { transform: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-grid, .tool-shell { grid-template-columns: 1fr; gap: 40px; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .feat-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .menu-toggle { display: grid; }
  .hero { padding: 48px 0 64px; }
  .tool-grid { grid-template-columns: 1fr; }
  .steps, .feat-core, .extras, .rel-tools { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .demo-window { transform: none; }
  .cta-band { padding: 40px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .compare-wrap img { min-height: 0; }
  .recorder-stage { aspect-ratio: 4 / 3; }
}
@media (max-width: 480px) {
  .btn-nav { display: none; }
  .panel-body { padding: 18px; }
  .dropzone { padding: 40px 16px; }
}

/* 无障碍：降低透明度时给毛玻璃兜底 */
@media (prefers-reduced-transparency: reduce) {
  .nav, .mobile-menu, .compare-label { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg-elev); }
}
