/* Senflare Proxy - 统一样式 */

/* 全局字体：Inter + 思源黑体（Noto Sans SC）经 jsDelivr 由 index.html 异步加载（media=print 不阻塞首帧），
 * jsDelivr 带 immutable 长缓存头，字体由浏览器缓存 1 年、无需每次加载。本文件不再 @import 外部样式表。 */

/* ========== CSS 变量 ========== */
:root {
  --primary-color: #FF6901;
  --custom-primary-background: linear-gradient(135deg, hsl(22, 98%, 50%) 0%, hsl(35, 90%, 65%) 100%);
  --card-bg: rgba(255, 255, 255, 0.82);
  --bg-color: #ffffff;
  --text-color: #333;
  --text-muted: #666;
  --border-color: rgba(0, 0, 0, 0.05);
  --bg-secondary: rgba(0, 0, 0, 0.03);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  --orb-1: #fff5e6;
  --orb-2: #fff0e0;
  --orb-3: #ffeadd;
  --modal-bg: rgba(255, 255, 255, 0.95);

  /* ===== 调色板：主色 alpha 变体 + 状态/信息色（新颜色统一在此定义，全局复用） ===== */
  --primary-05: rgba(255, 105, 1, 0.05);
  --primary-06: rgba(255, 105, 1, 0.06);
  --primary-08: rgba(255, 105, 1, 0.08);
  --primary-10: rgba(255, 105, 1, 0.1);
  --primary-12: rgba(255, 105, 1, 0.12);
  --primary-25: rgba(255, 105, 1, 0.25);
  --primary-30: rgba(255, 105, 1, 0.3);
  --primary-35: rgba(255, 105, 1, 0.35);
  --primary-40: rgba(255, 105, 1, 0.4);
  --primary-45: rgba(255, 105, 1, 0.45);
  --primary-55: rgba(255, 105, 1, 0.55);
  --primary-70: rgba(255, 105, 1, 0.7);
  --ok: #16a34a; --ok-bg: rgba(22, 163, 74, 0.08); --ok-b2: rgba(22, 163, 74, 0.55); --ok-border: rgba(22, 163, 74, 0.5); --ok-soft: rgba(22, 163, 74, 0.15);
  --mid: #d97706; --mid-bg: rgba(217, 119, 6, 0.08); --mid-border: rgba(217, 119, 6, 0.55);
  --warn: #e53e3e; --warn-bg: rgba(229, 62, 62, 0.08); --warn-border: rgba(229, 62, 62, 0.55);
  --err: #dc2626; --err-bg: rgba(220, 38, 38, 0.06); --err-border: rgba(220, 38, 38, 0.5);
  --blue: #2563eb; --blue-bg: rgba(37, 99, 235, 0.08); --blue-border: rgba(37, 99, 235, 0.5);
  --purple: #9333ea; --purple-bg: rgba(147, 51, 234, 0.06); --purple-b2: rgba(147, 51, 234, 0.08); --purple-border: rgba(147, 51, 234, 0.5);
  --indigo: #7c3aed; --indigo-bg: rgba(124, 58, 237, 0.06); --indigo-border: rgba(124, 58, 237, 0.5);
  --sky: #0284c7; --sky-bg: rgba(2, 132, 199, 0.06); --sky-border: rgba(2, 132, 199, 0.5);
}

[data-theme="dark"] {
  --card-bg: rgba(30, 30, 30, 0.4);
  --bg-color: #050505;
  --text-color: #f7fafc;
  --text-muted: rgba(255, 255, 255, 0.6);
  --bg-secondary: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.05);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --orb-1: #4a1c03;
  --orb-2: #2c1e0b;
  --orb-3: #662200;
  --modal-bg: rgba(30, 30, 30, 0.6);
}

/* ========== 字体 ========== */
/* 全局字体栈（项目自维护）：Inter（拉丁）+ 思源黑体 Noto Sans SC（中文），经 jsDelivr 异步加载、浏览器长缓存 */

/* ========== 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter Variable', 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-optical-sizing: auto;
}

html { font-size: 14px; }

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: color 0.3s, background-color 0.3s;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::-webkit-scrollbar { width: 0; height: 0; }

input, textarea, select, button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--card-bg) inset !important;
  -webkit-text-fill-color: var(--text-color) !important;
}

input::placeholder { color: var(--text-muted); opacity: 0.6; }

/* 隐藏 number input 的上下箭头 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hidden { display: none !important; }

/* ========== 动态背景 ========== */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-color);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.orb-1 { width: 500px; height: 500px; background: var(--orb-1); top: -100px; left: -100px; }
.orb-2 { width: 400px; height: 400px; background: var(--orb-2); top: 50%; right: -100px; animation-delay: -5s; }
.orb-3 { width: 350px; height: 350px; background: var(--orb-3); bottom: -50px; left: 30%; animation-delay: -10s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

/* ========== 导航栏 ========== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  backdrop-filter: none;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: all 0.3s;
}

.navbar.with-bg {
  background: var(--card-bg);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.nav-container {
  height: 64px;
  padding: 0 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left { flex: 1; }
.nav-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }

.nav-right .nav-links { display: flex; gap: 32px; margin-right: 8px; }

.nav-brand { font-size: 1.2rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.brand-senflare, .brand-proxy {
  background: var(--custom-primary-background);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link:hover { color: var(--primary-color); }

/* ========== 搜索弹窗 ========== */

.theme-toggle, .github-link {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  text-decoration: none;
}

.theme-toggle:hover, .github-link:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

/* ========== 按钮 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--custom-primary-background);
  color: #fff !important;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px var(--primary-30);
}

.btn-outline {
  background: var(--custom-primary-background);
  border: none;
  color: #fff;
}

.btn-outline:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 12px var(--primary-30);
}

.btn-tcping {
  background: transparent !important;
  border: 1.5px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  box-shadow: none !important;
}

.btn-tcping:hover {
  background: var(--primary-05) !important;
  filter: none !important;
}

/* ========== 页面切换 ========== */
#app { flex: 1; }
.page, #page-home { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease-in-out; }
#page-home.active { display: flex; flex-direction: column; min-height: calc(100vh - 64px - 85px); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 首页 ========== */

.hero-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 0;
}

