/* ==========================================================================
   TapeWeb —— 全局样式（查看器与上传页共用）
   设计语言参考 tapeout.link：柔光底 + 毛玻璃顶栏 + 白卡阴影层级 + 图标块
   配色沿用品牌绿松石（--accent），渐变端点接同族青色（--cyan）
   ========================================================================== */

:root {
  /* 底色与面板 */
  --bg: #f5f8f8;
  --panel: #ffffff;
  --surface-soft: #fafcfc;
  --border: #e4ebea;
  --line-soft: #eff4f3;
  --line-strong: #c3e2dc;   /* 卡片 hover 边框 */

  /* 文字 */
  --text: #12262a;
  --ink-2: #46595d;
  --muted: #7f9195;

  /* 品牌色：绿松石 + 青色 */
  --accent: #0e9f8a;
  --accent-2: #2fc2a6;
  --accent-dark: #0a816f;
  --accent-soft: #e8f6f3;
  --cyan: #14a0bd;
  --on-accent: #ffffff;

  /* 语义色 */
  --danger: #d64545;
  --ok: #1a9c5b;
  --warn: #c98a1b;

  /* 中性件 */
  --chip: #eef3f3;
  --hover: #f1f8f6;
  --glass: rgba(255, 255, 255, .76);
  --glass-2: rgba(255, 255, 255, .88);
  --glow-1: #e3f5f0;        /* body 左上光晕 */
  --glow-2: #ddf1f6;        /* body 右上光晕 */
  --grid: rgba(14, 159, 138, .05);
  --ring: rgba(47, 194, 166, .18);

  --radius: 12px;
  --r-lg: 18px;

  --sh-1: 0 1px 2px rgba(18, 38, 42, .04), 0 6px 16px -12px rgba(18, 38, 42, .2);
  --sh-2: 0 2px 6px rgba(18, 38, 42, .05), 0 16px 32px -20px rgba(18, 38, 42, .32);
  --sh-3: 0 22px 48px -28px rgba(6, 58, 50, .28), 0 2px 6px rgba(18, 38, 42, .04);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.22, .68, .28, 1);
}

* , *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

/* 横屏时不要自动放大字号 */
html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font: 13.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(820px 460px at 8% -8%, var(--glow-1) 0%, transparent 62%),
    radial-gradient(700px 410px at 98% 0%, var(--glow-2) 0%, transparent 58%),
    var(--bg);
}

/* 硅片方格底纹，只在页面上方淡淡透出 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(940px 520px at 50% 0%, #000 0%, transparent 76%);
          mask-image: radial-gradient(940px 520px at 50% 0%, #000 0%, transparent 76%);
}

::selection { background: var(--ring); }
a { color: inherit; }

/* 行内 SVG 图标：随字号缩放 */
.ico { width: 1em; height: 1em; display: block; flex: none; }

/* 图标块：卡片标题、统计卡共用 */
.icon-block {
  width: 30px; height: 30px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 17px;
  color: var(--accent);
  background: var(--accent-soft);
}
/* 步骤编号版：上传页用它替代纯图标 */
.icon-block--num { font-family: var(--mono); font-size: 14px; font-weight: 700; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 22px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-mark {
  width: 32px; height: 32px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 18px;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--accent-2), var(--accent-dark));
  box-shadow: 0 6px 14px -7px rgba(14, 159, 138, .85);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand-sub { color: var(--muted); font-size: 11.5px; }
.topbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
/* 链名长短两份：默认用长名，窄屏换缩写（见移动端段） */
.net-narrow { display: none; }
.net-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
/* 网络徽标前的呼吸绿点 */
.net-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 159, 138, .16);
}

/* 链切换：多链时显示按钮组，单链时变成一个普通徽标（样式复用 lang-switch） */
.chain-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass-2);
}
.chain-switch:empty { display: none; }
.chain-switch button {
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.chain-switch button:hover { color: var(--text); }
.chain-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- 主体 ---------- */
.page { position: relative; z-index: 1; max-width: 1440px; margin: 22px auto; padding: 0 22px; }
.page .card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  box-shadow: var(--sh-1);
}
.page h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.page h3 { margin: 0; font-size: 14.5px; letter-spacing: -.01em; }
.page .desc { color: var(--muted); margin: 0 0 8px; font-size: 12.5px; }
/* 翻页后滚回列表开头，让出 sticky 顶栏高度，避免首行被压住 */
#table, #sitesTable { scroll-margin-top: 76px; }

