/* ============================================================
   VPN Study Web · 炫酷主题
   ============================================================ */
:root {
  --bg: #06080f;
  --bg-soft: #0b0f1a;
  --card: rgba(22, 27, 39, 0.72);
  --card-solid: #161b27;
  --border: rgba(91, 140, 255, 0.14);
  --border-strong: rgba(91, 140, 255, 0.35);
  --text: #eef1f8;
  --text-dim: #98a1b8;
  --text-faint: #5d6479;
  --accent: #5b8cff;
  --accent2: #9b6bff;
  --accent3: #21d4fd;
  --pink: #ff5ec7;
  --green: #3ddc84;
  --red: #ff5d5d;
  --yellow: #ffc857;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --glow: 0 0 40px rgba(91, 140, 255, 0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.75;
  overflow-x: hidden;
  position: relative;
}

/* 动态背景画布 */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vw at 12% 8%, rgba(91, 140, 255, 0.13), transparent 60%),
    radial-gradient(50vw 50vw at 88% 22%, rgba(155, 107, 255, 0.12), transparent 60%),
    radial-gradient(55vw 55vw at 50% 100%, rgba(33, 212, 253, 0.08), transparent 60%);
}

/* ---------- 滚动进度条 ---------- */
.scroll-prog {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  z-index: 200;
  background: linear-gradient(90deg, var(--accent3), var(--accent), var(--accent2), var(--pink));
  box-shadow: 0 0 12px rgba(91,140,255,0.6);
  transition: width 0.1s linear;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  background: rgba(6, 8, 15, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav .logo {
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
}
.nav .logo .grad-text {
  background: linear-gradient(90deg, var(--accent3), var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav .links {
  display: flex;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav .links::-webkit-scrollbar { display: none; }
.nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 11px;
  border-radius: 9px;
  white-space: nowrap;
  transition: all 0.25s;
  position: relative;
}
.nav a:hover { color: var(--text); }
.nav a.active {
  color: var(--text);
  background: rgba(91, 140, 255, 0.12);
}
/* 三大模式 Tab */
.nav .tabs {
  display: flex;
  gap: 4px;
  margin-left: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  flex-shrink: 0;
}
.nav .tab {
  padding: 6px 15px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s;
}
.nav .tab.active {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 2px 14px rgba(91, 140, 255, 0.4);
}
.nav .tab:hover:not(.active) { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle span:nth-child(1) { top: 13px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 25px; }
.nav-toggle.open span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 20px 70px;
  position: relative;
}
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent3);
  border: 1px solid var(--border-strong);
  background: rgba(33, 212, 253, 0.06);
  padding: 6px 15px;
  border-radius: 999px;
  margin-bottom: 26px;
  animation: floatY 4s ease-in-out infinite;
}
.hero .badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.hero h1 {
  font-size: clamp(34px, 7vw, 68px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.12;
}
.hero h1 .grad {
  background: linear-gradient(110deg, var(--accent3), var(--accent) 40%, var(--accent2) 70%, var(--pink));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.hero .sub {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: clamp(14px, 2.2vw, 19px);
  max-width: 600px;
  min-height: 32px;
}
.hero .sub .cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero .cta-row { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: 13px;
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
  border: none;
}
.cta.primary {
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 8px 30px rgba(91, 140, 255, 0.35);
}
.cta.primary:hover { transform: translateY(-3px); box-shadow: 0 14px 44px rgba(91, 140, 255, 0.5); }
.cta.ghost {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.cta.ghost:hover { transform: translateY(-3px); border-color: var(--accent); }

.hero-stats {
  margin-top: 56px;
  display: flex;
  gap: 38px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat .n {
  font-size: 30px;
  font-weight: 800;
  font-family: var(--mono);
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats .stat .l { font-size: 12px; color: var(--text-faint); }

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: floatY 2.4s ease-in-out infinite;
}
.scroll-hint .mouse {
  width: 22px; height: 34px;
  border: 2px solid var(--text-faint);
  border-radius: 12px;
  position: relative;
}
.scroll-hint .mouse::after {
  content: "";
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 1.6s infinite;
}
@keyframes scrollWheel { 0% { opacity: 1; top: 6px; } 100% { opacity: 0; top: 16px; } }

/* ---------- 快速上手占位 ---------- */
.coming-list {
  margin-top: 48px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  max-width: 720px;
  width: 100%;
  text-align: left;
}
.coming-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.coming-item .ci-ic { font-size: 26px; flex-shrink: 0; }
.coming-item b { display: block; font-size: 14.5px; }
.coming-item span { font-size: 12.5px; color: var(--text-dim); }

/* ---------- Sections ---------- */
section { padding: 86px 20px; max-width: 1120px; margin: 0 auto; position: relative; }
.sec-head { margin-bottom: 38px; }
.sec-tag {
  display: inline-block;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--accent3);
  border: 1px solid var(--border-strong);
  padding: 4px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
  letter-spacing: 1px;
}
section h2 {
  font-size: clamp(26px, 4.5vw, 40px);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
section h2 .hl {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.sec-desc { color: var(--text-dim); max-width: 760px; font-size: 15.5px; }
.sec-desc b { color: var(--text); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s cubic-bezier(.2,.7,.3,1), transform 0.8s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }

/* ---------- Cards ---------- */
.card {
  background: #131826;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  position: relative;
}
.card.glow { box-shadow: var(--glow); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

/* 发光边框卡片 */
.glow-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s;
}
.glow-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(130deg, transparent, var(--accent), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
}
.glow-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.glow-card:hover::before { opacity: 1; }

/* ---------- SVG stage ---------- */
.stage {
  background: linear-gradient(160deg, var(--bg-soft), rgba(11,15,26,0.6));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  overflow: hidden;
  position: relative;
}
.stage svg { width: 100%; height: auto; display: block; }

.svg-label { fill: var(--text); font-size: 13px; font-weight: 600; text-anchor: middle; }
.svg-sub { fill: var(--text-dim); font-size: 10px; text-anchor: middle; }
.svg-box { fill: var(--card-solid); stroke: var(--border-strong); stroke-width: 1.5; }
.svg-line { stroke: var(--border-strong); stroke-width: 2; fill: none; }
.svg-line.active-plain { stroke: var(--green); stroke-dasharray: 6 6; animation: dash 0.8s linear infinite; filter: drop-shadow(0 0 4px rgba(61,220,132,0.5)); }
.svg-line.active-enc { stroke: var(--accent2); stroke-dasharray: 6 6; animation: dash 0.8s linear infinite; filter: drop-shadow(0 0 4px rgba(155,107,255,0.5)); }
@keyframes dash { to { stroke-dashoffset: -12; } }

/* ---------- Toggle ---------- */
.toggle-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.switch {
  position: relative;
  width: 60px; height: 32px;
  background: var(--card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.35s;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: all 0.35s cubic-bezier(.4,1.4,.6,1);
}
.switch.on { background: linear-gradient(90deg, var(--accent), var(--accent2)); border-color: transparent; box-shadow: 0 0 18px rgba(91,140,255,0.5); }
.switch.on::after { left: 33px; background: #fff; }
.toggle-row .state { font-weight: 700; font-size: 15px; transition: color 0.3s; }
.toggle-row .state.on { color: var(--accent); }

.isp-view {
  margin-top: 20px;
  border-radius: 14px;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--border);
  background: rgba(6,8,15,0.6);
  transition: border-color 0.4s;
}
.isp-view .title { font-weight: 700; margin-bottom: 10px; }
.isp-view ul { list-style: none; }
.isp-view li { padding: 4px 0; color: var(--text-dim); }
.isp-view.plain { border-color: rgba(61, 220, 132, 0.4); }
.isp-view.enc { border-color: rgba(155, 107, 255, 0.4); }
.tag-visible { color: var(--green); }
.tag-hidden { color: var(--accent2); }
.tag-danger { color: var(--red); }

/* ---------- Stepper ---------- */
.stepper { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.step-btn {
  flex: 1;
  min-width: 140px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
  color: var(--text-dim);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: all 0.3s;
  font-family: inherit;
}
.step-btn .num {
  display: inline-flex;
  width: 24px; height: 24px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 8px;
  transition: all 0.3s;
}
.step-btn .t { display: block; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.step-btn.active {
  border-color: var(--accent);
  background: rgba(91, 140, 255, 0.1);
  color: var(--text);
  box-shadow: 0 0 22px rgba(91,140,255,0.18);
}
.step-btn.active .num { background: linear-gradient(90deg,var(--accent),var(--accent2)); color: #fff; }
.step-desc {
  background: rgba(6,8,15,0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  margin-top: 20px;
  color: var(--text-dim);
  font-size: 14.5px;
  min-height: 80px;
}
.step-desc b { color: var(--text); }

/* packet layers */
.packet-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 28px 0 8px;
  flex-wrap: wrap;
  min-height: 70px;
}
.pkt-layer {
  padding: 15px 19px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  border: 2px solid;
  transition: all 0.45s cubic-bezier(.3,.8,.3,1);
  white-space: nowrap;
}
.pkt-data { background: rgba(61,220,132,0.12); border-color: var(--green); color: var(--green); border-radius: 0 11px 11px 0; }
.pkt-tcp { background: rgba(255,200,87,0.12); border-color: var(--yellow); color: var(--yellow); border-right: none; }
.pkt-ip { background: rgba(91,140,255,0.12); border-color: var(--accent); color: var(--accent); border-radius: 11px 0 0 11px; border-right: none; }
.pkt-outer { background: rgba(155,107,255,0.15); border-color: var(--accent2); color: var(--accent2); border-radius: 11px 0 0 11px; border-right: none; }
.pkt-encrypted {
  background: repeating-linear-gradient(45deg, rgba(155,107,255,0.2), rgba(155,107,255,0.2) 8px, rgba(155,107,255,0.05) 8px, rgba(155,107,255,0.05) 16px);
  border-color: var(--accent2); color: var(--accent2);
  border-radius: 0 11px 11px 0;
}
.pkt-hide { opacity: 0; transform: scale(0.8); width: 0; padding: 15px 0; border: none; overflow: hidden; }

/* ---------- Encrypt demo ---------- */
.enc-demo { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 780px) { .enc-demo { grid-template-columns: 1fr auto 1fr; align-items: stretch; } }
.enc-demo .pane {
  background: rgba(6,8,15,0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.enc-demo label { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; font-family: var(--mono); }
.enc-demo textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  min-height: 110px;
  line-height: 1.7;
}
.enc-demo .cipher-out {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent2);
  word-break: break-all;
  min-height: 110px;
  line-height: 1.7;
}
.enc-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--accent); font-size: 24px; }
.enc-arrow .spin-lock { animation: spinLock 3s linear infinite; }
@keyframes spinLock { 0%,80%,100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-8deg); } }
.enc-arrow .key-chip {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  padding: 5px 12px;
  border-radius: 9px;
  color: var(--yellow);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}
.enc-arrow .key-chip:hover { border-color: var(--yellow); box-shadow: 0 0 14px rgba(255,200,87,0.3); }

/* ---------- Compare cards ---------- */
.cmp-card .icon { font-size: 32px; margin-bottom: 12px; display: block; }
.cmp-card h3 { font-size: 19px; margin-bottom: 6px; }
.cmp-card .sub { font-size: 12px; font-family: var(--mono); color: var(--accent); margin-bottom: 12px; }
.cmp-card p { font-size: 14px; color: var(--text-dim); }
.cmp-card ul { margin-top: 14px; list-style: none; }
.cmp-card li { font-size: 13px; color: var(--text-dim); padding: 4px 0; padding-left: 16px; position: relative; }
.cmp-card li::before { content: "▸"; color: var(--accent); position: absolute; left: 0; }

/* ---------- Matrix table ---------- */
table.matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.matrix thead th { color: var(--text-dim); font-weight: 700; font-size: 12px; position: sticky; top: 0; }
.matrix tbody tr { transition: background 0.2s; }
.matrix tbody tr:hover { background: rgba(91,140,255,0.05); }
.matrix td:first-child { font-weight: 600; color: var(--text); }
.matrix .yes { color: var(--green); }
.matrix .no { color: var(--text-faint); }
.matrix .part { color: var(--yellow); }
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Protocol cards (chips) ---------- */
.proto-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.proto {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  transition: all 0.3s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.proto:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.proto .ph { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.proto .name { font-weight: 700; font-size: 16px; font-family: var(--mono); }
.proto .era { font-size: 10px; font-family: var(--mono); color: var(--text-faint); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; }
.proto p { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.proto .meters { display: flex; flex-direction: column; gap: 7px; }
.meter { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-faint); }
.meter .ml { width: 42px; flex-shrink: 0; }
.meter .bar { flex: 1; height: 5px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); width: 0; transition: width 1s ease; }
.meter .bar.stealth i { background: linear-gradient(90deg, var(--accent2), var(--pink)); }
.meter .bar.speed i { background: linear-gradient(90deg, var(--accent3), var(--green)); }
.proto .tag-row { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.proto .tag-row span { font-size: 10px; font-family: var(--mono); padding: 2px 8px; border-radius: 6px; background: rgba(91,140,255,0.1); color: var(--accent); }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 30px; margin-top: 10px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--accent3), var(--accent), var(--accent2), var(--pink));
}
.tl-item { position: relative; padding: 0 0 26px 0; }
.tl-item::before {
  content: ""; position: absolute; left: -30px; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
  box-shadow: 0 0 12px rgba(91,140,255,0.5);
}
.tl-item .yr { font-family: var(--mono); font-size: 13px; color: var(--accent3); font-weight: 700; }
.tl-item .tt { font-weight: 700; font-size: 15px; margin: 2px 0 4px; }
.tl-item p { font-size: 13.5px; color: var(--text-dim); }

/* ---------- Airport flow ---------- */
.flow-controls { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.btn {
  background: var(--card);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 19px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); border: none; color: #fff; font-weight: 700; box-shadow: 0 6px 20px rgba(91,140,255,0.3); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.flow-log {
  margin-top: 18px;
  background: rgba(6,8,15,0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 12.5px;
  min-height: 56px;
  color: var(--text-dim);
  max-height: 220px;
  overflow-y: auto;
}
.flow-log .line { padding: 3px 0; animation: slideIn 0.45s; }
.flow-log .line b { color: var(--accent); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }

.node-tip {
  margin-top: 16px;
  display: none;
  background: rgba(6,8,15,0.7);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 13.5px;
  color: var(--text-dim);
  animation: slideIn 0.35s;
  box-shadow: 0 0 24px rgba(91,140,255,0.15);
}
.node-tip.show { display: block; }
.node-tip b { color: var(--text); }
.clickable { cursor: pointer; }
.clickable .svg-box { transition: stroke 0.25s, filter 0.25s; }
.clickable:hover .svg-box { stroke: var(--accent); filter: drop-shadow(0 0 8px rgba(91,140,255,0.5)); }

/* ---------- Line types (机场线路) ---------- */
.line-types { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 6px; }
.lt-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 22px; transition: all 0.3s; }
.lt-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.lt-card .lt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lt-card .lt-icon { font-size: 22px; }
.lt-card h4 { font-size: 16px; }
.lt-card .lt-en { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.lt-card p { font-size: 13.5px; color: var(--text-dim); margin: 8px 0; }
.lt-card .lt-rate { display: flex; gap: 14px; margin-top: 12px; font-size: 12px; }
.lt-card .lt-rate div span { color: var(--text-faint); }
.lt-card .lt-rate div b { color: var(--accent); font-family: var(--mono); }

/* ---------- Rule simulator ---------- */
.rule-sim { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .rule-sim { grid-template-columns: 400px 1fr; } }
.rule-input-row { display: flex; gap: 10px; margin-bottom: 16px; }
.rule-input-row input {
  flex: 1;
  background: rgba(6,8,15,0.6);
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  padding: 11px 15px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  outline: none;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rule-input-row input:focus { border-color: var(--accent); box-shadow: 0 0 16px rgba(91,140,255,0.2); }
.quick-domains { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.quick-domains span {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(6,8,15,0.6);
  border: 1px solid var(--border);
  padding: 5px 13px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 0.2s;
}
.quick-domains span:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }

.rule-list { display: flex; flex-direction: column; gap: 8px; }
.rule-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6,8,15,0.5);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 11px 15px;
  font-family: var(--mono);
  font-size: 12.5px;
  transition: all 0.3s;
}
.rule-item .idx { color: var(--text-faint); width: 18px; }
.rule-item .rtype { color: var(--accent); min-width: 130px; }
.rule-item .rval { color: var(--text); flex: 1; word-break: break-all; }
.rule-item .raction { font-weight: 700; }
.raction.DIRECT { color: var(--green); }
.raction.PROXY { color: var(--accent2); }
.raction.REJECT { color: var(--red); }
.rule-item.checking { border-color: var(--yellow); background: rgba(255,200,87,0.07); box-shadow: 0 0 14px rgba(255,200,87,0.12); }
.rule-item.matched { border-color: var(--accent); background: rgba(91,140,255,0.12); transform: scale(1.03); box-shadow: 0 0 20px rgba(91,140,255,0.25); }
.rule-item.skipped { opacity: 0.35; }

.sim-result {
  margin-top: 16px;
  border-radius: 14px;
  padding: 18px 22px;
  font-size: 14px;
  display: none;
  animation: slideIn 0.4s;
  border: 1px solid var(--border);
  background: rgba(6,8,15,0.6);
}
.sim-result.show { display: block; }
.sim-result .verdict { font-size: 19px; font-weight: 800; font-family: var(--mono); }
.sim-result p { color: var(--text-dim); margin-top: 8px; font-size: 13px; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item.open { border-color: var(--border-strong); }
.faq-q {
  padding: 18px 22px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.faq-q .ic { color: var(--accent); transition: transform 0.3s; flex-shrink: 0; font-size: 20px; }
.faq-item.open .faq-q .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s; padding: 0 22px; color: var(--text-dim); font-size: 14px; }
.faq-item.open .faq-a { max-height: 320px; padding: 0 22px 20px; }
.faq-a b { color: var(--text); }

/* ---------- Note ---------- */
.note {
  margin-top: 24px;
  border-left: 3px solid var(--yellow);
  background: rgba(255, 200, 87, 0.06);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text-dim);
}
.note b { color: var(--yellow); }
.note.blue { border-color: var(--accent); background: rgba(91,140,255,0.06); }
.note.blue b { color: var(--accent); }
.note.red { border-color: var(--red); background: rgba(255,93,93,0.06); }
.note.red b { color: var(--red); }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 46px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  position: relative;
}
footer .f-logo { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
footer .f-logo .grad-text { background: linear-gradient(90deg, var(--accent3), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
footer .disclaimer { max-width: 660px; margin: 0 auto 14px; font-size: 12px; opacity: 0.7; }
footer a { color: var(--accent); text-decoration: none; }

/* ============================================================
   移动端 H5 适配
   ============================================================ */
@media (max-width: 820px) {
  .nav .links {
    position: fixed;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    gap: 2px;
    background: rgba(6, 8, 15, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 14px 18px 22px;
    border-bottom: 1px solid var(--border);
    margin-left: 0;
    overflow: visible;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    transform: translateY(-130%);
    transition: transform 0.35s cubic-bezier(.4,1,.5,1);
  }
  .nav .links.open { transform: translateY(0); }
  .nav a { font-size: 15px; padding: 12px 14px; border-radius: 10px; }
  .nav-toggle { display: block; }
  .nav .tabs { margin-left: auto; }
  .nav .tab { padding: 6px 11px; font-size: 12.5px; }
}

@media (max-width: 640px) {
  section { padding: 60px 16px; }
  .nav { padding: 11px 16px; gap: 8px; }
  .nav .logo .grad-text { display: none; }
  .nav .tab { padding: 6px 10px; font-size: 12px; }
  .hero { min-height: 88vh; padding: 100px 18px 60px; }
  .hero-stats { gap: 26px; margin-top: 44px; }
  .hero-stats .stat .n { font-size: 25px; }
  .card, .glow-card { padding: 20px; border-radius: 16px; }
  .stepper { gap: 8px; }
  .step-btn { min-width: calc(50% - 4px); padding: 12px 10px; }
  .enc-arrow { flex-direction: row; padding: 6px 0; }
  .enc-arrow span:first-child { transform: rotate(90deg); }
  .matrix th, .matrix td { padding: 10px 11px; font-size: 12px; }
  .sec-desc { font-size: 14.5px; }
  .flow-controls .btn { flex: 1; }
}

@media (max-width: 420px) {
  .step-btn { min-width: 100%; }
  .hero-stats { gap: 20px; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.15s !important; }
  .bg-aurora { animation: none; }
}

/* ============================================================
   增强交互（快速入门 + 深度学习共用）
   ============================================================ */

/* Hero 鼠标光晕 */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 460px; height: 460px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(91,140,255,0.10), transparent 65%);
  transform: translate(50vw, 30vh) translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s;
  will-change: transform;
}
@media (hover: hover) and (pointer: fine) { .cursor-glow { opacity: 1; } }

/* IP 翻转卡 */
.ip-cards {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.ip-card {
  flex: 1;
  min-width: 200px;
  background: rgba(6,8,15,0.6);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: center;
  transition: border-color 0.4s, box-shadow 0.4s;
}
.ip-card span { font-size: 12px; color: var(--text-dim); display: block; margin-bottom: 8px; }
.ip-card b {
  font-family: var(--mono);
  font-size: 16px;
  display: block;
  transition: transform 0.5s cubic-bezier(.4,1.4,.5,1), color 0.4s;
}
.ip-card b.flip { transform: rotateX(360deg); }
.ip-card.shown.changed { border-color: var(--border-strong); box-shadow: 0 0 22px rgba(155,107,255,0.25); }
.ip-card.shown.changed b { color: var(--accent2); }
.ip-flip { font-size: 22px; color: var(--accent); }

/* 自动演示按钮行 */
.demo-bar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }

/* 破解演示 */
.crack-wrap { margin-top: 16px; }
.crack-panel {
  display: none;
  margin-top: 14px;
  background: rgba(6,8,15,0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  font-family: var(--mono);
  animation: slideIn 0.4s;
}
.crack-panel.show { display: block; }
.crack-stream {
  font-size: 12px;
  color: var(--green);
  height: 40px;
  overflow: hidden;
  line-height: 1.6;
  word-break: break-all;
  opacity: 0.7;
}
.crack-info { display: flex; justify-content: space-between; font-size: 12px; margin: 10px 0 6px; color: var(--text-dim); }
.crack-info b { color: var(--yellow); }
.crack-bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.crack-bar i { display: block; height: 100%; width: 0.0001%; background: linear-gradient(90deg, var(--red), var(--yellow)); border-radius: 4px; transition: width 0.3s; }
.crack-verdict { margin-top: 12px; font-size: 13.5px; color: var(--text); display: none; }
.crack-verdict.show { display: block; animation: slideIn 0.4s; }
.crack-verdict b { color: var(--green); }

/* 选工具测验 */
.tool-picker {
  margin-top: 22px;
  background: rgba(6,8,15,0.6);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 24px;
}
.tp-step { display: none; }
.tp-step.active { display: block; animation: slideIn 0.4s; }
.tp-q { font-size: 17px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.tp-opts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.tp-opt {
  flex: 1;
  min-width: 130px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
  cursor: pointer;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s;
}
.tp-opt:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(91,140,255,0.2); }
.tp-opt .e { font-size: 30px; display: block; margin-bottom: 8px; }
.tp-result { text-align: center; }
.tp-result .rec-icon { font-size: 48px; }
.tp-result .rec-name {
  font-size: 26px; font-weight: 800; margin: 8px 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tp-result p { color: var(--text-dim); font-size: 14px; max-width: 440px; margin: 0 auto 16px; }
.tp-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.tp-progress i { width: 28px; height: 4px; border-radius: 2px; background: var(--border); transition: background 0.3s; }
.tp-progress i.on { background: linear-gradient(90deg, var(--accent), var(--accent2)); }

/* DNS 泄露动画（深度学习）*/
.leak-toggle { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

/* 协议卡可展开（深度学习）*/
.proto { cursor: pointer; }
.proto .proto-more {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, margin 0.4s, opacity 0.3s;
  opacity: 0;
  font-size: 12.5px; color: var(--text-dim); line-height: 1.7;
  border-top: 1px solid transparent;
}
.proto.open .proto-more { max-height: 480px; margin-top: 12px; padding-top: 12px; opacity: 1; border-top-color: var(--border); }
.proto .tap-hint { font-size: 10px; color: var(--text-faint); margin-top: 8px; text-align: right; }
.proto.open .tap-hint { color: var(--accent); }

/* 时间线入场：只动 transform 不碰 opacity，元素始终可见（最坏情况只是位置偏一点），绝不空白 */
.tl-item { animation: tlIn 0.55s cubic-bezier(.2,.7,.3,1) backwards; }
.tl-item:nth-child(2) { animation-delay: 0.08s; }
.tl-item:nth-child(3) { animation-delay: 0.16s; }
.tl-item:nth-child(4) { animation-delay: 0.24s; }
.tl-item:nth-child(5) { animation-delay: 0.32s; }
.tl-item:nth-child(6) { animation-delay: 0.40s; }
.tl-item:nth-child(7) { animation-delay: 0.48s; }
@keyframes tlIn { from { transform: translateX(-20px); } to { transform: none; } }

@media (max-width: 640px) {
  .ip-card b { font-size: 14px; }
  .cursor-glow { display: none; }
}

/* DNS 泄露红色虚线 */
.svg-line.leak-bad { stroke: var(--red); stroke-dasharray: 6 6; animation: dash 0.8s linear infinite; filter: drop-shadow(0 0 5px rgba(255,93,93,0.6)); }

/* ============================================================
   深度优化补充：可访问性 / 交互 / 性能
   ============================================================ */

/* 可见焦点环（仅键盘导航时出现）*/
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

/* 移动菜单打开时锁定背景滚动 */
body.no-scroll { overflow: hidden; }

/* 分流输入空值抖动提示 */
@keyframes shake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }
.rule-input-row input.shake { animation: shake 0.4s; border-color: var(--red); }

/* 自动演示进行中禁止手动点击步骤 */
.stepper.playing .step-btn { pointer-events: none; opacity: 0.85; }

/* Hero 滚出视口后暂停其无限动画（省重绘）*/
body.hero-out .hero .badge,
body.hero-out .hero .badge .dot,
body.hero-out .hero h1 .grad,
body.hero-out .hero .sub .cursor,
body.hero-out .scroll-hint,
body.hero-out .scroll-hint .mouse::after { animation-play-state: paused; }

/* 可点 SVG 角色在触屏下的常驻可点暗示（无 hover 时）*/
@media (hover: none) {
  .clickable .svg-box { stroke: var(--border-strong); stroke-dasharray: 3 3; }
}

/* 触摸目标尺寸：快捷标签更易点 */
@media (max-width: 820px) {
  .quick-domains span { padding: 9px 14px; }
  .step-btn { min-height: 44px; }
}