.hero-content { max-width: 900px; width: 100%; }

/* ========== 分页控件（反代节点页） ========== */

.pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .pagination-row { flex-wrap: nowrap; gap: 6px; }
}

.pagination button {
  height: 34px;
  min-width: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination button:hover:not(:disabled) {
  border-color: var(--primary-color);
  background: var(--primary-05);
  color: var(--primary-color);
}

.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination button.active {
  background: var(--custom-primary-background);
  color: #fff;
  border-color: var(--primary-color);
  height: 34px;
}

.page-ellipsis {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 反代节点分页：自定义跳转页 */
.jump-box {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  font-family: 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', 'Inter Variable', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.jump-box:focus-within { border-color: var(--primary-color); }
.jump-label { font-weight: 400; }
.jump-box input {
  width: 40px;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-color);
  text-align: center;
  font-size: 0.85rem;
  -moz-appearance: textfield;
}

/* ========== 文档页面 ========== */
.docs-container {
  padding: 84px 24px 40px;
}
.docs-content { max-width: 1200px; margin: 0 auto; }

.docs-content h2 { font-size: 1.8rem; margin-top: 48px; margin-bottom: 16px; color: var(--text-color); }
.docs-content p { line-height: 1.8; color: var(--text-color); margin-bottom: 16px; }
.docs-content ul { list-style: none; padding-left: 0; }

/* 关于我们页：二级标题统一渐变色、小一号（首个标题去掉大顶距） */
#page-about .docs-content h2 {
  font-size: 1.5rem;
  background: var(--custom-primary-background);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 16px;
}
#page-about .docs-content h2:first-child { margin-top: 8px; }

.docs-content ul li {
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text-color);
}

.docs-content .about-github { list-style: none; }
    .docs-content .about-github li { position: static; display: flex; align-items: center; gap: 8px; padding: 6px 0 6px 0; }
    .docs-content .about-github li::before { content: none !important; }
    .docs-content .about-github svg { color: var(--text-muted); flex-shrink: 0; }
    .docs-content .about-github li a { display: inline-flex; align-items: center; gap: 8px; }
    .docs-content .about-github li a:hover svg, .docs-content .about-github li:hover svg { color: var(--primary-color); }

    .docs-content ul li::before {
  content: '\2022';
  position: absolute;
  left: 8px;
  color: var(--primary-color);
  font-weight: bold;
}

.docs-content a { color: var(--primary-color); text-decoration: none; }
.docs-content a:hover { text-decoration: underline; }

.code-block {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--primary-color);
  overflow-x: auto;
}

/* 统一输入/下拉/地址框基础样式（各控件复用，仅覆盖差异） */
.ui-field {
  height: 40px;
  display: flex; align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.82rem; font-weight: 500;
  box-sizing: border-box;
}
.ui-field:focus-within { border-color: var(--primary-color); }