/* 卡片标题行：图标块 + 标题，右侧可放计数 */
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head--between { justify-content: space-between; flex-wrap: wrap; row-gap: 6px; }
/* 只给卡片的第一层标题行留出与正文的间距 */
.page .card > .card-head { margin-bottom: 6px; }

/* ---------- Hero（页面顶部标语条：徽标与标题同行，说明另起一行） ---------- */
.hero {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 12px;
  padding: 11px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background:
    radial-gradient(400px 200px at 4% -10%, #fff 0%, transparent 62%),
    linear-gradient(142deg, #ffffff 0%, #eef9f7 48%, #e6f6f9 100%);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
/* 右上角的电路走线点缀 */
.hero::after {
  content: "";
  position: absolute;
  top: -22px; right: -18px;
  width: 150px; height: 110px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(14, 159, 138, .16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 159, 138, .16) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent);
          mask-image: radial-gradient(closest-side, #000, transparent);
}
.hero > * { position: relative; z-index: 1; }
/* Hero 内的热门榜单：独占一行，常驻展示（不区分 tab） */
.hero__hot { flex: 1 1 100%; min-width: 0; margin-top: 10px; }
.hero__hot-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 4px;
  border-radius: 999px;
  border: 1px solid rgba(47, 194, 166, .3);
  background: var(--glass-2);
  font-size: 10px; font-weight: 600;
  color: var(--accent-dark);
}
.hero__badge i {
  display: grid; place-items: center;
  width: 15px; height: 15px;
  border-radius: 999px;
  background: var(--accent-soft);
}
.hero__badge .ico { width: 10px; height: 10px; }
.hero h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
/* 说明文字独占一行，字号压到最低一档 */
.hero__lead {
  flex: 1 1 100%;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease),
              background .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { border-color: var(--accent-2); color: var(--accent-dark); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 6px 14px -10px rgba(14, 159, 138, .9);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: 0 10px 20px -12px rgba(14, 159, 138, 1);
}
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-ico { width: 14px; height: 14px; flex: none; }
/* 开通容器入口：淡青底胶囊。保留形状辨识度，配色压到次要层级，不与顶栏主按钮争焦点 */
.btn-cta {
  padding: 8px 20px;
  border-radius: 999px;
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
}
.btn-cta:hover {
  border-color: var(--accent-2);
  background: var(--hover);
  color: var(--accent-dark);
}

/* ---------- 中英切换（分段开关） ---------- */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--glass-2);
}
.lang-switch button {
  min-width: 34px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- 输入 ---------- */
.input {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring); }

/* 带放大镜的搜索框：图标 + 无边框输入 */
.search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--glass-2);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.search:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring); }
.search__ico { font-size: 15px; color: var(--muted); }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  color: var(--text);
}
.search input::placeholder { color: var(--muted); }
.spacer { flex: 1; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  background: var(--surface-soft);
  border-bottom-color: var(--border);
}
th:first-child { border-radius: 8px 0 0 8px; }
th:last-child { border-radius: 0 8px 8px 0; }
tbody tr { transition: background .16s var(--ease); }
tbody tr:hover { background: var(--hover); }
td.mono, .mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
/* 操作列：两个网关按钮不换行；列宽不够时表格横向滚动，不挤压其他列 */
td.ops { white-space: nowrap; }
/* 操作列按钮：比 btn-sm 再收一档，避免撑宽表格 */
td.ops .btn { padding: 3px 9px; font-size: 11.5px; border-radius: 7px; }
td.ops .btn + .btn { margin-left: 6px; }
td.ops .btn-ico { width: 12px; height: 12px; }
/* 处理器、到期时间这类短字段不折行（长内容留给域名/容器列换行） */
td.nowrap { white-space: nowrap; }
#table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 表格内跳链（如区块号 → BscScan） */
.link { color: var(--accent-dark); text-decoration: none; }
.link:hover { color: var(--accent); text-decoration: underline; }

