/* =========================================================================
   电商图片提取下载器 · 官网样式
   色板与间距统一由自定义属性管理，深色模式通过 prefers-color-scheme 覆盖。
   ========================================================================= */

:root {
  /* 品牌色：与扩展图标、插件内按钮保持一致的橙红渐变 */
  --brand: #ff5000;
  --brand-2: #ff3b30;
  --grad: linear-gradient(135deg, #ff6a3d, #ff3b30);
  --brand-soft: #fff2ec;
  --brand-line: rgba(255, 80, 0, .22);

  /* 中性色 */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #1f2329;
  --text-sub: #6b7280;
  --border: #e8eaed;

  /* 阴影与圆角 */
  --shadow-sm: 0 1px 2px rgba(16, 20, 26, .06);
  --shadow-md: 0 8px 24px rgba(16, 20, 26, .08);
  --shadow-lg: 0 24px 60px rgba(16, 20, 26, .16);
  --radius: 12px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  /* 布局 */
  --container: 1120px;
  --gutter: 20px;
  --header-h: 64px;
  --header-bg: rgba(255, 255, 255, .82);
  --section-y: 96px;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* 深色底上若无脑沿用 #ff5000，小字号文字的对比度不足，这里提亮一档 */
    --brand: #ff7a45;
    --brand-soft: #35211a;
    --brand-line: rgba(255, 140, 90, .3);

    --bg: #0f1115;
    --surface: #161a20;
    --surface-2: #12151a;
    --text: #e9edf2;
    --text-sub: #9aa4b2;
    --border: #262c35;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .62);
    --header-bg: rgba(15, 17, 21, .82);
  }
}

/* ------------------------------------------------------------------ 基础 */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { letter-spacing: -.01em; line-height: 1.25; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  white-space: nowrap;
}

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

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

.container--narrow { max-width: 780px; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* 仅在 JS 可用时才启用入场动画的初始隐藏态，保证禁用 JS 时内容照常可读 */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.22, .61, .36, 1), transform .6s cubic-bezier(.22, .61, .36, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ 按钮 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 70, 40, .26);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(255, 70, 40, .34); }

.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }

.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn-icon { width: 18px; height: 18px; flex: 0 0 auto; }

/* ------------------------------------------------------------------ 顶栏 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand-icon { width: 32px; height: 32px; border-radius: 8px; }
.brand-name { font-size: 15.5px; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--text-sub);
  font-size: 14.5px;
  transition: color .15s ease, background-color .15s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ------------------------------------------------------------------ 首屏 */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}

.hero::after {
  content: "";
  position: absolute;
  top: -220px;
  right: -160px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 61, .18), rgba(255, 106, 61, 0) 68%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 4px 12px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 6.4vw, 56px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.accent-text { color: var(--brand); }

.lead {
  margin: 0;
  max-width: 36em;
  color: var(--text-sub);
  font-size: clamp(15px, 1.7vw, 17px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.stats li { display: flex; flex-direction: column; gap: 2px; }
.stats strong { font-size: 26px; font-weight: 700; color: var(--brand); line-height: 1.2; }
.stats span { font-size: 13px; color: var(--text-sub); }

.hero-shot { position: relative; }

.hero-shot img {
  position: relative;
  z-index: 1;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

/* ------------------------------------------------------------------ 区块 */

.section { padding: var(--section-y) 0; }
.section--alt { background: var(--surface-2); }

.section-head { max-width: 720px; margin: 0 0 48px; }
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 700;
}
.section-head p { margin: 0; color: var(--text-sub); font-size: 16px; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ---------------------------------------------------------- 痛点 / 方案 */

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.compare-card {
  padding: 30px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.compare-card h3 { margin: 0 0 16px; font-size: 19px; }

.compare-card--gain {
  background: linear-gradient(160deg, rgba(255, 106, 61, .09), rgba(255, 59, 48, .03));
  border-color: var(--brand-line);
}

.compare-card--pain h3 { color: var(--text-sub); }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 28px; margin: 12px 0; font-size: 15px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: .62em;
  width: 4px;
  height: 8px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: rotate(40deg);
}

/* 痛点一侧用中性的短横线标记，与方案一侧的勾选形成对照 */
.check-list--muted li::before { background: transparent; border-color: var(--border); }
.check-list--muted li::after {
  top: .85em;
  left: 3px;
  width: 10px;
  height: 0;
  border-right: 0;
  border-bottom: 2px solid var(--text-sub);
  transform: none;
}

/* ------------------------------------------------------------------ 功能 */

.feature-card {
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-line);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
}
.feature-icon svg { width: 22px; height: 22px; }

.feature-card h3 { margin: 0 0 10px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--text-sub); font-size: 14.5px; line-height: 1.75; }

.showcase { margin: 48px 0 0; }
.showcase img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}
.showcase figcaption {
  margin-top: 16px;
  text-align: center;
  color: var(--text-sub);
  font-size: 14px;
}

/* ------------------------------------------------------------------ 平台 */