.syntax-table { 
  width: 100%; 
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0; 
  font-size: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.syntax-table th {
  text-align: left;
  padding: 12px;
  background: var(--primary-08); /* 表头主题橙透明底色 */
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.syntax-table td { padding: 12px; border-bottom: 1px solid var(--border-color); color: var(--text-color); }
.syntax-table td .fmt-row { display: block; margin: 6px 0; line-height: 1.9; }

.syntax-table tr:last-child td { border-bottom: none; }

.syntax-table code {
  background: var(--primary-10);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--primary-color);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .nav-right .nav-links { display: none; }
  .nav-left, .nav-right { flex: 0; }
  .nav-container { justify-content: space-between; }
  #page-home.active { min-height: calc(100vh - 64px - 85px); }
  .hero-container { flex: 1; display: flex; align-items: center; justify-content: center; }
  .docs-container { padding: 84px 16px 40px; }
  .docs-content h2 { font-size: 1.5rem; }
  .syntax-table { font-size: 0.85rem; }
  .syntax-table th, .syntax-table td { padding: 8px; }
  
  /* 移动端卡片样式 */
}

/* ========== 移动端抽屉菜单 ========== */
.menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.menu-toggle:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

.drawer-overlay {
  position: fixed;
  top: 64px;
  width: 100%;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.drawer-overlay.show {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: fixed;
  top: 64px;
  width: 100%;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  z-index: 1100;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s;
}

[data-theme="dark"] .drawer {
  background: #1e1e1e;
}

.drawer.show {
  max-height: calc(100vh - 64px);
}

.drawer-content {
  padding: 8px;
  overflow-y: auto;
}

.drawer-link {
  display: block;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 1rem;
}

.drawer-link:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-container { padding: 0 20px; }
}

/* ========== 版权信息 ========== */
.copyright {
  text-align: center;
  height: 64px;
  line-height: 64px;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* ============================================================
 * 以下为从 index.html 内联 <style> 迁移过来的页面组件样式（主题橙 #FF6901）
 * ============================================================ */

    /* ========== CF 面板组件（沿用 Senflare 视觉变量） ========== */
    .glass-card {
      background: var(--card-bg);
      backdrop-filter: blur(25px);
      border: 1px solid var(--border-color);
      border-radius: 20px;
      box-shadow: var(--shadow);
    }
    .nav-link.active { color: var(--primary-color); }
    .drawer-link.active { color: var(--primary-color); background: var(--primary-06); }

    .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
    .panel-title {
      font-size: 1rem; font-weight: 800;
      background: var(--custom-primary-background);
      -webkit-background-clip: text; background-clip: text;
      -webkit-text-fill-color: transparent; color: transparent;
    }
    .panel-sub { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
    .panel-inner { padding: 18px; }

    .grid-tip { text-align: center; color: var(--text-muted); padding: 24px 0; font-size: 0.9rem; }

    /* ========== Toast ========== */
    #toastWrap {
      position: fixed; top: 80px; left: 50%; transform: translateX(-50%);
      z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center;
      pointer-events: none;
    }
    .toast {
      pointer-events: auto;
      background: var(--card-bg); backdrop-filter: blur(20px);
      border: 1.5px solid var(--primary-color); color: var(--primary-color);
      padding: 10px 20px; border-radius: 12px; font-size: 0.88rem; font-weight: 500;
      box-shadow: var(--shadow); white-space: pre-line;
      animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      max-width: 90vw;
    }
    .toast.error { border-color: var(--warn); }
    @keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
    @keyframes toastOut { to { opacity: 0; transform: translateY(-16px); } }

    /* ========== 反代检索（FOFA ProxyIP 搜索） ========== */
    #page-search .docs-content { max-width: 1200px; display: flex; flex-direction: column; gap: 16px; }  /* 宽度对齐 */
    :root { --text-main: #333; }
    [data-theme="dark"] { --text-main: #f7fafc; }
    .group-card {
      background: var(--card-bg); backdrop-filter: blur(25px);
      border: 1px solid var(--border-color); border-radius: 16px;
      padding: 18px; box-shadow: var(--shadow);
      position: relative; z-index: 10;   /* 抬起层级，避免下拉面板被下方卡片遮挡 */
    }
    .group-name {
      display: flex; align-items: center; gap: 10px;
      font-weight: 700; font-size: 1.05rem; color: var(--text-color);
      margin-bottom: 16px;
    }
    .group-name .tag {
      background: var(--primary-12); color: var(--primary-color);
      font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 6px;
    }
    .action-area { display: flex; align-items: center; gap: 10px; }
    .url-box { gap: 8px; }
    .url-text { font-size: 0.85rem; }
    .copy-btn {
      height: 40px; padding: 0 20px; border: none; border-radius: 10px;
      background: var(--custom-primary-background); color: #fff;
      font-weight: 600; font-size: 0.9rem; cursor: pointer;
      transition: all 0.2s; white-space: nowrap; flex-shrink: 0;
    }
    .copy-btn:hover { filter: brightness(1.1); box-shadow: 0 4px 12px var(--primary-30); }
    .link-row { display: flex; margin-top: 12px; }

    /* 多选下拉（带勾选）——触发器复用 ui-field 基础样式 */
    .ms { position: relative; }
    .ms-trigger {
      width: 100%;
      display: flex; align-items: center; gap: 6px;
      color: var(--text-muted);
      font-family: 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', 'Inter Variable', sans-serif;
      font-size: 0.82rem; font-weight: 500; cursor: pointer; transition: border-color 0.2s;
    }
    .ms-trigger:hover, .ms.open .ms-trigger { border-color: var(--primary-color); }
    .ms-label, .ms-value { font-weight: 500; white-space: nowrap; color: var(--text-muted); font-variant-numeric: tabular-nums; font-family: inherit; }
    .ms-label { flex-shrink: 0; }
    .ms-value { flex: 1; overflow: hidden; text-overflow: ellipsis; text-align: left; }
    .ms-caret { color: var(--text-muted); }
    .ms-panel {
      position: absolute; top: calc(100% + 6px); left: 0; z-index: 70;
      background: var(--modal-bg); backdrop-filter: blur(25px);
      border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow);
      padding: 8px; display: none;
      width: 100%;   /* 面板整格展开，上方线条/按钮居右拉满 */
    }
    .ms.open .ms-panel { display: block; }
    .ms-list { max-height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
    .ms-opt {
      display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px;
      cursor: pointer; font-size: 0.82rem; color: var(--text-color); transition: background 0.15s;
    }
    .ms-opt:hover { background: var(--primary-06); }
    .ms-opt input {
      appearance: none; -webkit-appearance: none;
      width: 15px; height: 15px; margin: 0;
      border: 1.5px solid var(--primary-55); border-radius: 4px;
      background: transparent; cursor: pointer; position: relative; flex-shrink: 0;
      vertical-align: middle; box-sizing: border-box;
    }
    .ms-opt input:hover { border-color: var(--primary-color); }
    .ms-opt input:checked { background: var(--primary-color); border-color: var(--primary-color); }
    .ms-opt input:checked::after {
      content: ''; position: absolute; left: 4px; top: 1px;
      width: 4px; height: 8px;
      border: solid #fff; border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    .ms-actions {
      display: flex; justify-content: flex-end; gap: 8px;
      padding-top: 8px; margin: 4px 8px 0; /* 不需要分隔线 */
    }
    .ms-clear, .ms-done { height: 30px; padding: 0 12px; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
    .ms-clear { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); }  /* 清空：主题色 1px 线框 */
    .ms-done { border: none; background: var(--custom-primary-background); color: #fff; }

    /* 端口 / IPv4/6 与多选下拉同框样式（复用 ui-field，覆盖差异） */
    .sel-box { gap: 6px; }
    .sel-box:focus-within { border-color: var(--primary-color); }
    .sel-box select {
      width: 100%; font-size: 0.82rem; font-weight: 600; color: var(--text-main);
      appearance: none; -webkit-appearance: none; cursor: pointer;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23FF6901' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-position: right 6px center; background-size: 10px;
      padding-right: 20px;
    }
    .ms-opt .ms-flag { width: 20px; height: 13px; object-fit: cover; border-radius: 2px; flex-shrink: 0; }
    .ms-opt.ms-empty {
      justify-content: center; text-align: center;
      color: var(--text-muted); cursor: default; padding: 14px 8px;
    }

    /* 单选下拉（与多选同款样式）：点击选中、无复选框 */
    .ms-opt.single { justify-content: space-between; }
    .ms-opt.single:hover { background: var(--primary-08); }
    .ms-opt.single.active { background: var(--primary-12); color: var(--primary-color); font-weight: 600; }

    /* 语法说明 */
    .help-card { padding: 18px; }
    .help-list { list-style: none; padding: 0; margin: 0 0 4px; }
    .help-list li { padding: 6px 0 6px 18px; position: relative; font-size: 0.85rem; color: var(--text-color); line-height: 1.7; }
    .help-list li::before { content: '\2022'; position: absolute; left: 2px; color: var(--primary-color); font-weight: 700; }
    .help-list code, .help-table code {
      background: var(--primary-10); color: var(--primary-color);
      padding: 1px 6px; border-radius: 4px; font-size: 0.8rem;
    }
    .help-table-wrap { overflow-x: auto; }
    .help-table {
      width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.85rem;
      border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden;
    }
    .help-table th { text-align: left; padding: 9px 12px; background: var(--primary-08); color: var(--text-muted); font-weight: 700; }
    .help-table td { padding: 8px 12px; border-top: 1px solid var(--border-color); color: var(--text-color); }

    /* ========== 反代域名列表 ========== */
    #page-domains .docs-content { max-width: 1200px; }  /* 与面板宽度对齐 */
    .dom-group { margin-bottom: 24px; }
    .dom-group-title {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      font-weight: 700; font-size: 1.05rem; color: var(--primary-color);
      margin-bottom: 12px;
    }
    .dom-grp { display: inline-flex; align-items: center; gap: 8px; }
    .dom-bar { width: 3px; height: 15px; border-radius: 2px; background: var(--custom-primary-background); }
    .dom-list { display: flex; flex-direction: column; gap: 8px; }
    .dom-row {
      display: flex; align-items: center; gap: 16px; flex-wrap: wrap;   /* 与左右 16px padding 对称 */
      background: rgba(0, 0, 0, 0.02);   /* 浅色：极淡灰，仅留一丝卡片边界 */
      backdrop-filter: blur(25px);
      border-radius: 12px;
      padding: 12px 16px; transition: all 0.2s;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    [data-theme="dark"] .dom-row {
      background: rgba(255, 255, 255, 0.08);  /* 深色：比 #050505 背景更亮 */
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    }
    .dom-row:hover { box-shadow: 0 4px 16px var(--primary-12); }
    /* 去掉「检测」链接 hover 下划线（.docs-content a:hover 优先级更高会带出下划线） */
    #page-domains .dom-actions a:hover,
    #page-domains .dom-actions a:focus { text-decoration: none; }
    .dom-flag {
      width: 42px; flex-shrink: 0; line-height: 1;
      display: flex; align-items: center; justify-content: center;
    }
    .dom-flag img {
      width: 36px; height: 24px; object-fit: cover;
      border-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }
    /* meta 行：区域/维护周期标签与值统一字体 */
    .dom-meta .meta-lbl { color: var(--text-muted); }
    .dom-main { flex: 1; min-width: 0; }
    .dom-name {
      font-weight: 500; font-size: 0.85rem; color: var(--text-color);
      letter-spacing: 0.2px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .dom-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
    .dom-meta .sep { opacity: 0.5; margin: 0 6px; }
    .dom-actions { display: flex; gap: 8px; flex-shrink: 0; }
    .dom-actions .btn { height: 34px; font-size: 0.82rem; border-radius: 8px; padding: 0 14px; }

    /* ========== 反代节点页 ========== */
    /* 与检测/检索/域名/测速等页共用 docs-container + docs-content 骨架，保证卡片宽度逐像素一致 */
    .nodes-content { display: flex; flex-direction: column; gap: 20px; }

    /* 上 dock 栏 */
    .node-dock { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border-color); }
    .dock-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    .dock-title {
      font-size: 1rem; font-weight: 800; white-space: nowrap;
      background: var(--custom-primary-background);
      -webkit-background-clip: text; background-clip: text;
      -webkit-text-fill-color: transparent; color: transparent;
    }
    .dock-stat {
      display: inline-flex; align-items: center; gap: 3px;
      font-size: 0.85rem; background: transparent;
      border: 1px solid var(--primary-55); border-radius: 999px;
      padding: 4px 12px; white-space: nowrap;
    }
    .dock-stat b, .dock-stat i {
      color: var(--primary-color); font-size: 0.85rem; font-weight: 500; white-space: nowrap;
      font-family: 'Noto Sans SC Variable', 'Source Han Sans SC', '思源黑体', 'PingFang SC', sans-serif;
      font-variant-numeric: tabular-nums; line-height: 1;
    }
    .dock-stat i { font-style: normal; }
    .src-toggle {
      display: inline-flex; flex-wrap: wrap; padding: 3px; gap: 3px;
      background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px;
    }
    .src-btn {
      border: none; background: transparent; cursor: pointer;
      height: 30px; padding: 0 12px; border-radius: 8px;
      font-size: 0.8rem; font-weight: 600; color: var(--text-muted);
      transition: all 0.2s; white-space: nowrap;
    }
    .src-btn:hover { color: var(--primary-color); background: var(--primary-06); }
    .src-btn.active { background: var(--custom-primary-background); color: #fff; box-shadow: 0 2px 8px var(--primary-25); }

    /* 反代节点 / 反代 API tab 切换（沿用 src-toggle 分段样式，独立卡片） */
    .node-tabs { display: flex; padding: 14px 18px; }
    .node-panel { display: none; }
    .node-panel.active { display: block; animation: fadeIn 0.3s ease-in-out; }

    .node-dock-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .dock-speed {
      width: 34px; height: 34px; padding: 0; border-radius: 10px;
      border: 1px solid var(--border-color); background: var(--card-bg);
      color: var(--primary-color); cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
    }
    .dock-speed:hover { background: var(--primary-08); border-color: var(--primary-45); }
    .dock-speed:active { transform: scale(0.94); }
    #nodeDockFilter .ms-trigger { height: 34px; }

    /* 节点卡片：左国旗 / IP 上 / 端口·国家 下 / 右测试 */
    .node-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; padding: 18px; }
    .node-grid .grid-tip { grid-column: 1 / -1; align-self: center; } /* 加载/空提示跨整行居中 */
    .node-grid.empty { grid-template-columns: 1fr; min-height: 240px; place-content: center; }
    .node-grid.empty .grid-tip { grid-column: 1 / -1; }
    .node-list-wrap.collapsed { display: none; } /* 折叠：隐藏节点列表与分页 */
    .node-card {
      display: flex; align-items: center; gap: 12px;
      background: var(--card-bg); backdrop-filter: blur(25px);
      border: 1px solid var(--border-color); border-radius: 14px;
      padding: 14px 16px; transition: all 0.2s;
      cursor: pointer; user-select: none;
    }
    .node-card:hover { border-color: var(--primary-40); box-shadow: var(--shadow); transform: translateY(-1px); }
    .node-card:active { transform: scale(0.98); border-color: var(--primary-70); box-shadow: 0 0 14px var(--primary-25); }
    .node-flag-img { width: 36px; height: 24px; object-fit: cover; border-radius: 4px; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
    .node-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
    .node-ip {
      font-size: 0.9rem; font-weight: 700; color: var(--text-color);
      letter-spacing: 0.3px;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .node-meta { display: flex; align-items: center; gap: 4px; }
    .meta-chip {
      display: inline-flex; align-items: center; gap: 3px;
      background: var(--ok-bg); border: 1px solid var(--ok-border);
      border-radius: 999px; padding: 1px 6px;
      font-size: 0.66rem; font-weight: 600; color: var(--ok);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .meta-chip svg { width: 11px; height: 11px; color: var(--ok); flex-shrink: 0; }
    /* 检测结果里不同信息 chip 的不同主题色（复用节点 meta-chip 语义） */
    .meta-chip.sc-asn { border-color: var(--sky-border); color: var(--sky); background: var(--sky-bg); }
    .meta-chip.sc-asn svg { color: var(--sky); }
    .meta-chip.sc-org { border-color: var(--indigo-border); color: var(--indigo); background: var(--indigo-bg); }
    .meta-chip.sc-org svg { color: var(--indigo); }
    .meta-chip.sc-exit { border-color: var(--err-border); color: var(--err); background: var(--err-bg); }
    .meta-chip.sc-exit svg { color: var(--err); }
    .node-test {
      flex-shrink: 0; width: 28px; height: 28px; padding: 0;
      border: none; background: transparent;
      color: var(--primary-color); border-radius: 999px; cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
    }
    .node-test svg { width: 14px; height: 14px; }
    .node-test:hover { background: var(--primary-08); }
    .node-test:disabled { opacity: 0.45; cursor: default; }
    .node-test .ms-text { font-size: 0.7rem; font-weight: 600; }
    .node-test.testing { color: var(--text-muted); }
    .node-test.ok, .node-test.mid, .node-test.fail {
      width: auto; min-width: 46px; height: 20px; padding: 0 6px;
      border: 1px solid; border-radius: 999px; font-size: 0.7rem; font-weight: 500;
    }
    .node-test.ok, .detect-latency.ok { color: var(--ok); border-color: var(--ok-b2); background: var(--ok-bg); }
    .node-test.mid, .detect-latency.mid { color: var(--mid); border-color: var(--mid-border); background: var(--mid-bg); }
    .node-test.warn, .node-test.fail, .detect-latency.warn { color: var(--warn); border-color: var(--warn-border); background: var(--warn-bg); }
    .meta-stack { font-size: 0.66rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
    .meta-stack.ipv4 { color: var(--blue); border: 1px solid var(--blue-border); background: var(--blue-bg); }
    .meta-stack.ipv6 { color: var(--purple); border: 1px solid var(--purple-border); background: var(--purple-b2); }

    /* 节点详情弹窗：保留磨砂玻璃质感（backdrop-filter 由 GPU 合成，正常硬件无感）；动画 0.2s 微调到 0.15s 更跟手 */
    .check-modal {
      position: fixed; inset: 0; z-index: 2000;
      display: flex; align-items: center; justify-content: center;
      opacity: 0; pointer-events: none; transition: opacity 0.15s;
    }
    .check-modal.show { opacity: 1; pointer-events: auto; }
    .check-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px) saturate(1.3); }
    .check-box {
      position: relative; width: min(640px, 92vw); max-height: 80vh;
      display: flex; flex-direction: column; overflow: hidden;
      background: var(--modal-bg); backdrop-filter: blur(24px) saturate(1.3);
      border: 1px solid var(--border-color); border-radius: 16px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      transform: translateY(-10px); transition: transform 0.15s;
    }
    .check-modal.show .check-box { transform: translateY(0); }
    .check-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border-color); font-weight: 700; color: var(--text-color); }
    .check-body {
      flex: 1; overflow: auto; padding: 10px 20px 16px;
      background: #ffffff; color: #222;
    }
    .check-loading { text-align: center; padding: 28px 0; color: #64748b; }
    .check-row {
      display: flex; justify-content: space-between; gap: 16px;
      padding: 8px 0; border-bottom: 1px dashed #e5e7eb;
      font-size: 0.85rem;
    }
    .check-row:last-child { border-bottom: none; }
    .check-k { color: #64748b; flex-shrink: 0; }
    .check-v { color: #1f2937; text-align: right; word-break: break-all; }
    .check-actions button { height: 34px; }
    .check-actions .btn-cancel {
      padding: 0 18px;
      border: 1.5px solid var(--primary-color); background: transparent; color: var(--primary-color);
      border-radius: 10px; font-size: 0.88rem; font-weight: 600; cursor: pointer; transition: all 0.2s;
    }
    .check-actions .btn-cancel:hover { background: var(--primary-06); }
    .check-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-color); }

    /* 翻页 dock（复用 .pagination 样式） */
    .node-page-foot { padding: 4px 18px 20px; }
    .node-page-foot .pagination { margin-top: 0; }
    .node-page-foot .pagination-row { gap: 6px; flex-wrap: wrap; justify-content: center; }

    /* 反代 API */
    .api-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
    .api-field { display: inline-flex; gap: 8px; }
    .api-field input {
      width: 46px; text-align: center; font-weight: 400; color: var(--text-muted);
      font: inherit; /* 数量字体与全局统一，不另设等宽字体 */
    }
    .api-field input:focus, .api-field select:focus { outline: none; }
    .api-field select {
      border: none; background-color: transparent; height: auto;
      color: var(--text-color); font-size: 0.82rem; font-weight: 500;
      padding: 0 18px 0 0; cursor: pointer;
    }
    /* 反代 API 页控件统一定高 40px（ms-panel / 数量 / 格式） */
    .api-url-row {
      display: flex; align-items: stretch; gap: 8px; flex-wrap: nowrap;
      margin: 0 0 12px; color: var(--text-color);
    }
    .api-url-row .code-block {
      flex: 1; margin: 0; padding: 0 14px;
      color: var(--text-muted); font-size: 0.85rem;
    }
    .api-url-row .btn { flex-shrink: 0; height: 40px; min-width: 96px; }
    #nodePanel-api .panel-inner > .panel-head { margin-top: 4px; }
    #apiSampleUrl {
      margin: 0; padding: 0 14px;
      color: var(--text-muted); font-size: 0.85rem;
    }
    .api-out {
      width: 100%; min-height: 130px; border: none; outline: none; resize: vertical;
      background: var(--bg-secondary); border-radius: 12px; padding: 14px;
      font-size: 0.85rem;
      color: var(--text-color); line-height: 1.6; margin-bottom: 20px;
    }
    .api-out::placeholder { text-align: center; line-height: 100px; }

    @media (max-width: 640px) {
      .node-grid { grid-template-columns: 1fr; padding: 14px; }
      .node-dock { padding: 12px 14px; }
      .src-btn { padding: 0 10px; font-size: 0.76rem; }
    }
  

/* ========== 反代检测 ========== */
.detect-content { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.detect-badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
  background: var(--bg-secondary); border: 1px solid var(--border-color);
  border-radius: 999px; padding: 5px 12px;
}
.detect-badge::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--ok); box-shadow:0 0 0 3px var(--ok-soft); }
.detect-hint { font-size: 0.78rem; color: var(--text-muted); padding-left: 8px; }
.detect-results { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
/* 检测结果防溢出：长 ASN / 组织名 / 出口 IP 不把卡片撑出容器，chip 允许换行收缩 */
#detectResults { min-width: 0; }
#detectResults > .detect-item { min-width: 0; max-width: 100%; }
.detect-item .node-meta { flex-wrap: wrap; gap: 4px; } /* 对齐小卡片 .node-meta 的 4px 间距，保留 wrap 兜底长内容 */
.detect-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card-bg); backdrop-filter: blur(25px);
  border: 1px solid var(--border-color); border-radius: 14px;
  padding: 14px 16px; transition: all 0.2s;
  cursor: pointer; user-select: none;
}
.detect-item:hover { border-color: var(--primary-40); box-shadow: var(--shadow); transform: translateY(-1px); }
.detect-item:active { transform: scale(0.98); }
.detect-item .node-ip { cursor: pointer; }
.detect-latency {
  flex-shrink: 0; border-radius: 999px; padding: 2px 10px; height: 20px;
  display: inline-flex; align-items: center;
  font-size: 0.7rem; font-weight: 500; white-space: nowrap;
  border: 1px solid; background: transparent;
}
/* 延迟角标配色复用上方 node-test / detect-latency 共用的一组状态角标色（ok/mid/warn） */
.detect-empty { text-align: center; color: var(--text-muted); padding: 24px 0; font-size: 0.9rem; }
/* 反代检测：多行输入 + 历史下拉 */
.detect-his-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: auto; z-index: 70;
  background: var(--modal-bg); backdrop-filter: blur(25px);
  border: 1px solid var(--border-color); border-radius: 12px; box-shadow: var(--shadow);
  padding: 8px; display: flex; flex-direction: column; gap: 2px;
  width: min(340px, calc(100vw - 48px)); max-height: 240px; overflow-y: auto;
}
.detect-his-title { font-size: 0.72rem; font-weight: 700; color: var(--primary-color); padding: 2px 8px 6px; }
.detect-his-item {
  width: 100%; border: none; background: transparent; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  text-align: left; padding: 7px 10px; border-radius: 8px;
  font-size: 0.82rem; color: var(--text-color); transition: all .15s;
}
.detect-his-ip {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: 'Noto Sans SC Variable', 'Inter Variable', 'Source Han Sans SC', sans-serif;
  font-variant-numeric: tabular-nums;
}
.detect-his-badge {
  flex-shrink: 0; font-size: .7rem; font-weight: 700; line-height: 1;
  color: var(--primary-color); background: var(--primary-10);
  border: 1px solid var(--primary-35); border-radius: 999px; padding: 3px 8px;
}
.detect-his-item:hover { background: var(--primary-08); color: var(--primary-color); }

/* ========== 反代测速页 ========== */
#page-speed .docs-content { max-width: 1200px; display: flex; flex-direction: column; gap: 16px; }

/* CFData-WEB 参考卡片 */
.repo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* .docs-content a 会覆盖 .copy-btn/.repo-link 的文字色，这里提高权重保证按钮白字 */
.docs-content .repo-link { text-decoration: none !important; display: inline-flex; align-items: center; gap: 6px; color: #fff; }
.docs-content .repo-link:hover { filter: brightness(1.1); box-shadow: 0 4px 12px var(--primary-30); text-decoration: none; }
.repo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 20px; }
.repo-item {
  background: var(--card-bg); backdrop-filter: blur(25px);
  border: 1px solid var(--border-color); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.repo-item:hover { border-color: var(--primary-40); box-shadow: var(--shadow); }
.repo-ico {
  width: 46px; height: 46px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem; line-height: 1;
  background: var(--primary-08); border-radius: 10px;
}
.repo-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.repo-item b { color: var(--text-color); font-size: 0.9rem; }
.repo-item i { font-style: normal; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }
.repo-url-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 4px; }
.repo-url-row .code-block {
  flex: 1; padding: 0 14px;
  color: var(--text-muted); font-size: 0.85rem; cursor: pointer;
}

/* 测速教程步骤 */
.tut-step { display: flex; gap: 14px; margin: 0 0 20px; }
.tut-step:last-child { margin-bottom: 0; }
.tut-no {
  flex-shrink: 0; width: 26px; height: 26px; margin-top: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 800; color: #fff;
  background: var(--custom-primary-background); border-radius: 999px;
  box-shadow: 0 2px 8px var(--primary-25);
}
.tut-body { flex: 1; min-width: 0; }
.tut-title { font-size: 0.9rem; font-weight: 700; color: var(--text-color); margin: 2px 0 6px; }
.tut-body p { line-height: 1.8; color: var(--text-color); font-size: 0.9rem; margin-bottom: 8px; }
.tut-body .code-block { margin: 0 0 10px; }
.tut-body code {
  background: var(--primary-10); color: var(--primary-color);
  padding: 1px 6px; border-radius: 4px;
  font-size: 0.8rem;
}
.tut-body a { color: var(--primary-color); text-decoration: none; }
.tut-body a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .repo-grid { grid-template-columns: 1fr; }
}/* 反代检测 v2（编辑区 + 批量 + 历史 + 指标图标 + 独立进度卡 + 节点式结果） */
.det-editor { position: relative; display: flex; align-items: stretch; gap: 8px; transform: translateZ(0); z-index: 5; }  /* translateZ 锁锚点 + 卡内抬升：面板不被同卡后面的指标卡盖住 */
#page-detect .glass-card:has(#detEditor) { z-index: 10; }  /* 检测台卡抬升层叠，防结果卡(backdrop-filter 建上下文、DOM靠后)盖住历史下拉 */
.det-editor textarea {
  flex: 1; min-width: 0; min-height: 40px; max-height: 220px; resize: none;
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: 10px; padding: 9px 14px;
  color: var(--text-color); font-size: .9rem; line-height: 1.5; transition: border-color .2s;
}
.det-editor textarea:focus { border-color: var(--primary-color); }
.det-editor.batch textarea { min-height: 120px; resize: vertical; }
.det-editor .btn { flex-shrink: 0; height: 40px; white-space: nowrap; }
    #detectBtn { min-width: 80px; padding: 0 10px; position: relative; z-index: 71; }   /* 高于历史下拉的 70，面板开着也不挡点击 */
.det-icon-btn {
  width: 40px; height: 40px; padding: 0; border-radius: 10px;
  border: 1px solid var(--border-color); background: var(--card-bg);
  color: var(--primary-color); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.det-icon-btn:hover { background: var(--primary-08); border-color: var(--primary-45); }
.det-icon-btn.active { color: #fff; background: var(--custom-primary-background); border-color: transparent; }
.det-icon-btn:active { transform: scale(0.94); }
.det-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.det-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.det-metric {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 12px;
  background: var(--card-bg); backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  border-radius: 12px; padding: 14px 16px; min-height: 68px;
}
.det-metric-ic {
  flex: 0 0 auto; width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--custom-primary-background); border-radius: 12px;
}
.det-metric-ic svg { width: 22px; height: 22px; color: #fff; }
.det-metric > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.det-metric span { font-size: .72rem; color: var(--text-muted); font-weight: 700; white-space: nowrap; }
.det-metric strong { font-size: 1rem; color: var(--text-color); }
.det-progress-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-muted); font-weight: 700; margin-bottom: 10px; }
.det-track { height: 8px; border-radius: 999px; background: var(--bg-secondary); overflow: hidden; }
.det-bar {
  height: 100%; width: 0; border-radius: 999px;
  background: var(--custom-primary-background);
  box-shadow: 0 0 8px var(--primary-45);
  transition: width .25s ease;
}
.det-progress-sub { font-size: .78rem; color: var(--text-muted); margin-top: 8px; }
/* 检测统计并入进度卡：首格去顶距；进度区独立边框盒（与 .det-metric 同风格） */
.det-progress-card .det-metrics { margin-top: 0; }
.det-progress-box {
  background: var(--card-bg); backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  border-radius: 12px; padding: 14px 16px; margin-top: 10px;
}
.det-bar.paused {
  background: var(--bg-secondary); box-shadow: none;
  background-image: repeating-linear-gradient(45deg, var(--primary-30) 0 6px, transparent 6px 12px);
}
.detect-item .node-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; } /* 与小卡片 .node-info 完全一致 */
.det-flag-ph {
  width: 36px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); border: 1px dashed var(--border-color); border-radius: 4px; background: var(--bg-secondary);
}
.flag-fallback {  /* 国旗图兜底：flagcdn 加载失败时替换为地区码文字（不依赖网络） */
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 16px; padding: 0 4px;
  border: 1px dashed var(--border-color); border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  color: var(--text-muted); background: var(--bg-secondary);
}
.det-flag-ph svg { width: 16px; height: 16px; }
@media (max-width: 700px) { .det-metrics { grid-template-columns: repeat(2, 1fr); } }