/* ---------- 状态徽标 ---------- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  background: var(--chip);
  color: var(--muted);
  white-space: nowrap;
}
.badge.ok { background: rgba(26, 156, 91, .12); color: var(--ok); }
.badge.warn { background: rgba(201, 138, 27, .14); color: var(--warn); }

/* ---------- 分类筛选条 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass-2);
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
}
.chip:hover { background: var(--hover); border-color: var(--line-strong); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip__n { font-size: 11.5px; opacity: .7; }

/* ---------- 统计卡（图标 + 数值） ---------- */
.grid2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--glass-2);
  box-shadow: var(--sh-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.stat:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
.stat__ico {
  width: 34px; height: 34px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 19px;
  color: var(--accent);
  background: var(--accent-soft);
}
.stat__body { min-width: 0; }
.stat-num {
  display: block;
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}
.stat-num--sm { font-size: 13px; }
.stat__label { font-size: 11.5px; color: var(--muted); }

/* ---------- 进度条 ---------- */
.progress { height: 8px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.progress > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  border-radius: 999px;
  transition: width .2s var(--ease);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: calc(26px + env(safe-area-inset-bottom, 0px));   /* 避开 iPhone 底部横条 */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(560px, calc(100vw - 32px));
  background: #12262a;
  color: #fff;
  padding: 10px 18px;
  border-radius: 11px;
  font-size: 13px;
  z-index: 100;
  box-shadow: var(--sh-2);
}
/* 左侧小圆点：报错/成功各一色，省掉额外的图标节点 */
.toast::before {
  content: "";
  width: 6px; height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent-2);
}
.toast.err { background: var(--danger); }
.toast.err::before { background: rgba(255, 255, 255, .85); }
.toast.ok { background: var(--ok); }
.toast.ok::before { background: rgba(255, 255, 255, .85); }

/* ---------- 面板切换（域名 / 站点两个扫描源） ---------- */
/* tabs 在左，上传入口靠右 */
.tabs-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs-row .tabs { flex: 1; }
/* 分段控件：滑块式，选中项为实色 */
.tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--glass-2);
  box-shadow: var(--sh-1);
}
.tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  padding: 7px 15px;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.tabs button .ico { font-size: 15px; color: var(--muted); }
.tabs button:hover { color: var(--accent-dark); }
.tabs button:hover .ico { color: var(--accent); }
.tabs button[aria-selected="true"] {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 6px 14px -10px rgba(14, 159, 138, .95);
}
.tabs button[aria-selected="true"] .ico { color: var(--on-accent); }

/* 站点列表的编号徽标：短数字标签，圆角比状态徽标收小 */
#sitesTable .badge { border-radius: 6px; }

