/* ============================================================
   OpenSpeedy 中文官网 - 全站样式
   纯静态 · 多页面 · 移动端适配
   ============================================================ */

:root {
  --primary: #5b5bd6;
  --primary-dark: #4747b2;
  --primary-light: #eef0ff;
  --accent: #0ea5a4;
  --warn: #b45309;
  --danger: #dc2626;
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-card: #ffffff;
  --text: #1a1c2e;
  --text-2: #4b4f66;
  --text-3: #8286a0;
  --border: #e6e8f2;
  --shadow-sm: 0 1px 3px rgba(26, 28, 46, .06);
  --shadow-md: 0 6px 24px rgba(26, 28, 46, .09);
  --shadow-lg: 0 16px 48px rgba(46, 48, 90, .16);
  --radius: 14px;
  --radius-lg: 20px;
  --maxw: 1120px;
  --font: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

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

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 19px; color: var(--text);
}
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand:hover { color: var(--text); }
.brand .ver {
  font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--primary-light); padding: 2px 8px; border-radius: 99px;
}
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: 15px;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }
.nav-links a.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.nav-cta {
  margin-left: 10px !important;
  background: var(--primary) !important; color: #fff !important;
  padding: 9px 18px !important; border-radius: 10px !important; font-weight: 600 !important;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--primary-dark) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle svg { width: 26px; height: 26px; stroke: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 56px;
  background:
    radial-gradient(720px 380px at 15% -10%, rgba(91, 91, 214, .14), transparent 60%),
    radial-gradient(680px 360px at 90% 0%, rgba(14, 165, 164, .12), transparent 60%),
    var(--bg);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--primary-dark);
  background: #fff; border: 1px solid var(--border);
  padding: 6px 14px; border-radius: 99px; box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px rgba(14, 165, 164, .18);
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px); line-height: 1.25;
  font-weight: 900; letter-spacing: -.5px; margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary) 10%, #8b5cf6 55%, var(--accent) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub {
  font-size: 18px; color: var(--text-2); max-width: 34em; margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 12px;
  font-size: 16px; font-weight: 700; cursor: pointer; border: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--primary), #7c5cf0); color: #fff;
  box-shadow: 0 8px 24px rgba(91, 91, 214, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(91, 91, 214, .42); color: #fff; }
.btn-ghost {
  background: #fff; color: var(--text); border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); color: var(--primary); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: #fff; border: 1px solid var(--border);
  padding: 6px 13px; border-radius: 99px;
}
.chip b { color: var(--text); }

/* hero 截图 mockup */
.hero-shot { position: relative; }
.hero-shot .frame {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.hero-shot .frame-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--border);
}
.frame-bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.frame-bar i:nth-child(1) { background: #ff5f57; }
.frame-bar i:nth-child(2) { background: #febc2e; }
.frame-bar i:nth-child(3) { background: #28c840; }
.frame-bar span {
  flex: 1; text-align: center; font-size: 12px; color: var(--text-3);
  background: #fff; border-radius: 6px; padding: 2px 14px; max-width: 280px; margin: 0 auto;
}
.float-tag {
  position: absolute; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-md);
  font-weight: 800; font-size: 14px; padding: 9px 16px; color: var(--text);
}
.float-tag small { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }
.ft-1 { top: 18px; right: -14px; color: var(--primary); animation: bob 3.2s ease-in-out infinite; }
.ft-2 { bottom: 46px; left: -18px; color: var(--accent); animation: bob 3.2s ease-in-out 1.2s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- 通用区块 ---------- */
section.block { padding: 72px 0; }
section.block.soft { background: var(--bg-soft); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.sec-head .kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: var(--primary); text-transform: uppercase; margin-bottom: 10px;
}
.sec-head h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; letter-spacing: -.3px; margin-bottom: 12px; }
.sec-head p { color: var(--text-2); font-size: 16.5px; }

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

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 22px;
  background: var(--primary-light); margin-bottom: 16px;
}
.card h3 { font-size: 17.5px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-2); }

/* 数字统计条 */
.stats-band {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 26px 22px;
  margin-top: -34px; position: relative; z-index: 5;
}
.stat { text-align: center; }
.stat b { display: block; font-size: 26px; font-weight: 900; color: var(--primary); letter-spacing: -.5px; }
.stat span { font-size: 13px; color: var(--text-3); font-weight: 500; }

