/* ==========================================================================
   Ferret-AI 官网 — 现代深色主题
   ========================================================================== */

:root {
  /* 色板（取自应用主题） */
  --bg: #0b0e17;
  --bg-soft: #10141f;
  --bg-card: #151a29;
  --bg-card-2: #1a2033;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.24);

  --accent: #60a5fa;      /* 应用强调色（网站唯一主色） */
  --grad: linear-gradient(120deg, #60a5fa 0%, #818cf8 45%, #a78bfa 100%);
  --danger: #f87171;
  --text: #e6ebf5;
  --text-2: #a9b4c7;
  --text-3: #6f7c93;
  --good: #34d399;
  --warn: #fbbf24;

  --radius: 16px;
  --radius-sm: 10px;
  --max-w: 1160px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --nav-h: 68px;

  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(96, 165, 250, 0.32); color: #fff; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* 线性图标（SVG sprite，统一描边） */
.icon {
  width: 20px; height: 20px;
  flex: none;
  display: inline-block;
  vertical-align: -0.2em;
}
.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 17px; height: 17px; }

/* 强调文字 */
.grad { color: var(--accent); }

/* ==========================================================================
   导航栏
   ========================================================================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(11, 14, 23, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease;
}

.nav.scrolled { background: rgba(11, 14, 23, 0.9); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: 0.3px; }
.brand-tag {
  font-size: 12px;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
  margin-left: 2px;
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  font-size: 14.5px;
  color: var(--text-2);
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: #fff; background: rgba(148, 163, 184, 0.1); }
.nav-links .nav-download {
  color: #fff;
  background: var(--grad);
  font-weight: 600;
  margin-left: 8px;
}
.nav-links .nav-download:hover { filter: brightness(1.1); background: var(--grad); }

/* 中 / EN 语言切换 */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.lang-switch .lang-link {
  font-size: 13.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text-2);
}
.lang-switch .lang-link:hover { color: #fff; background: rgba(148, 163, 184, 0.1); }
.lang-switch .lang-link.active {
  color: var(--accent);
  background: rgba(96, 165, 250, 0.14);
}
.lang-switch .lang-sep { color: var(--text-3); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 70px;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 85% 10%, rgba(96, 165, 250, 0.14), transparent 60%),
    radial-gradient(50% 45% at 10% 25%, rgba(96, 165, 250, 0.12), transparent 60%),
    radial-gradient(40% 40% at 50% 100%, rgba(96, 165, 250, 0.07), transparent 60%);
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148,163,184,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,163,184,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(70% 70% at 50% 40%, #000 30%, transparent 100%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy { padding-top: 8px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--accent);
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-2);
  max-width: 540px;
  margin-bottom: 30px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #fff;
  background: var(--grad);
  box-shadow: 0 10px 30px rgba(96, 165, 250, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(96, 165, 250, 0.45); }

.btn-ghost {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
  border-color: var(--border-strong);
}
.btn-ghost:hover { transform: translateY(-2px); background: rgba(148, 163, 184, 0.16); }

.btn-block { width: 100%; }

.hero-stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 22px; font-weight: 800; color: var(--accent); }
.hero-stats span { font-size: 12.5px; color: var(--text-3); }

/* —— 应用截图 —— */
.hero-visual { position: relative; }

.visual-glow {
  position: absolute;
  inset: 8% 4%;
  background: var(--accent);
  filter: blur(70px);
  opacity: 0.16;
  border-radius: 40px;
  z-index: -1;
}

.app-shot {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #10131d;
}
.app-shot img { width: 100%; height: auto; display: block; }
.app-shot figcaption {
  position: absolute;
  left: 12px; bottom: 12px;
  font-size: 12px;
  color: var(--text-2);
  background: rgba(10, 13, 22, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
}

mark {
  background: rgba(251, 191, 36, 0.28);
  color: #fde68a;
  border-radius: 3px;
  padding: 0 2px;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12.5px;
  color: var(--text-3);
}

/* ==========================================================================
   通用区块
   ========================================================================== */
.section { padding: 96px 0; position: relative; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.24);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; letter-spacing: -0.3px; margin-bottom: 14px; }
.section-head p { color: var(--text-2); font-size: 16px; }

/* ==========================================================================
   功能特性
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card.feature {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card.feature:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}
.feature-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  font-size: 22px;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 12px;
  margin-bottom: 16px;
}
.feature-icon .icon { width: 24px; height: 24px; color: var(--accent); }
.card.feature h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card.feature p { font-size: 13.5px; color: var(--text-2); }

/* ==========================================================================
   核心优势
   ========================================================================== */
.advantages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 56px; }