/* ---------- 站点卡片列表（截图在顶，信息在下） ---------- */
.site-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 14px;
}
.site-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--sh-1);
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.site-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--sh-2); }
/* 首页截图：16:10，截网页取顶部（首屏信息都在上面）；点开看大图 */
.shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  /* 图片到达前是这块浅色骨架，避免卡片整片空白 */
  background: linear-gradient(115deg, var(--surface-soft), #eef4f3 60%, var(--surface-soft));
  cursor: zoom-in;
  overflow: hidden;
}
/* 懒加载的图载完才淡入（见 main.js 给 img 加 .is-on） */
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; opacity: 0; transition: opacity .25s var(--ease); }
.shot img.is-on { opacity: 1; }
/* 没有截图时退回首字方块 */
.shot--none {
  display: grid;
  place-items: center;
  cursor: default;
  font-size: 30px;
  font-weight: 700;
  color: var(--accent-dark);
  background: linear-gradient(140deg, var(--accent-soft), var(--surface-soft));
}
.site-card__body { display: flex; flex-direction: column; gap: 7px; padding: 11px 13px 13px; }
.site-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
/* 站点名（卡片的标识，字号与颜色加重；过长省略） */
.site-name { font-size: 13.5px; font-weight: 700; color: var(--accent-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-card__head .badge { flex: none; }
/* 简介固定两行，卡片高度才整齐 */
.site-card__info {
  margin: 0;
  min-height: 2.9em;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.site-card__info .sub { color: var(--muted); }
.site-card__meta { display: flex; align-items: center; gap: 7px; font-size: 12px; }
/* 操作按钮：标签不换行（宽度按 minmax(272px) 留足两个并排的量）；
   万一还不够（英文标签更长），整块换行而不是把文字拆成两行撑高按钮 */
.site-card__ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.site-card__ops .btn { flex: 1 1 auto; white-space: nowrap; }

/* ---------- 站点 favicon（站点名列左侧；链上没写 icon 时退回首字母方块） ---------- */
.favicon {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
  object-fit: contain;
  vertical-align: middle;   /* 与站点名文字同一水平中线 */
}
.favicon--text {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  line-height: 18px;      /* 20px 高减去上下 1px 边框 */
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* ---------- 站点简介列（标题 + 描述，限宽避免挤压其他列） ---------- */
td.info { max-width: 340px; font-size: 12px; line-height: 1.45; }
td.info .sub { color: var(--muted); }

/* ---------- 文件路径浮窗（点按钮浮出，不改变列宽） ---------- */
/* 入口做成小胶囊，够大好点；末尾的 ▾ 提示可点开 */
.paths-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 4px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.2;
  color: var(--accent-dark);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.paths-btn::after { content: ' ▾'; font-size: 10px; opacity: .55; }
.paths-btn:hover { border-color: var(--accent-2); background: var(--accent-soft); }
.pop {
  position: absolute;
  z-index: 50;
  max-width: min(360px, calc(100vw - 24px));
  max-height: 300px;
  overflow: auto;
  overscroll-behavior: contain;   /* 滚到尽头不要带动页面一起滚 */
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--sh-2);
  font-size: 12px;
}
.pop ul { margin: 0; padding-left: 16px; }
.pop li { line-height: 1.6; word-break: break-all; }
/* 路径可点开看内容：悬停给点击暗示 */
.pop li.path-item { cursor: pointer; border-radius: 6px; padding: 0 4px; }
.pop li.path-item:hover { background: var(--hover); color: var(--accent-dark); }

/* ---------- 文件内容预览弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal__mask { position: absolute; inset: 0; background: rgba(18, 38, 42, .42); }
.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: min(80vh, 720px);
  background: var(--panel);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  overflow: hidden;
}
/* 截图大图：面板放宽，图按原比例缩放 */
.modal__panel--shot { width: min(1100px, 100%); }
.modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.modal__head .mono { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal__head .muted { font-size: 12px; flex: none; }
.modal__head .btn { margin-left: auto; flex: none; }
.modal__body { overflow: auto; overscroll-behavior: contain; padding: 14px; }
/* 内容一律当纯文本渲染（链上内容不可信），图片按原地大小缩放 */
.modal__body pre { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-all; }
.modal__body img { display: block; max-width: 100%; margin: 0 auto; }

/* ---------- 概览：四个指标 + 迷你柱状图 同排 ---------- */
.overview { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.overview__stats { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; }
/* 站点面板仅 3 张指标卡，覆盖默认 4 列避免末列空缺；撑满高度与右侧图表齐平 */
.overview__stats .grid2 { grid-template-columns: repeat(3, 1fr); flex: 1 1 auto; }
.overview__chart {
  flex: 1 1 320px; min-width: 240px;
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--glass-2); box-shadow: var(--sh-1);
}
.overview__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.overview__cap-r { font-family: var(--mono); font-size: 10.5px; color: var(--accent); }

/* ---------- 每日新增迷你柱状图（零依赖，纯 CSS 柱子，自适应铺满不出现滚动条） ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--border); }
/* 每列：柱体贴底、宽度自适应；柱高由 JS 按最大值等比算出（像素） */
.chart-col { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; }
.chart-col i {
  display: block;
  width: 100%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  transition: background .18s var(--ease);
}
.chart-col:hover i { background: linear-gradient(180deg, var(--cyan), var(--accent-dark)); }
/* 日期轴独立成行，与柱区同列宽（gap 一致）以对齐柱位；仅 4 个刻度有文字 */
.chart-axis { display: flex; gap: 3px; margin-top: 3px; }
.chart-tick { flex: 1 1 0; min-width: 0; text-align: center; font-family: var(--mono); font-size: 9.5px; color: var(--muted); white-space: nowrap; }
/* 首末刻度贴边对齐，避免居中时文字溢出到卡片外 */
.chart-tick--start { text-align: left; }
.chart-tick--end { text-align: right; }

/* ---------- 热门榜单（应用市场风格：横排卡片，封面 + 底部信息层） ---------- */
/* 横排滚动：隐藏滚动条，改用两侧箭头翻页（见 .hot-nav） */
.hot-row {
  display: flex; gap: 12px;
  overflow-x: auto; padding: 2px 2px 4px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; -ms-overflow-style: none;
}
.hot-row::-webkit-scrollbar { display: none; }
/* 翻页箭头：浮在榜单两侧，半透明圆钮，到端点隐藏 */
.hot-wrap { position: relative; }
.hot-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(6, 24, 20, .3);
  opacity: .62; transition: opacity .18s var(--ease), background .18s var(--ease);
}
.hot-nav:hover { opacity: 1; background: rgba(6, 24, 20, .55); }
.hot-nav[disabled] { opacity: 0; pointer-events: none; }
.hot-nav--prev { left: 6px; }
.hot-nav--next { right: 6px; }
.hot-nav svg { width: 16px; height: 16px; }
.hot-card {
  position: relative; flex: 0 0 196px; width: 196px; aspect-ratio: 3 / 2;
  scroll-snap-align: start;
  display: block; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--accent-soft); text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.hot-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.hot-card__img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* 无截图兜底：首字方块 */
.hot-card__ph {
  display: grid; place-items: center; width: 100%; height: 100%;
  font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--accent-dark);
  background: linear-gradient(140deg, var(--accent-soft), var(--surface-soft));
}
/* 名次角标：左上角半透明底，前 3 名实色 */
.hot-card__rank {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 7px;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: #fff; background: rgba(6, 32, 28, .42);
}
.hot-card__rank.hot-rank--1 { background: var(--accent); }
.hot-card__rank.hot-rank--2 { background: var(--accent-2); }
.hot-card__rank.hot-rank--3 { color: var(--accent-dark); background: var(--accent-soft); }
/* 底部信息层：半透明渐变遮罩（上淡下深），文字白字带柔光 */
.hot-card__info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; flex-direction: column; gap: 3px; padding: 26px 11px 10px;
  color: #fff;
  background: linear-gradient(180deg, rgba(6, 24, 20, 0) 0%, rgba(6, 24, 20, .46) 42%, rgba(6, 24, 20, .80) 100%);
}
.hot-card__name {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}
.hot-card__n { font-size: 11px; color: rgba(255, 255, 255, .82); font-variant-numeric: tabular-nums; }

/* ---------- 页脚 ---------- */
.footer {
  position: relative; z-index: 1;
  max-width: 1440px; margin: 0 auto 26px; padding: 18px 22px 0;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 12.5px;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__links a { color: var(--muted); text-decoration: none; transition: color .18s; }
.footer__links a:hover { color: var(--accent-dark); }
.footer__note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; margin: 12px 0 0; font-size: 12px; }

/* ---------- 杂项 ---------- */
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* ---------- 移动端适配 ---------- */
/* 平板：统计卡由 4 列变 2 列，搜索框铺满 */
@media (max-width: 820px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .overview__stats .grid2 { grid-template-columns: 1fr 1fr; }
  .search { width: 100%; }
  .page { padding: 0 16px; }
}

/* 手机：收紧留白、放大触摸目标、表格横向滚动 */
@media (max-width: 640px) {
  body { font-size: 13px; }

  /* 顶栏 */
  .topbar { padding: 9px 12px; gap: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 28px; height: 28px; border-radius: 9px; }
  .brand-name { font-size: 14px; }
  .brand-sub { display: none; }              /* 副标题占宽，小屏省略（网络已由右侧徽标标明） */
  .topbar-right { gap: 8px; }
  .hide-mobile { display: none; }            /* 顶栏插件下载入口：窄屏放不下也不常用 */
  .net-wide { display: none; }               /* 链名换缩写：BNB 主网 + XLayer → BNB +XLayer */
  .net-narrow { display: inline; }
  .net-badge { padding: 3px 9px; }
  .lang-switch button { min-width: 38px; padding: 5px 8px; }

  /* 主体与卡片 */
  .page { margin: 14px auto; padding: 0 12px; }
  .footer { padding: 14px 12px 0; margin-bottom: 20px; }
  .page .card { padding: 15px; margin-bottom: 12px; border-radius: 12px; }
  .page h2 { font-size: 16px; }
  .page h3 { font-size: 14px; }
  .card-head { gap: 8px; }
  .icon-block { width: 28px; height: 28px; font-size: 16px; }

  /* Hero */
  .hero { padding: 10px 14px; }
  .hero h1 { font-size: 15px; }
  .hero::after { opacity: .6; }

  /* 切换条：tabs 独占一行等宽，开通入口落到下一行铺满（拇指好点） */
  .tabs-row { justify-content: space-between; gap: 8px; }
  .tabs-row .tabs { flex: 1 1 100%; }
  .tabs button { flex: 1; justify-content: center; padding: 8px 10px; font-size: 13px; }
  .tabs button .ico { display: none; }       /* 窄屏先让位给文字 */

  /* 统计卡：图标缩小，时间这类长文本允许折行 */
  .grid2 { gap: 10px; }
  .stat { gap: 8px; padding: 10px 11px; }
  .stat__ico { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; }
  .stat-num { font-size: 15px; }
  .stat-num--sm { font-size: 11px; line-height: 1.4; word-break: break-all; }

  /* 输入：字号提到 16px，避免 iOS 聚焦时自动放大整页 */
  .input, .search input { font-size: 16px; }
  .input { padding: 8px 11px; }
  .search { width: 100%; height: 40px; }
  .search__ico { font-size: 17px; }

  /* 触摸目标：按钮整体加高 */
  .btn { padding: 9px 15px; }
  .btn-sm { padding: 7px 11px; }
  /* 开通容器入口：窄屏独占一行铺满，文字居中 */
  .btn-cta { flex: 1 1 100%; padding: 10px 18px; }
  /* 操作按钮组：窄屏等宽铺满，手指好点 */
  .actions > .btn { flex: 1 1 130px; }

  /* 域名表改卡片列表：一行一张卡，字段名由 main.js 写进 data-label */
  th, td { padding: 8px; }
  #table { overflow-x: visible; }
  #table thead { display: none; }
  #table tbody tr {
    display: block;
    padding: 12px 13px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--sh-1);
  }
  #table tbody tr:last-child { margin-bottom: 0; }
  #table tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--line-soft);
  }
  #table tbody td::before {
    content: attr(data-label);
    flex: none;
    font-size: 12px;
    color: var(--muted);
  }
  #table tbody td:last-child { border-bottom: 0; }
  #table tbody td:empty { display: none; }   /* 无操作按钮时不占位 */
  /* 首列当卡片标题：不重复字段名 */
  #table tbody td:first-child {
    padding: 0 0 8px;
    margin-bottom: 5px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14.5px;
    white-space: normal;
    word-break: break-all;
  }
  #table tbody td:first-child::before { content: none; }
  /* 操作列：按钮铺满整行；td 的 nowrap 在窄屏要让开，否则两个按钮挤成一行 */
  #table tbody td.ops { display: block; padding-top: 9px; white-space: normal; }
  #table tbody td.ops .btn { display: flex; width: 100%; }
  /* 铺满整行后两个网关按钮上下叠放，左间距换成上间距 */
  #table tbody td.ops .btn + .btn { margin: 6px 0 0; }

  /* 站点卡片：窄屏单列 */
  .site-cards { grid-template-columns: 1fr; gap: 12px; }

  .paths-btn { padding: 6px 14px; }   /* 手指点击区域再放大一点 */
  .pop { max-height: 200px; }
}

/* 小屏手机（≤420px）：顶栏只留图标，统计卡改单列 */
@media (max-width: 420px) {
  .hide-xs { display: none; }          /* 外链/返回按钮的文字 */
  .topbar-right .btn { padding: 7px 10px; }
  .grid2 { grid-template-columns: 1fr; }
  .overview__stats .grid2 { grid-template-columns: 1fr; }
  .stat-num--sm { font-size: 12px; word-break: normal; }
}

/* 尊重系统的「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
