/* Cdnfly 官网前台样式（不影响 /console 后台） */

:root {
  --bg: #F6F9FB;
  --surface: #FFFFFF;
  --surface-2: #EDF4FA;
  --ink: #15222C;
  --ink-2: #51636F;
  --ink-3: #7A8B96;
  --line: #E1E9EF;
  --accent: #0A6ED1;
  --accent-ink: #085BAD;
  --accent-soft: #E3F0FC;
  --good: #178A4C;
  --good-soft: #E3F4EA;
  --bad: #D64545;
  --warn-bg: #FFF7E8;
  --warn-line: #F2DFB6;
  --warn-ink: #8A6116;
  --shadow: 0 1px 2px rgba(21,34,44,.04), 0 8px 24px rgba(21,34,44,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E161D;
    --surface: #151F28;
    --surface-2: #1B2833;
    --ink: #E8EEF3;
    --ink-2: #A4B4BF;
    --ink-3: #7A8B96;
    --line: #24323D;
    --accent: #4DA3EC;
    --accent-ink: #7FBDF2;
    --accent-soft: #16293B;
    --good: #3FBE7B;
    --good-soft: #14301F;
    --bad: #E06B6B;
    --warn-bg: #2A2314;
    --warn-line: #4A3D1E;
    --warn-ink: #E0BE6E;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.hidden { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---- 顶部声明条 ---- */
.notice {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-line);
  color: var(--warn-ink);
  font-size: 13px;
  text-align: center;
  padding: 7px 16px;
}
.notice strong { font-weight: 600; }

/* ---- 导航 ---- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(10px)) {
  header.nav { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); }
}
.nav-inner { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.logo svg { display: block; }
.nav-links { display: flex; gap: 14px; margin-left: 28px; flex: 1; align-items: center; }
.nav-links > a, .dropdown > .drop-btn {
  color: var(--ink-2); font-size: 14.5px; padding: 6px 14px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; font-family: inherit; line-height: inherit;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.nav-links > a:hover, .dropdown > .drop-btn:hover { color: var(--ink); background: var(--surface-2); }
.nav-links > a.current { color: var(--accent); font-weight: 600; }
.drop-btn .caret { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .55; margin-top: 2px; }

.dropdown { position: relative; }
.dropdown .menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; z-index: 60;
}
.dropdown.open .menu { display: block; }
@media (hover: hover) and (pointer: fine) {
  .dropdown:hover > .menu { display: block; }
  /* 填补按钮与菜单之间 6px 的空隙，避免鼠标移过去时菜单收起 */
  .dropdown:hover::after {
    content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 8px;
  }
}
.dropdown .menu a {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14px;
}
.dropdown .menu a:hover { background: var(--surface-2); color: var(--ink); }
.nav-actions { display: flex; gap: 10px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; font-size: 15px; font-weight: 600; padding: 10px 20px;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
  white-space: nowrap; font-family: inherit;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 7px 15px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }

/* 移动端菜单按钮 */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  width: 38px; height: 38px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---- 首屏 ---- */
.hero {
  background:
    radial-gradient(1200px 420px at 75% -60px, var(--accent-soft), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 72px 0 64px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 4px 14px;
  margin-bottom: 18px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.25; margin: 0 0 16px;
  font-weight: 700; letter-spacing: .5px; text-wrap: balance;
}
h1 .em { color: var(--accent); }
.hero p.sub { color: var(--ink-2); font-size: 17px; max-width: 30em; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.demo-cred {
  display: inline-flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
  font-size: 13px; color: var(--ink-3);
}
.demo-cred code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 8px; color: var(--ink-2); font-size: 12.5px;
}
.hero-visual { position: relative; }
.hero-visual canvas {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow);
}
.visual-caption {
  display: flex; gap: 18px; justify-content: center; margin-top: 12px;
  font-size: 12.5px; color: var(--ink-3);
}
.visual-caption span { display: inline-flex; align-items: center; gap: 6px; }
.visual-caption i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---- 通用区块 ---- */
section { padding: 72px 0; }
.sec-head { max-width: 620px; margin: 0 auto 44px; text-align: center; }
.sec-head .tag { color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: 2px; }
.sec-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 8px 0 10px; font-weight: 700; text-wrap: balance; }
.sec-head p { color: var(--ink-2); margin: 0; }
.page-head { padding: 52px 0 0; }
.page-head .sec-head { margin-bottom: 0; }

/* 功能网格 */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 24px 20px; transition: border-color .15s, transform .15s;
}
.feat:hover { border-color: var(--accent); transform: translateY(-2px); }
.feat .ico {
  width: 42px; height: 42px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
  color: var(--accent);
}
.feat h3 { font-size: 16.5px; margin: 0 0 8px; font-weight: 600; }
.feat ul { margin: 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.feat li { padding-left: 16px; position: relative; }
.feat li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .55; }
.feat.hi { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 55%); }

