/* ═══════════════════════════════════════════════════════════════
   PhotosMove 官网样式 — 单文件，无构建链
   主色取 logo 蓝（store/logo-bold.png 主色 #0040c0）
   ═══════════════════════════════════════════════════════════════ */

:root {
  --primary: #0040c0;
  --primary-dark: #003090;
  --primary-tint: #eaf0fd;
  --text: #182238;
  --text-2: #4d5a72;
  --border: #e3e8f0;
  --bg-alt: #f5f8fd;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq-list summary::after { transition: none; }
}

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

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

section[id] { scroll-margin-top: 84px; }

/* ── 顶部导航 ─────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.nav-links a { color: var(--text-2); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

.nav-links .lang {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
  color: var(--text);
}
.nav-links .lang:hover { border-color: var(--primary); color: var(--primary); }

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(180deg, var(--primary-tint) 0%, #ffffff 100%);
  padding: 72px 0 0;
  text-align: center;
}

.hero-inner h1 {
  margin: 0 auto;
  max-width: 920px;
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 780px;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--text-2);
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 10px;
  font-size: 1.02rem;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* Play badge（上架后恢复官方入口时启用；图 assets/google-play-badge.png 保留） */
.play-badge {
  display: block;
  height: 72px;
  width: auto;
  background: #fff;
  border-radius: 10px;
}

.trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 26px 0 0;
  color: var(--text-2);
  font-size: 0.95rem;
}

/* 演示视频占位（上传后由页面脚本自动显示） */
.video-wrap {
  margin: 36px auto 0;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(16, 42, 84, 0.14);
}
.video-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }

.hero-graphic {
  display: block;
  margin: 44px auto 0;
  width: min(880px, 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 12px 40px rgba(16, 42, 84, 0.12);
}

/* ── 通用区块 ─────────────────────────────────────────────── */

.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  letter-spacing: -0.02em;
  text-align: center;
}

.lead {
  max-width: 820px;
  margin: 16px auto 32px;
  color: var(--text-2);
  font-size: 1.04rem;
  text-align: center;
}

/* 安装指引说明条 */
.install-note {
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  color: var(--text-2);
  font-size: 0.92rem;
}

/* ── 卡片 ─────────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

/* 痛点区 4 卡：固定 2×2（auto-fill 会排成 3+1 破版），移动端回退单列 */
.card-grid.pain-grid {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card h3 { margin: 0 0 10px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-2); }

/* ── 工作原理步骤 ─────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
}

.step {
  display: grid;
  grid-template-columns: minmax(260px, 400px) 1fr;
  gap: 48px;
  align-items: center;
  padding: 44px 0;
  border-top: 1px solid var(--border);
}
.step:last-child { border-bottom: 1px solid var(--border); }

.step h3 { margin: 0 0 10px; font-size: 1.25rem; }
.step p { margin: 0; color: var(--text-2); }

.shot {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(16, 42, 84, 0.1);
  background: #fff;
}

/* 手机截图卡片：与浏览器截图卡片同一视觉语言 */
.phone-mock {
  display: flex;
  justify-content: center;
  background: linear-gradient(180deg, #f0f4fd 0%, #ffffff 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 0;
  box-shadow: 0 8px 28px rgba(16, 42, 84, 0.08);
}

.shot.phone {
  display: block;
  height: 460px;
  width: auto;
}

.shot.browser { display: block; width: 100%; }

/* 16:9 营销横幅图（step1-4），宽度撑满媒体列 */
.shot.wide { display: block; width: 100%; height: auto; }

/* ── 对比表 ───────────────────────────────────────────────── */

.table-scroll {
  margin-top: 40px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.table-scroll:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.96rem;
}

.compare th,
.compare td {
  padding: 13px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.compare tr:last-child th,
.compare tr:last-child td { border-bottom: 0; }

.compare thead th {
  background: var(--bg-alt);
  font-weight: 700;
}

.compare tbody th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-alt);
}

/* 高亮 PhotosMove 列（第 2 列）；安装指引窄表不适用 */
.compare:not(.narrow) thead th:nth-child(2),
.compare:not(.narrow) tbody td:nth-child(2) {
  background: var(--primary-tint);
  font-weight: 700;
  color: var(--primary-dark);
}

/* 指南页宽表自适应（flow）：允许换行 + 收紧间距，消除横向滚动。
   首页 8 列大表与中文页 7 列表不用 flow，仍走 nowrap + table-scroll 设计 */
.compare.flow th,
.compare.flow td {
  white-space: normal;
  vertical-align: top;
  padding: 11px 12px;
}
table.compare.flow { font-size: 0.92rem; }
.compare.flow tbody th[scope="row"] { min-width: 118px; }

/* ═══ 移动端对比表优化方案 A：卡片堆叠式布局 ═══ */
@media (max-width: 768px) {
  .compare.mobile-stack,
  .compare.mobile-stack thead,
  .compare.mobile-stack tbody,
  .compare.mobile-stack th,
  .compare.mobile-stack td,
  .compare.mobile-stack tr {
    display: block;
  }

  /* 隐藏原始表头 */
  .compare.mobile-stack thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .compare.mobile-stack tr {
    margin-bottom: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
  }

  .compare.mobile-stack td {
    border: none;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding-left: 45%;
    text-align: left;
    white-space: normal;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .compare.mobile-stack td:last-child {
    border-bottom: none;
  }

  /* 使用 data-label 显示列名 */
  .compare.mobile-stack td::before {
    content: attr(data-label);
    position: absolute;
    top: 12px;
    left: 12px;
    width: 42%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text);
    text-align: left;
  }

  /* 保持 PhotosMove 列高亮 */
  .compare.mobile-stack td[data-label="PhotosMove"] {
    background: var(--primary-tint);
    font-weight: 600;
    color: var(--primary-dark);
  }
}