.platform-card {
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.platform-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.platform-head h3 { margin: 0; font-size: 17px; }

.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  flex: 0 0 auto;
}
.platform-badge--taobao { background: linear-gradient(135deg, #ff8a4c, #ff5000); }
.platform-badge--jd { background: linear-gradient(135deg, #f0524a, #d9261c); }
.platform-badge--pdd { background: linear-gradient(135deg, #e8554d, #c2271f); }

.platform-list { margin: 0; padding-left: 18px; color: var(--text-sub); font-size: 14.5px; }
.platform-list li { margin: 8px 0; }

/* ------------------------------------------------------------------ 安装 */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  flex-direction: column;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.step h3 { margin: 0 0 8px; font-size: 16px; }
.step p { margin: 0; color: var(--text-sub); font-size: 14.5px; }

.step-tip {
  margin-top: 10px !important;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 13px !important;
  line-height: 1.7;
}

.install-help {
  margin-top: 20px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.install-help h3 { margin: 0 0 12px; font-size: 15px; }
.install-help ul { margin: 0; padding-left: 20px; color: var(--text-sub); font-size: 14px; line-height: 1.75; }
.install-help li { margin: 8px 0; }
.install-help b { color: var(--text); }

.code-row { margin: 14px 0 0 !important; }
.code {
  display: inline-block;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}
.copyable { cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.copyable:hover { border-color: var(--brand); color: var(--brand); }
.copyable.is-copied { border-color: var(--brand); color: var(--brand); }

.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 28px 0 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-sub);
  font-size: 14px;
}
.note svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; color: var(--brand); }

/* ------------------------------------------------------------------ 流程 */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-item {
  height: 100%;
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.flow-num {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

.flow-item h3 { margin: 0 0 8px; font-size: 16px; }
.flow-item p { margin: 0; color: var(--text-sub); font-size: 14.5px; }

.flow-arrow { display: flex; align-items: center; justify-content: center; color: var(--brand); opacity: .45; }
.flow-arrow svg { width: 22px; height: 22px; }

.step-shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 40px 0 0;
}
.step-shot img {
  width: 100%;
  max-width: 300px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.step-shot figcaption {
  margin-top: 14px;
  max-width: 480px;
  text-align: center;
  color: var(--text-sub);
  font-size: 14px;
}

/* ------------------------------------------------------------------ FAQ */

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid var(--text-sub);
  border-bottom: 2px solid var(--text-sub);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}

.faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item[open] summary { color: var(--brand); }

.faq-body { padding: 0 20px 20px; color: var(--text-sub); font-size: 15px; }
.faq-body p { margin: 0; }

/* ------------------------------------------------------------------ 底部 */

.cta { padding: 0 0 var(--section-y); }

.cta-inner {
  padding: 56px 32px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 106, 61, .1), rgba(255, 59, 48, .04));
  text-align: center;
}

.cta-inner h2 { margin: 0 0 12px; font-size: clamp(22px, 3vw, 30px); font-weight: 700; }
.cta-inner p { margin: 0 0 28px; color: var(--text-sub); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--surface-2);
  color: var(--text-sub);
  font-size: 14px;
}

.footer-inner { display: flex; flex-direction: column; gap: 16px; align-items: center; text-align: center; }

.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }

.tag {
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 500;
}

.footer-tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0; padding: 0; list-style: none; }
.footer-tags li {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
}

.footer-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sub);
  font-size: 13.5px;
}
.footer-github:hover { color: var(--brand); text-decoration: none; }
.footer-github svg { width: 16px; height: 16px; flex: 0 0 auto; }

.footer-note { max-width: 620px; margin: 0; font-size: 13px; line-height: 1.7; }
.footer-copy { margin: 0; font-size: 13px; }

/* ------------------------------------------------------------------ 响应式 */

/* 平板：功能卡片自动降到 2 列，安装步骤降为 2×2 */
@media (max-width: 1024px) {
  :root { --section-y: 76px; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); padding: 4px 0; }
}

/* 窄屏：导航收起为汉堡菜单，首屏与对照卡片改为单列 */
@media (max-width: 880px) {
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 60;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 12px var(--gutter) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav a { min-height: 46px; padding: 0 12px; font-size: 15.5px; }

  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .brand-name { font-size: 14.5px; }

  .compare { grid-template-columns: 1fr; }

  .hero { padding: 48px 0 64px; }
  .hero-shot img { box-shadow: var(--shadow-md); }
  .showcase { margin-top: 32px; }
}

/* 手机 */
@media (max-width: 640px) {
  :root { --section-y: 60px; --gutter: 18px; }

  .hero-actions .btn { flex: 1 1 auto; }
  /* 小屏用三列栅格，避免三项数据参差换行 */
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .stats strong { font-size: 22px; }
  .stats span { font-size: 12.5px; }

  .section-head { margin-bottom: 32px; }
  .compare-card, .feature-card, .platform-card, .step, .flow-item { padding: 22px 20px; }

  .steps { grid-template-columns: 1fr; }
  .cta-inner { padding: 40px 22px; }

  .faq-item summary { font-size: 15px; padding: 16px; }
  .faq-body { padding: 0 16px 18px; }

  .footer-inner { align-items: flex-start; text-align: left; }
  .footer-tags { justify-content: flex-start; }
}

/* 桌面：首屏左右分栏，截图做轻微透视 */
@media (min-width: 1025px) {
  .hero-inner { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 56px; }
  .hero-shot img {
    transform: perspective(1400px) rotateY(-5deg) rotateX(1.5deg);
    transition: transform .4s ease;
  }
  .hero-shot img:hover { transform: perspective(1400px) rotateY(0deg) rotateX(0deg); }
}

/* ------------------------------------------------------------------ 动效降级 */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .hero-shot img { transform: none !important; }
}

/* ------------------------------------------------------------------ 打印 */

@media print {
  .site-header, .cta, .nav-toggle { display: none; }
  body { background: #fff; color: #000; }
}