/* WAF 专区 */
.eyebrow-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.eyebrow-row .eyebrow { margin-bottom: 0; }
.eyebrow.new { background: var(--good-soft); color: var(--good); }
.waf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.waf-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 28px;
}
.waf-panel h3 { margin: 0 0 14px; font-size: 16.5px; display: flex; align-items: center; gap: 9px; }
.waf-panel h3 svg { color: var(--accent); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13.5px; padding: 5px 13px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 500;
  white-space: nowrap;
}
.waf-points { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.waf-points li { display: flex; gap: 12px; align-items: flex-start; }
.waf-points .p-ico {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.waf-points b { display: block; font-size: 15px; font-weight: 600; }
.waf-points span { color: var(--ink-2); font-size: 14px; }
.waf-links { margin-top: 16px; font-size: 14px; color: var(--ink-3); }
.waf-links a { margin-right: 16px; }
@media (max-width: 900px) {
  .waf-grid { grid-template-columns: 1fr; }
}

/* 步骤 */
.steps-sec { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 26px; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 15px;
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 6px; font-size: 16.5px; }
.step p { margin: 0; color: var(--ink-2); font-size: 14.5px; }

/* CTA 横幅 */
.cta-band {
  background: linear-gradient(120deg, var(--accent), var(--accent-ink));
  border-radius: 20px; padding: 52px 48px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: #fff; }
.cta-band p { margin: 0; opacity: .85; font-size: 15px; }
.cta-band .btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-white { background: #fff; color: #085BAD; }
.btn-white:hover { background: #EAF3FC; color: #085BAD; }
.btn-line { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-line:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

/* ---- 价格卡片（购买授权页） ---- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .15s, transform .15s;
}
.price-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.price-card.hi { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 45%); }
.price-card .tier { font-size: 15px; font-weight: 700; letter-spacing: 1px; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.price-card .tier .pill {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0; color: var(--good);
  background: var(--good-soft); border-radius: 999px; padding: 1px 9px;
}
.price-card .nodes { font-size: 26px; font-weight: 700; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.price-card .nodes small { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.price-card .plist { margin: 10px 0 18px; padding: 0; list-style: none; font-size: 14.5px; color: var(--ink-2); flex: 1; }
.price-card .plist li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
}
.price-card .plist li:last-child { border-bottom: 0; }
.price-card .plist b { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* 所有等级均含的功能清单 */
.incl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px; }
.incl {
  display: flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.incl svg { flex: none; color: var(--good); }

/* 说明卡片 */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 28px 30px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card h3 { margin: 0 0 12px; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.card h3 svg { color: var(--accent); flex: none; }
.card p, .card ol, .card ul { margin: 0; color: var(--ink-2); font-size: 15px; }
.card ol { padding-left: 20px; }
.card ol li { margin: 4px 0; }
.card .kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 15px; }
.card .kv .k { color: var(--ink-3); white-space: nowrap; }
.card .kv .v { color: var(--ink); }

/* ---- 文本输入框 ---- */
.text-input {
  width: 100%; padding: 12px 16px; font-size: 16px; font-family: inherit;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.text-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.text-input::placeholder { color: var(--ink-3); }
.form-row { display: flex; gap: 10px; }
.form-row .text-input { flex: 1; }
.form-hint { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.form-error { margin-top: 10px; font-size: 14px; color: var(--bad); }

/* ---- 更新日志时间线 ---- */
.timeline { position: relative; margin: 0; padding: 0 0 0 26px; list-style: none; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line); border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 36px; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-item::before {
  content: ""; position: absolute; left: -26px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent);
}
.tl-item.upcoming::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tl-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.tl-title h3 { margin: 0; font-size: 17.5px; font-weight: 700; }
.tl-title .date { color: var(--ink-3); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tl-title .badge {
  font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 1px 10px;
}
.tl-body {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 22px; color: var(--ink-2); font-size: 14.5px; line-height: 1.85;
  overflow-wrap: break-word;
}
.tl-loading { color: var(--ink-3); font-size: 14.5px; padding-left: 2px; }

/* ---- 页脚 ---- */
footer.site-foot {
  border-top: 1px solid var(--line); background: var(--surface);
  padding: 36px 0 40px; color: var(--ink-3); font-size: 13.5px;
  margin-top: 72px;
}
.no-foot-gap footer.site-foot { margin-top: 0; }
.foot-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-3); }
.foot-links a:hover { color: var(--accent); }
.beian a { color: var(--ink-3); }
.beian img { width: 15px; vertical-align: -2px; }

/* ---- 响应式 ---- */
@media (max-width: 980px) {
  .incl-grid { grid-template-columns: repeat(3, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 0 44px; }
  .feat-grid, .steps { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px;
    box-shadow: var(--shadow); margin-left: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links > a, .dropdown > .drop-btn { width: 100%; padding: 10px 12px; font-size: 15px; }
  .dropdown .menu { position: static; box-shadow: none; border: 0; padding: 0 0 4px 16px; min-width: 0; }
}
@media (max-width: 620px) {
  .feat-grid, .steps, .price-grid, .incl-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 28px; }
  section { padding: 52px 0; }
  .nav-actions .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feat, .feat:hover, .price-card, .price-card:hover { transform: none; transition: none; }
}
