/* =========================================================
   BoBo 智能采集平台 · 全站样式
   - 深色为默认主题（:root），浅色主题通过 [data-theme="light"] 覆盖
   - 主色渐变：青 #22d3ee → 蓝 #3b82f6
   - 零外部依赖：仅系统字体栈，无 CDN / 网络字体
   ========================================================= */

/* ---------------- 主题变量 ---------------- */
:root {
  /* 深色主题（默认） */
  --bg: #0b0f14;
  --bg-elev: #0e141c;
  --card: #131a22;
  --card-border: rgba(148, 163, 184, 0.14);
  --border: rgba(148, 163, 184, 0.16);
  --text: #e6edf3;
  --text-2: #9aa8b5;
  --text-3: #6b7a89;
  --accent-1: #22d3ee;
  --accent-2: #3b82f6;
  --accent-grad: linear-gradient(135deg, #22d3ee 0%, #3b82f6 100%);
  --nav-bg: rgba(11, 15, 20, 0.72);
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  --glow: rgba(59, 130, 246, 0.22);
  --btn-text: #05121f;
  --radius: 14px;
  --maxw: 1220px;
  --header-h: 64px;
}

[data-theme="light"] {
  /* 浅色主题 */
  --bg: #f6f8fb;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --card-border: rgba(15, 23, 42, 0.08);
  --border: rgba(15, 23, 42, 0.10);
  --text: #0f172a;
  --text-2: #4b5b6e;
  --text-3: #7a8a9b;
  --nav-bg: rgba(246, 248, 251, 0.78);
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.10);
  --glow: rgba(34, 211, 238, 0.28);
}

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

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

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

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  background: rgba(34, 211, 238, 0.30);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: 6px;
}

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

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

.section {
  padding: 88px 0;
}

/* 轻微换底色的区块（演示 / 下载 / 关于作者） */
.section--soft {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.section-head > p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 15px;
}

.section-note {
  color: var(--text-3) !important;
  font-style: italic;
  font-size: 14px !important;
}

/* ---------------- 公告条 ---------------- */
.announce {
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.14));
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  padding: 8px 16px;
}

.announce a {
  color: var(--text-2);
  transition: color 0.2s ease;
}

.announce a:hover {
  color: var(--accent-1);
}

.announce-arrow {
  display: inline-block;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.announce a:hover .announce-arrow {
  transform: translateX(3px);
}

/* ---------------- 导航栏 ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.22);
}

.nav-inner {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16.5px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-links a {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  color: var(--text-2);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent-1);
  background: rgba(34, 211, 238, 0.10);
  transform: rotate(15deg);
}

/* 汉堡按钮（默认隐藏，移动端显示） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

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

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

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

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

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background-color 0.2s ease, opacity 0.2s ease;
}

.btn-primary {
  background: var(--accent-grad);
  color: var(--btn-text);
  box-shadow: 0 8px 22px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px var(--glow);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

.btn-block {
  display: flex;
  width: 100%;
  padding: 15px 28px;
  font-size: 16px;
}

/* 加载中状态：禁用点击 */
.btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
  cursor: wait;
}

.text-link {
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.text-link:hover {
  color: var(--accent-1);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 96px;
}

/* 背景光晕（深浅色均柔和） */
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -220px;
  left: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.14), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.9fr 1fr;
  gap: 52px;
  align-items: center;
}

.hero-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0.01em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--accent-2);
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 14px;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--text-3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.hero-desc {
  margin-top: 22px;
  max-width: 560px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.85;
}

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

.hero-visual-link {
  position: relative;
  display: block;
  cursor: zoom-in;
}

.hero-visual img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-visual-link:hover img {
  transform: translateY(-3px);
}

/* 悬浮提示：点击可在新标签查看原图 */
.hero-visual-link::after {
  content: "点击查看大图";
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: #fff;
  background: rgba(3, 8, 14, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.hero-visual-link:hover::after,
.hero-visual-link:focus-visible::after {
  opacity: 1;
  transform: translateY(-3px);
}

/* ---------------- 核心能力卡片 ---------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* 卡片顶部渐变小条 */
.feature-card::before {
  content: "";
  display: block;
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--accent-grad);
  margin-bottom: 16px;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 14px 32px var(--glow);
}

.feature-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.feature-card p {
  font-size: 13.8px;
  line-height: 1.75;
  color: var(--text-2);
}

/* ---------------- 演示视频 ---------------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder {
  text-align: center;
  color: #8b98a5;
  font-size: 15px;
  padding: 20px;
}

.play-btn {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #05121f;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.35);
  transition: transform 0.25s ease;
}

.video-frame:hover .play-btn {
  transform: scale(1.06);
}

.play-btn svg {
  margin-left: 4px;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------- 技术架构 ---------------- */
.arch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.arch-item {
  flex: 1 1 180px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.arch-item:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 12px 28px var(--glow);
}

.arch-label {
  font-size: 12.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.arch-item h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--accent-2);
  -webkit-text-fill-color: transparent;
}

.arch-desc {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.65;
}

.arch-note {
  margin-top: 26px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-3);
}

/* ---------------- 下载区 ---------------- */
.download-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  align-items: stretch;
}

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

.card-kicker {
  font-size: 13.5px;
  color: var(--text-3);
  letter-spacing: 0.06em;
}

.version-number {
  margin-top: 6px;
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--accent-2);
  -webkit-text-fill-color: transparent;
}

.file-line {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  word-break: break-all;
}

.file-sep {
  margin: 0 6px;
  color: var(--text-3);
}

/* 版本卡：纵向弹性布局，底部链接贴住卡片底边，与右侧「系统要求」卡底边对齐 */
.version-card {
  display: flex;
  flex-direction: column;
}

.version-card .btn-block {
  margin-top: 22px;
}

.version-card .text-link {
  display: block;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.req-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.req-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.2px;
  line-height: 1.7;
  color: var(--text-2);
}

.req-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent-1);
  font-weight: 700;
}

/* ---------------- FAQ ---------------- */
.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.faq-item[open] {
  border-color: rgba(34, 211, 238, 0.40);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 17px 22px;
  font-size: 15.2px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::marker {
  content: "";
}

.faq-item summary:hover {
  color: var(--accent-1);
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: var(--accent-1);
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-body {
  padding: 0 22px 19px;
  font-size: 14.3px;
  line-height: 1.85;
  color: var(--text-2);
}

.faq-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 7px;
  word-break: break-all;
}

/* ---------------- 关于作者 ---------------- */
.about-card {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 30px 28px;
}

.avatar {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

.about-body h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}

.about-bio {
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--text-2);
}

.about-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chip-link:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-2px);
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.footer-copy {
  font-size: 13.5px;
  color: var(--text-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  color: var(--text-3);
}

.footer-links a {
  color: var(--text-2);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-1);
}

/* ---------------- 滚动淡入 ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid {
    gap: 36px;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: 2;
  }

  .hero {
    padding: 56px 0 72px;
  }

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

/* 移动端断点：汉堡菜单 + 单列布局 */
@media (max-width: 768px) {
  .section {
    padding: 64px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 16px 16px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
  }

  .brand-name {
    font-size: 15px;
  }

  .about-card {
    flex-direction: column;
    gap: 18px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px 20px;
  }

  .hero-actions .btn {
    flex: 1 1 auto;
  }

  .announce {
    font-size: 12.5px;
  }
}
