/* ==========================================================================
   Nestlink 官网 · 页面级样式
   ========================================================================== */

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; padding: calc(var(--nav-h) + 78px) 0 92px;
  overflow: hidden; background: linear-gradient(180deg, #F7FAFF 0%, #FFFFFF 62%);
}
.hero .orb-1 { width: 620px; height: 620px; top: -260px; right: -140px; }
.hero .orb-2 { width: 480px; height: 480px; top: 40px; left: -220px; opacity: .38; }
#heroCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: .5; pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  gap: 60px; align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { font-size: 17.5px; max-width: 560px; }
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; margin: 30px 0 26px; }
.hero-trust { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-trust .ht-label { font-size: 12.5px; color: var(--ink-500); }
.hero-meta { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line); }
.hero-meta div b { display: block; font-family: var(--mono); font-size: 21px; color: var(--ink-900); letter-spacing: -.02em; }
.hero-meta div span { font-size: 12.5px; color: var(--ink-500); }

.hero-visual { position: relative; }
.hero-card {
  border-radius: var(--r-xl); padding: 22px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 40px 90px -40px rgba(11,92,255,.5), 0 12px 30px -14px rgba(10,23,51,.12);
}
.hero-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.hero-card-top .hct-title { font-size: 13px; font-weight: 600; color: var(--ink-700); display: flex; align-items: center; gap: 8px; }
.hero-nodes { display: grid; gap: 9px; margin-bottom: 16px; }
.hero-node {
  display: grid; grid-template-columns: 20px 1fr auto auto; gap: 11px; align-items: center;
  padding: 10px 13px; border-radius: var(--r-sm);
  background: #fff; border: 1px solid var(--line);
  font-size: 13px;
}
.hero-node .hn-name { font-weight: 600; color: var(--ink-900); }
.hero-node .hn-bar { width: 54px; height: 4px; border-radius: 999px; background: var(--blue-50); overflow: hidden; }
.hero-node .hn-bar i { display: block; height: 100%; width: 40%; background: var(--grad-blue); border-radius: 999px; transition: width .6s var(--ease); }
.hero-node .hn-ms { font-family: var(--mono); font-size: 12px; color: #067647; }
.hero-float {
  position: absolute; padding: 12px 16px; border-radius: var(--r);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-lg);
  display: flex; align-items: center; gap: 11px; font-size: 13px;
  animation: float-y 5.5s ease-in-out infinite;
}
.hero-float.f1 { left: -34px; bottom: 68px; }
.hero-float.f2 { right: -22px; top: 26px; animation-delay: -2.4s; }
.hero-float .hf-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad-blue-soft); border: 1px solid var(--blue-100); color: var(--blue-600); flex: none; }
.hero-float .hf-ico svg { width: 17px; height: 17px; }
.hero-float b { display: block; font-size: 13.5px; color: var(--ink-900); }
.hero-float span { font-size: 11.5px; color: var(--ink-500); }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 46px; }
  .hero { padding-top: calc(var(--nav-h) + 52px); }
  .hero-float.f1 { left: 0; bottom: -18px; }
  .hero-float.f2 { right: 0; top: -16px; }
  .hero-visual { margin-bottom: 20px; }
}