/* ═══ 移动端对比表优化方案 B：关键列优先显示 ═══ */
@media (max-width: 768px) {
  .compare.mobile-priority {
    white-space: normal;
    font-size: 0.9rem;
  }

  .compare.mobile-priority th,
  .compare.mobile-priority td {
    padding: 10px 8px;
  }

  /* 隐藏次要列：USB/MTP 和 Syncthing */
  .compare.mobile-priority th:nth-child(3),
  .compare.mobile-priority td:nth-child(3),
  .compare.mobile-priority th:nth-child(6),
  .compare.mobile-priority td:nth-child(6) {
    display: none;
  }
}

/* ═══ 移动端对比表优化方案 C：横向滚动提示 ═══ */
@media (max-width: 768px) {
  .table-scroll.hint-scroll::after {
    content: "→ 横向滑动查看全部对比 →";
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: linear-gradient(to right, rgba(255,255,255,0), var(--primary-tint));
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 1;
  }

  /* 检测到滚动时隐藏提示 */
  .table-scroll.hint-scroll.scrolled::after {
    display: none;
  }
}

/* 窄表（安装指引品牌表）：路径列左对齐 */
.compare.narrow tbody td { text-align: left; white-space: normal; }

/* ── FAQ ──────────────────────────────────────────────────── */

.faq-list { margin-top: 40px; }

.faq-list details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 17px 22px;
  margin-bottom: 12px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-2);
  transition: transform 0.15s;
  flex-shrink: 0;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list details p { margin: 12px 0 4px; color: var(--text-2); }

/* ── 下载区 ───────────────────────────────────────────────── */

.download-panel {
  background: linear-gradient(135deg, #0b1c47 0%, var(--primary) 100%);
  border-radius: 20px;
  padding: 56px 32px;
  text-align: center;
}

.download-panel h2 { color: #fff; }

.download-panel .btn-primary { background: #fff; color: var(--primary); }
.download-panel .btn-primary:hover { background: var(--primary-tint); }

.download-panel .btn-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.download-panel .btn-secondary:hover { border-color: #fff; }

.download-meta {
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.93rem;
}

.download-meta a { color: #fff; text-decoration: underline; }

.download-meta .sha {
  display: inline-block;
  max-width: 100%;
  vertical-align: bottom;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  padding: 1px 8px;
  word-break: break-all;
  user-select: all;
}

/* ── SEO 指南页 ───────────────────────────────────── */

.guide-hero {
  background: linear-gradient(180deg, var(--primary-tint) 0%, #ffffff 100%);
  padding: 64px 0 0;
  text-align: center;
}
.guide-hero h1 {
  margin: 0 auto;
  max-width: 920px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.guide-hero .lead {
  max-width: 780px;
  margin: 18px auto 0;
  color: var(--text-2);
  font-size: 1.05rem;
}
.answer-box {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 26px;
  margin: 44px 0 0;
  text-align: left;
}
.answer-box h2 { text-align: left; font-size: 1.35rem; margin: 0 0 12px; }
.guide-body { padding: 0 0 72px; }
.guide-body h2 { text-align: left; font-size: 1.5rem; margin: 56px 0 8px; }
.guide-body h3 { margin: 28px 0 8px; font-size: 1.15rem; }
.guide-body p, .guide-body li { color: var(--text-2); }
.guide-body ul, .guide-body ol { padding-left: 22px; }
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 24px;
}
.related-links a {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  font-weight: 600;
  color: var(--text);
}
.related-links a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.cta-tail {
  background: linear-gradient(135deg, #0b1c47 0%, var(--primary) 100%);
  border-radius: 20px;
  padding: 48px 28px;
  text-align: center;
  margin-top: 56px;
}
.cta-tail h2 { color: #fff; }
.cta-tail p { color: rgba(255, 255, 255, 0.85); }
.cta-tail .btn-secondary { background: transparent; border-color: rgba(255,255,255,0.4); color: #fff; }
.cta-tail .btn-secondary:hover { border-color: #fff; }

@media (max-width: 800px) {
  .guide-hero { padding-top: 44px; }
}

/* ── 安装指引步骤卡片 ─────────────────────────────── */

.install-steps {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.install-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.install-step-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-tint);
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.install-step-body strong { display: block; font-size: 1.02rem; }
.install-step-body span {
  display: block;
  margin-top: 4px;
  color: var(--text-2);
  font-size: 0.92rem;
  line-height: 1.55;
}

/* 安装指引品牌表：表头与对比表区分（品牌列加粗、表头品牌色左对齐） */
.compare.narrow thead th {
  background: var(--primary-tint);
  text-align: left;
}
.compare.narrow tbody th[scope="row"] { font-weight: 600; }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  background: #0f1a2e;
  color: #b9c4d6;
  padding: 34px 0;
}

.footer-inner { text-align: center; font-size: 0.94rem; }
.footer-inner p { margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
.footer-inner a { color: #e6ebf4; }
.footer-inner a:hover { color: #fff; }

/* ── 响应式 ───────────────────────────────────────────────── */

@media (max-width: 800px) {
  .nav { justify-content: center; }
  .nav-links { justify-content: center; }

  .step { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .shot.phone { height: 400px; }
  .shot-row { grid-template-columns: 1fr; }

  .card-grid.pain-grid { grid-template-columns: 1fr; }

  .section { padding: 52px 0; }
  .download-panel { padding: 44px 20px; }
}

/* ── 顶部品牌标语条：向 Google/用户一句话说明产品定位 ── */
.header-tagline {
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: .85rem;
  letter-spacing: .02em;
  padding: 6px 16px;
}
.header-tagline strong { color: #fff; }