.adv {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.adv:hover { transform: translateY(-5px); border-color: rgba(96, 165, 250, 0.4); }
.adv h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.adv h3 .icon { width: 20px; height: 20px; color: var(--accent); }
.adv p { font-size: 14px; color: var(--text-2); }

/* 对比表 */
.compare {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}
.compare table { width: 100%; border-collapse: collapse; min-width: 620px; }
.compare th, .compare td { text-align: left; padding: 15px 20px; font-size: 14px; }
.compare thead th { background: var(--bg-card-2); color: var(--text); font-weight: 700; border-bottom: 1px solid var(--border-strong); }
.compare tbody tr { border-bottom: 1px solid var(--border); }
.compare tbody tr:last-child { border-bottom: 0; }
.compare td { color: var(--text-2); }
.compare td:first-child { color: var(--text); font-weight: 600; }
.compare td.good { color: var(--good); }
.compare .brand-mini { color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.compare .icon { color: var(--good); }
.compare .ic-x { color: var(--danger); }
.compare tbody tr:hover { background: rgba(148, 163, 184, 0.04); }

/* ==========================================================================
   搜索语法
   ========================================================================== */
.syntax-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 24px; }

.syntax-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.syntax-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.syntax-card ul { display: flex; flex-direction: column; gap: 10px; }
.syntax-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.syntax-card code { font-family: var(--mono); font-size: 13px; color: #fde68a; white-space: nowrap; }
.syntax-card li span { font-size: 12.5px; color: var(--text-3); text-align: right; }

.syntax-demo {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.syntax-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.syntax-input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 14.5px;
  font-family: var(--mono);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.syntax-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16); }
.syntax-go {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0 22px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
}
.syntax-results { display: flex; flex-direction: column; gap: 8px; }
.syntax-results li {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.syntax-results b { font-size: 13px; color: var(--text); }
.syntax-results p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.syntax-hint { margin-top: auto; padding-top: 16px; font-size: 12.5px; color: var(--text-3); }

/* ==========================================================================
   使用说明
   ========================================================================== */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.step:hover { transform: translateY(-5px); border-color: rgba(96, 165, 250, 0.4); }
.step-num {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  margin-bottom: 16px;
}
.step h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 13.5px; color: var(--text-2); }

.tips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.tip {
  background: rgba(96, 165, 250, 0.05);
  border: 1px dashed rgba(96, 165, 250, 0.3);
  border-radius: var(--radius);
  padding: 20px;
}
.tip h4 { font-size: 14.5px; font-weight: 700; margin-bottom: 6px; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.tip p { font-size: 12.5px; color: var(--text-2); }

/* ==========================================================================
   常见问题
   ========================================================================== */
.faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 24px;
  transition: border-color 0.2s;
}
.faq details[open] { border-color: rgba(96, 165, 250, 0.4); }
.faq summary {
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 2px; top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { font-size: 14px; color: var(--text-2); padding-bottom: 18px; }
.faq code { font-family: var(--mono); font-size: 12.5px; color: #fde68a; background: rgba(251, 191, 36, 0.08); padding: 1px 6px; border-radius: 5px; }

/* ==========================================================================
   下载
   ========================================================================== */
.download {
  background:
    radial-gradient(55% 60% at 50% 0%, rgba(96, 165, 250, 0.1), transparent 65%),
    var(--bg-soft);
  border-top: 1px solid var(--border);
}
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.dl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.dl-card:hover { transform: translateY(-6px); border-color: rgba(96, 165, 250, 0.45); }
.dl-card:first-child { border-color: rgba(96, 165, 250, 0.4); box-shadow: 0 0 0 1px rgba(96,165,250,0.15), 0 18px 50px rgba(0,0,0,0.35); }
.dl-os { font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 10px; }
.dl-os .icon { width: 26px; height: 26px; color: var(--accent); }
.dl-ver { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.dl-card p { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }
.dl-size { font-size: 12px; color: var(--text-3); margin-top: 8px; }

.source-note {
  margin-top: 40px;
  text-align: center;
  color: var(--text-3);
  font-size: 13.5px;
}
.source-note code { font-family: var(--mono); color: var(--text-2); }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer { border-top: 1px solid var(--border); background: #080b12; padding: 48px 0 30px; }
.footer-inner { display: flex; flex-direction: column; gap: 26px; }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.footer-brand strong { font-size: 18px; }
.footer-brand p { width: 100%; font-size: 13px; color: var(--text-3); margin-top: 4px; }
.footer-links { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: var(--text-2); padding: 6px 10px; border-radius: 8px; }
.footer-links a:hover { color: #fff; background: rgba(148, 163, 184, 0.1); }
.footer-meta { border-top: 1px solid var(--border); padding-top: 22px; font-size: 12.5px; color: var(--text-3); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   滚动进入动画
   ========================================================================== */
/* 仅区块标题保留淡入，其余内容静态呈现 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  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; }
  .hero-scroll-hint { animation: none; }
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 640px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .advantages-grid, .steps, .tips, .dl-grid { grid-template-columns: repeat(2, 1fr); }
  .syntax-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  :root { --nav-h: 60px; }
  .section { padding: 70px 0; }

  .nav-toggle { display: flex; }
  .brand-tag { display: none; }

  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: rgba(11, 14, 23, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .nav-links .nav-download { margin-left: 0; text-align: center; }
  .lang-switch { border-left: 0; margin-left: 0; padding-left: 0; margin-top: 6px; }

  .hero { padding-top: calc(var(--nav-h) + 28px); min-height: auto; }
  .hero-title { font-size: 34px; }
  .hero-stats { gap: 22px; }

  .feature-grid, .advantages-grid, .steps, .tips, .dl-grid { grid-template-columns: 1fr; }

  .hero-visual { max-width: 640px; margin: 0 auto; }
  .app-shot figcaption { display: none; }

  .syntax-card li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .syntax-card li span { text-align: left; }

  .footer-meta { flex-direction: column; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
}