/* ---------- 数据带 ---------- */
.stats-band { position: relative; z-index: 2; margin-top: -46px; }
.stats-band .stat-row { box-shadow: var(--sh-lg); border-radius: var(--r-lg); background: #fff; }

/* ---------- 节点地图 ---------- */
.map-wrap { position: relative; border-radius: var(--r-lg); overflow: hidden; background: linear-gradient(160deg, #061733, #0A2455 60%, #0B3A8C); border: 1px solid rgba(255,255,255,.08); padding: 30px; }
.map-dots { position: relative; width: 100%; aspect-ratio: 2 / 1; }
.map-svg { width: 100%; height: 100%; }
.map-region { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: var(--r-sm); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); font-size: 13.5px; color: #C7D7F7; transition: background .2s var(--ease); }
.map-region:hover { background: rgba(255,255,255,.1); }
.map-region .mr-l { display: flex; align-items: center; gap: 10px; }
.map-region .mr-r { font-family: var(--mono); font-size: 12px; color: #29D6F5; }

/* 拓扑连线动画 */
.arc {
  stroke-dasharray: 5 9;
  animation: arc-flow 2.6s linear infinite;
  opacity: .9;
}
@keyframes arc-flow { to { stroke-dashoffset: -28; } }
.map-node circle { fill: #0B5CFF; stroke: #9FE9FF; stroke-width: 2; }
.map-node text {
  fill: #A9C4EE; font-size: 12px; font-family: var(--font);
  font-weight: 500; letter-spacing: .01em;
}
.map-node.dim circle { fill: #33507F; stroke: #5C7AA8; stroke-width: 1.5; }
.map-node.dim text { fill: #6F8AB8; font-size: 11px; }
.hub-label {
  fill: #7FD8FF; font-size: 10.5px; font-family: var(--mono);
  letter-spacing: .18em; text-anchor: middle;
}
.pulse-ring {
  animation: pulse-ring 2.8s var(--ease) infinite;
  transform-origin: 280px 160px;
}
@keyframes pulse-ring {
  0% { transform: scale(.72); opacity: .85; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ---------- 演示模式横幅 ---------- */
.demo-flag {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 300; display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: rgba(5, 18, 46, .92); color: #C7D7F7;
  font-size: 12.8px; box-shadow: var(--sh-lg);
  backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.12);
}
.demo-flag b { color: #29D6F5; }
.demo-flag a { color: #fff; text-decoration: underline; margin-left: 4px; }

/* ---------- 首页能力卡 ---------- */
.feature-card { padding: 28px 26px; }
.feature-card .card-icon { transition: transform .25s var(--ease); }
.feature-card:hover .card-icon { transform: scale(1.06) rotate(-3deg); }

/* ---------- 安全对比区 ---------- */
.compare-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: var(--sh-sm); }
.compare .col-bad { background: #FFFBFB; }
.compare .col-good { background: #F7FBFF; }
.compare thead th.col-good { background: var(--blue-50); color: var(--blue-700); }

/* ---------- 下载页 ---------- */
.page-head {
  position: relative; padding: calc(var(--nav-h) + 62px) 0 58px;
  background: linear-gradient(180deg, #F5F9FF 0%, #fff 100%);
  overflow: hidden; text-align: center;
}
.page-head .orb-a { width: 460px; height: 460px; top: -230px; left: 50%; transform: translateX(-50%); opacity: .45; }
.page-head h1 { font-size: clamp(27px, 3.6vw, 42px); }
.page-head p { max-width: 640px; margin: 0 auto; font-size: 16.5px; color: var(--ink-600); }
.crumb { font-size: 13px; color: var(--ink-500); margin-bottom: 14px; }
.crumb a { color: var(--ink-500); }
.crumb a:hover { color: var(--blue-600); }

.dl-note {
  display: flex; gap: 13px; padding: 17px 20px; border-radius: var(--r);
  background: var(--blue-50); border: 1px solid var(--blue-100); font-size: 13.8px; color: var(--blue-800);
}
.dl-note svg { width: 19px; height: 19px; flex: none; color: var(--blue-600); margin-top: 2px; }
.dl-note p:last-child { margin-bottom: 0; }

.hash-row { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-500); word-break: break-all; }

/* 平台页签 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; background: var(--bg-soft-2); border: 1px solid var(--line); border-radius: var(--r-pill); }
.tabs button {
  border: 0; background: transparent; cursor: pointer; padding: 8px 16px;
  border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; color: var(--ink-600);
  transition: all .2s var(--ease); display: inline-flex; align-items: center; gap: 7px;
}
.tabs button:hover { color: var(--blue-700); }
.tabs button.active { background: #fff; color: var(--blue-700); box-shadow: var(--sh-xs); }
.tabs button svg { width: 16px; height: 16px; }

/* 教程卡 */
.guide { display: grid; gap: 16px; }
.guide-step { display: flex; gap: 15px; padding: 16px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.guide-step .gs-n {
  width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-700); font-weight: 700; font-size: 13px; font-family: var(--mono);
}
.guide-step h4 { margin: 3px 0 5px; font-size: 15px; }
.guide-step p { margin: 0; font-size: 13.5px; color: var(--ink-600); }

/* ---------- 认证页 ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  padding-top: var(--nav-h);
}
.auth-side {
  position: relative; overflow: hidden; padding: 64px 58px;
  background: var(--grad-navy); color: #B9CCEE;
  display: flex; flex-direction: column; justify-content: center;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 30% 40%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 30% 40%, #000, transparent 72%);
}
.auth-side .orb-s1 { width: 420px; height: 420px; top: -120px; right: -140px; opacity: .5; }
.auth-side .orb-s2 { width: 340px; height: 340px; bottom: -120px; left: -100px; opacity: .35; }
.auth-side-inner { position: relative; z-index: 1; max-width: 440px; }
.auth-side h2 { color: #fff; font-size: 30px; margin-bottom: 16px; }
.auth-side p { color: #A9BEE6; font-size: 15px; }
.auth-side .as-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 15px; }
.auth-side .as-list li { display: flex; gap: 12px; font-size: 14.3px; color: #C7D7F7; align-items: flex-start; }
.auth-side .as-list svg { width: 19px; height: 19px; color: #29D6F5; flex: none; margin-top: 2px; }
.auth-side .as-foot { margin-top: 42px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12.5px; color: #7E93BB; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 30px; background: #fff; }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h1 { font-size: 27px; margin-bottom: 8px; }
.auth-box .auth-sub { color: var(--ink-500); font-size: 14.5px; margin-bottom: 28px; }
.auth-alt { text-align: center; font-size: 14px; color: var(--ink-500); margin-top: 22px; }
.auth-alt a { font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 24px 0; color: var(--ink-400); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
}

/* ---------- 用户中心 ---------- */
.dash-hero {
  border-radius: var(--r-lg); padding: 26px; margin-bottom: 22px;
  background: var(--grad-navy); color: #B9CCEE; position: relative; overflow: hidden;
}
.dash-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 70% 100% at 80% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 80% 0%, #000, transparent 70%);
}
.dash-hero .dh-inner { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.dash-hero h2 { color: #fff; font-size: 22px; margin-bottom: 6px; }
.dash-hero .dh-sub { font-size: 13.5px; color: #A9BEE6; }
.dash-hero .dh-metrics { display: flex; gap: 34px; flex-wrap: wrap; }
.dash-hero .dh-metrics b { display: block; font-family: var(--mono); font-size: 21px; color: #fff; letter-spacing: -.02em; }
.dash-hero .dh-metrics span { font-size: 12px; color: #8FA8D6; }

.traffic-grid { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 28px; align-items: center; }
@media (max-width: 640px) { .traffic-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.usage-legend { display: grid; gap: 13px; margin-top: 18px; }
.usage-legend .ul-row { display: flex; justify-content: space-between; font-size: 13px; }
.usage-legend .ul-row .k { color: var(--ink-500); display: flex; align-items: center; gap: 7px; }
.usage-legend .ul-row .k i { width: 9px; height: 9px; border-radius: 3px; display: block; }
.usage-legend .ul-row .v { font-family: var(--mono); font-weight: 600; color: var(--ink-900); }

/* 空状态 */
.empty { text-align: center; padding: 52px 24px; }
.empty .em-ico {
  width: 62px; height: 62px; border-radius: 18px; margin: 0 auto 18px;
  display: grid; place-items: center; background: var(--bg-soft-2); border: 1px solid var(--line);
  color: var(--blue-500);
}
.empty .em-ico svg { width: 28px; height: 28px; }
.empty h4 { margin-bottom: 7px; }
.empty p { color: var(--ink-500); font-size: 14px; max-width: 380px; margin: 0 auto 20px; }

/* 通知条 */
.notice-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.notice-item:last-child { border-bottom: 0; }
.notice-item .ni-date { font-family: var(--mono); font-size: 12px; color: var(--ink-400); flex: none; width: 88px; }
.notice-item .ni-body h4 { margin: 0 0 5px; font-size: 14.5px; }
.notice-item .ni-body p { margin: 0; font-size: 13.5px; color: var(--ink-600); white-space: pre-wrap; }

/* 二维码盒 */
.qr-box {
  width: 172px; height: 172px; border-radius: var(--r); background: #fff;
  border: 1px solid var(--line); padding: 10px; display: grid; place-items: center;
  box-shadow: var(--sh-sm);
}
.qr-box img, .qr-box canvas { width: 100%; height: 100%; }

/* 遮罩敏感信息 */
.sensitive { display: flex; align-items: center; gap: 10px; }
.sensitive .sv {
  font-family: var(--mono); font-size: 12.5px; color: var(--ink-700);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-xs);
  padding: 9px 12px; flex: 1; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.sensitive.revealed .sv { background: #fff; }

/* ---------- 状态页 ---------- */
.status-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.status-tile { padding: 20px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-sm); }
.status-tile .st-top { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-500); }
.status-tile .st-val { font-family: var(--mono); font-size: 25px; font-weight: 700; color: var(--ink-900); margin-top: 9px; letter-spacing: -.02em; }

.uptime-bars { display: flex; gap: 2px; margin-top: 6px; }
.uptime-bars i { flex: 1; height: 26px; border-radius: 3px; background: #10B981; opacity: .85; }
.uptime-bars i.warn { background: #F59E0B; }
.uptime-bars i.down { background: #EF4444; }

/* ---------- 法律页 ---------- */
.legal-body { max-width: 820px; }
.legal-body h2 { font-size: 22px; margin-top: 44px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 17px; margin-top: 28px; }
.legal-body p, .legal-body li { font-size: 14.8px; line-height: 1.85; color: var(--ink-600); }
.legal-body ul, .legal-body ol { margin-bottom: 1.2em; }
.legal-body li { margin-bottom: 7px; }
.legal-body strong { color: var(--ink-900); }
.legal-toc {
  position: sticky; top: calc(var(--nav-h) + 24px);
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--bg-soft);
}
.legal-toc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); margin-bottom: 12px; }
.legal-toc a { display: block; font-size: 13.5px; color: var(--ink-600); padding: 5px 0; }
.legal-toc a:hover { color: var(--blue-600); }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .legal-layout { grid-template-columns: minmax(0, 1fr); } .legal-toc { display: none; } }

.timeline-note { font-size: 13.5px; color: var(--ink-500); padding: 14px 18px; background: var(--bg-soft); border-left: 3px solid var(--blue-400); border-radius: 0 var(--r-xs) var(--r-xs) 0; }

/* ---------- 帮助中心 ---------- */
.help-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.help-nav { position: sticky; top: calc(var(--nav-h) + 24px); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: #fff; box-shadow: var(--sh-sm); }
.help-nav a { display: block; padding: 9px 12px; border-radius: var(--r-xs); font-size: 14px; color: var(--ink-700); }
.help-nav a:hover { background: var(--bg-soft); color: var(--blue-700); }
.help-nav a.active { background: var(--blue-50); color: var(--blue-700); font-weight: 600; }
@media (max-width: 900px) { .help-grid { grid-template-columns: minmax(0, 1fr); } .help-nav { position: static; } }

/* ---------- CTA 带 ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  padding: 62px 54px; background: var(--grad-navy); color: #B9CCEE; text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, #000, transparent 72%);
}
.cta-band .orb-c1 { width: 420px; height: 420px; top: -200px; right: -80px; opacity: .45; }
.cta-band .orb-c2 { width: 360px; height: 360px; bottom: -200px; left: -60px; opacity: .35; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #A9BEE6; max-width: 560px; margin: 0 auto 28px; }
.cta-band .cta-actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }
.cta-band .cta-note { margin-top: 20px; font-size: 12.5px; color: #7E93BB; }
@media (max-width: 720px) { .cta-band { padding: 44px 24px; } }

/* ---------- 内联两栏布局在窄屏降为单栏 ---------- */
@media (max-width: 900px) {
  .grid[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ---------- 404 ---------- */
.err-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: calc(var(--nav-h) + 40px) 24px 60px; position: relative; overflow: hidden; }
.err-page .err-code {
  font-family: var(--mono); font-size: clamp(84px, 16vw, 160px); font-weight: 700;
  line-height: 1; letter-spacing: -.05em;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