/* ---------- 代码块 ---------- */
.code-box {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #14152b; color: #d5d9ff; border-radius: 12px;
  padding: 15px 18px; font-family: Consolas, "Courier New", monospace;
  font-size: 14.5px; overflow-x: auto; border: 1px solid #2a2c52;
}
.code-box .prompt { color: #7ee2b8; user-select: none; }
.copy-btn {
  flex-shrink: 0; background: rgba(213, 217, 255, .1); color: #d5d9ff;
  border: 1px solid rgba(213, 217, 255, .25); border-radius: 8px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; font-family: var(--font);
}
.copy-btn:hover { background: rgba(213, 217, 255, .2); }
.copy-btn.copied { color: #7ee2b8; border-color: #7ee2b8; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-soft); font-weight: 700; color: var(--text); white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbff; }
td .yes { color: #16a34a; font-weight: 700; }
td .no { color: var(--danger); font-weight: 700; }
td .mid { color: var(--warn); font-weight: 600; }

/* ---------- 提示框 ---------- */
.notice {
  display: flex; gap: 13px; border-radius: var(--radius);
  padding: 17px 19px; font-size: 14.5px; margin: 20px 0;
  border: 1px solid;
}
.notice .n-icon { font-size: 19px; line-height: 1.4; }
.notice p { margin: 0; }
.notice-warn { background: #fff8ec; border-color: #f5d9a8; color: #7a4a08; }
.notice-danger { background: #fef2f2; border-color: #f5b8b8; color: #8a1c1c; }
.notice-info { background: var(--primary-light); border-color: #ccd2ff; color: #33377e; }
.notice-success { background: #effaf1; border-color: #b8e6c3; color: #14532d; }

/* ---------- FAQ 手风琴 ---------- */
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; font-weight: 400; color: var(--text-3);
  transition: transform .2s ease; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); color: var(--primary); }
.faq-item[open] summary { color: var(--primary); }
.faq-body { padding: 0 22px 20px; color: var(--text-2); font-size: 15px; }
.faq-body ul, .faq-body ol { margin: 8px 0 8px 22px; }
.faq-body li { margin-bottom: 6px; }
.faq-body code {
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 6px; font-size: 13px; font-family: Consolas, monospace;
}
.faq-body h4 { margin: 14px 0 6px; color: var(--text); font-size: 15px; }

/* ---------- 步骤（教程页） ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step {
  display: grid; grid-template-columns: 56px 1fr; gap: 20px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.step-num {
  counter-increment: step;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(130deg, var(--primary), #7c5cf0); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; box-shadow: 0 6px 16px rgba(91, 91, 214, .3);
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 17px; margin-bottom: 7px; }
.step p { color: var(--text-2); font-size: 15px; }
.step .shot {
  margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ---------- 下载页卡片 ---------- */
.dl-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; position: relative; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px;
}
.dl-card.feature { border-color: var(--primary); box-shadow: var(--shadow-md); }
.dl-card .tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 99px; white-space: nowrap;
}
.dl-card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.dl-card .dl-icon { width: 40px; height: 40px; }
.dl-card p, .dl-card li { font-size: 14.5px; color: var(--text-2); }
.dl-card ol, .dl-card ul { margin-left: 20px; }
.dl-card .btn { justify-content: center; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #14152b; color: #aeb2d4; margin-top: 40px;
  padding: 52px 0 30px; font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; margin-bottom: 36px; }
.footer-grid h4 { color: #fff; font-size: 15px; margin-bottom: 14px; font-weight: 700; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { color: #aeb2d4; }
.footer-grid a:hover { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 12px; }
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-desc { max-width: 34em; line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 13px; color: #7d81a6;
}
.footer-disclaimer {
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px; padding: 14px 18px; font-size: 12.5px; line-height: 1.8;
  margin-bottom: 26px; color: #9fa3c4;
}

/* ---------- 面包屑 ---------- */
.crumbs { font-size: 13.5px; color: var(--text-3); padding: 18px 0 0; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--primary); }

/* ---------- 页头横幅（内页） ---------- */
.page-hero {
  padding: 46px 0 42px;
  background:
    radial-gradient(600px 260px at 12% 0%, rgba(91, 91, 214, .12), transparent 60%),
    radial-gradient(520px 240px at 92% 10%, rgba(14, 165, 164, .1), transparent 60%),
    var(--bg);
}
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; letter-spacing: -.4px; margin: 8px 0 12px; }
.page-hero .lead { color: var(--text-2); font-size: 17px; max-width: 46em; }

/* ---------- 场景卡片 ---------- */
.scene {
  border-radius: var(--radius); padding: 26px; color: #fff;
  background: linear-gradient(135deg, #5b5bd6, #7c5cf0);
  box-shadow: var(--shadow-md);
}
.scene.alt { background: linear-gradient(135deg, #0ea5a4, #0d8f8e); }
.scene.warm { background: linear-gradient(135deg, #f0735c, #e8590c); }
.scene.deep { background: linear-gradient(135deg, #3b3ba8, #23234f); }
.scene h3 { font-size: 17px; margin-bottom: 8px; }
.scene p { font-size: 14px; opacity: .92; }

/* ---------- 返回顶部 ---------- */
.back-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary); color: #fff; font-size: 19px;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); }

/* ---------- 滚动浮现 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 48px 0 60px; }
  .stats-band { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; padding: 12px 16px 18px;
    box-shadow: var(--shadow-md); gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-cta { margin: 8px 14px 0 0 !important; text-align: center; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .float-tag { display: none; }
  .step { grid-template-columns: 40px 1fr; }
  .step-num { width: 38px; height: 38px; font-size: 16px; }
  section.block { padding: 52px 0; }
}

/* ===== 二维码弹窗 ===== */
.qr-modal { position: fixed; inset: 0; background: rgba(23, 18, 56, .58); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 20px; }
.qr-modal[hidden] { display: none; }
.qr-box { position: relative; background: #fff; border-radius: 18px; padding: 30px 30px 26px; text-align: center; max-width: 330px; width: 100%; box-shadow: 0 28px 70px rgba(25, 15, 80, .3); animation: qr-pop .22s ease-out; }
@keyframes qr-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.qr-box h3 { color: #1c1839; font-size: 20px; margin-bottom: 14px; }
.qr-img { width: 216px; height: 216px; margin: 0 auto; border: 1px solid #eceef8; border-radius: 10px; padding: 8px; background: #fff; }
.qr-hint { color: #5c5f7d; font-size: 14px; margin: 12px 0 16px; }
.qr-close { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 26px; line-height: 1; color: #9a9db8; cursor: pointer; padding: 4px; }
.qr-close:hover { color: #1c1839; }

/* ===== 版本信息条 ===== */
.ver-meta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }
.ver-meta span { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: var(--text-2); border-radius: 999px; padding: 7px 16px; font-size: 13.5px; }