/* 反代检测 v3（节点式结果 + 落地IP 4色） */

/* ========== 首页 Hero ========== */
#page-home .container {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 36px;
  padding: 40px 24px;
}
#page-home .container h1 {
  font-size: 2.9rem; font-weight: 800; letter-spacing: 1px;
  background-size: 200% auto;
  animation: gradientFlow 5s ease infinite, fadeInUp .6s ease forwards;
}
#page-home .gradient-text {
  background: var(--custom-primary-background);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
@keyframes gradientFlow {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}

#page-home .hero-desc {
  margin: 0; font-size: 1rem; line-height: 1.8; color: var(--text-muted);
  max-width: 720px;
}

#page-home .hero-stats {
  display: flex; align-items: center; gap: 32px; margin: 0; flex-wrap: wrap; justify-content: center;
}
#page-home .stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#page-home .stat-value { font-size: 1.7rem; font-weight: 800; color: var(--text-color); white-space: nowrap; background: var(--custom-primary-background); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
#page-home .stat-label { font-size: 0.85rem; color: var(--text-muted); }
#page-home .stat-divider { width: 1px; height: 40px; background: var(--border-color); }

#page-home .hero-btns { display: flex; gap: 16px; margin-top: 0; flex-wrap: wrap; justify-content: center; }
#page-home .hero-btn {
  display: inline-flex; align-items: center; gap: 2px;
  height: 46px; padding: 0 20px; border-radius: 12px; font-size: 1rem; font-weight: 700;
  cursor: pointer; text-decoration: none; transition: all 0.2s;
}
#page-home .hero-btn.primary {
  background: var(--custom-primary-background); color: #fff; box-shadow: 0 6px 20px var(--primary-30);
}
#page-home .hero-btn.primary:hover { filter: brightness(1.1); transform: translateY(-2px); }
#page-home .hero-btn.secondary {
  background: transparent; color: var(--primary-color); border: 1.5px solid var(--primary-color);
}
#page-home .hero-btn.secondary:hover { background: var(--primary-06); transform: translateY(-2px); }

/* 入场动画（保留类名，供元素使用） */
.animate-fade-in-up { animation: fadeInUp .6s ease forwards; }
.delay-2 { animation-delay: .2s; opacity: 0; }
.delay-3 { animation-delay: .3s; opacity: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
