/* ISP VPS 聚合导航 · v4（卡片网格，参考 vps-monitor.czl.net，2026-11-01） */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e5e7eb;
  --fg: #0f172a;
  --fg2: #475467;
  --muted: #98a2b3;
  --accent: #2563eb;
  --price: #0f172a;
  --ok: #16a34a;
  --warn: #b45309;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- 顶部 ---------- */
.hdr {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hrow {
  max-width: 1280px; margin: 0 auto; height: 56px;
  padding: 0 20px; display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; flex: 0 0 auto; white-space: nowrap; }
.brand i {
  width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800;
}
.hrow nav { display: flex; gap: 15px; font-size: 13.5px; font-weight: 600; color: var(--fg2); flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.hrow nav::-webkit-scrollbar { display: none; }
.hrow nav a { flex: 0 0 auto; }
.hrow nav a:hover, .hrow nav a.on { color: var(--accent); }
.grow { flex: 1; }

.search {
  display: flex; align-items: center; gap: 7px;
  height: 34px; width: 250px; padding: 0 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  color: var(--muted); transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.search svg { width: 14px; height: 14px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 2; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--fg); }
.search input::placeholder { color: var(--muted); }

.views { display: flex; gap: 6px; flex: 0 0 auto; }
.vbtn {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--fg2); cursor: pointer; font-size: 13px; line-height: 1;
}
.vbtn:hover { border-color: #cbd5e1; }
.vbtn.on { background: #0f172a; border-color: #0f172a; color: #fff; }

.subline {
  max-width: 1280px; margin: 0 auto; padding: 0 20px 9px;
  display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted);
}
.subline b { color: var(--fg); font-weight: 700; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 优惠码条 */
.promos {
  max-width: 1280px; margin: 0 auto; padding: 0 20px 10px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.ptitle { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.promo {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px;
  white-space: nowrap; border: 1px solid #fde68a; background: #fffbeb; border-radius: 8px;
  font: inherit; font-size: 12px; color: #92400e; cursor: pointer;
  transition: border-color .12s, background .12s;
}
.promo b { font-weight: 700; }
.promo code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px; color: #b45309; background: #fef3c7; padding: 1px 5px; border-radius: 4px;
}
.promo .cp-act { font-size: 11px; color: #b45309; opacity: .75; }
.promo:hover { border-color: #fbbf24; background: #fef9db; }
.promo.copied { border-color: #86efac; background: #f0fdf4; color: #166534; }
.promo.copied code { background: #dcfce7; color: #166534; }
.promo-note { font-size: 11.5px; color: var(--muted); }

/* ---------- 主区 ---------- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 18px 20px 64px; }
.hero { padding: 0 0 6px; }
.hero h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.2px; font-weight: 800; }\n.hero h1.sr-only { margin: 0; }
.hero h1 b { color: var(--accent); }
.hero p { margin: 0; color: var(--fg2); font-size: 13px; max-width: 900px; }

.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.lab { flex: 0 0 auto; width: 64px; color: var(--fg2); font-size: 13.5px; font-weight: 700; letter-spacing: .2px; }
.chip {
  flex: 0 0 auto; height: 30px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 13px; color: var(--fg2);
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; white-space: nowrap; transition: .12s;
}
.chip:hover { border-color: #cbd5e1; color: var(--fg); }
.chip i { font-style: normal; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.chip.on { background: #0f172a; border-color: #0f172a; color: #fff; }
.chip.on i { color: rgba(255, 255, 255, .7); }

/* 地区 chips 折叠：默认只显示数量多的前 N 个，其余点「更多地区」展开 */
.chips .rare { display: none; }
.chips.open .rare { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip.more-toggle { border-style: dashed; color: var(--accent); }
.chip.more-toggle:hover { border-color: var(--accent); }

/* ---------- 区块 ---------- */
.sec { padding: 18px 0 0; }
.sech { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.sech h2 { font-size: 19px; font-weight: 800; margin: 0; letter-spacing: -.2px; }
.cnt { font-size: 12px; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 1px 7px; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 16px 14px; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); transform: translateY(-1px); }
.card.hide { display: none; }

.c-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.merchant { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--fg2); }
.dot { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 800; }
.m-lisa { background: #4f46e5; }
.dot { background: #64748b; }
.m-yin { background: #059669; }
.m-666 { background: #ea580c; }
.m-wepc { background: #0ea5e9; }
.m-raksmart { background: #7c3aed; }
.m-vpscat { background: #db2777; }
.m-zlidc { background: #0891b2; }
.m-lcayun { background: #65a30d; }
.badges { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.bd {
  width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; border: 1px solid var(--line); color: var(--muted); background: #fff;
}
.bd.hot { color: #d97706; border-color: #fde68a; background: #fffbeb; }
.bd.ok { color: var(--ok); border-color: #bbf7d0; background: #f0fdf4; }
.bd.no { color: #dc2626; border-color: #fecaca; background: #fef2f2; }

.nm { font-size: 14.5px; font-weight: 700; line-height: 1.4; margin: 0 0 8px; min-height: 41px; }
.pill {
  align-self: flex-start; font-size: 11px; color: var(--fg2); background: #f3f4f6;
  border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; margin-bottom: 10px;
}
.spec { margin: 0 0 10px; display: grid; grid-template-columns: 40px 1fr; gap: 3px 8px; font-size: 12.5px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; }

.cp {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: 11.5px; color: var(--warn); background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 7px; padding: 2px 8px; margin-bottom: 8px;
  cursor: pointer; transition: border-color .12s, background .12s, color .12s;
}
.cp code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; color: #b45309; letter-spacing: .2px;
}
.cp svg {
  width: 12px; height: 12px; flex: 0 0 auto; fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  opacity: .5; transition: opacity .12s;
}
.cp:hover { border-color: #fbbf24; background: #fef9db; }
.cp:hover svg { opacity: .85; }
.cp:focus-visible { outline: 2px solid #f59e0b; outline-offset: 1px; }
.cp .ic-check { display: none; }
.cp.copied { border-color: #86efac; background: #f0fdf4; color: #166534; }
.cp.copied code { color: #166534; }
.cp.copied .ic-copy { display: none; }
.cp.copied .ic-check { display: inline-block; opacity: 1; }

.cps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.cps .cp { margin-bottom: 0; }
.cpx {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px;
  font-size: 11.5px; font-weight: 600; color: #15803d; background: #f0fdf4;
  border: 1px solid #bbf7d0; border-radius: 7px; white-space: nowrap;
}

.note {
  font-size: 12px; color: var(--muted); line-height: 1.55; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.noscript-note { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); }

.foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid #f1f2f4; }
.price { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.price small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 1px; }
.buy { margin-left: auto; background: #0f172a; color: #fff; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 9px; }
.buy:hover { background: #1e293b; }

/* 加载更多（参考站样式：计数一行 + 居中胶囊按钮） */
.more { padding: 30px 0 10px; text-align: center; }
.more #loaded { display: block; margin-bottom: 16px; color: #64748b; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.loadbtn {
  display: block; margin: 0 auto; padding: 13px 46px;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 999px;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--fg);
  cursor: pointer; box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  transition: border-color .12s, box-shadow .12s, transform .12s;
}
.loadbtn:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(15, 23, 42, .06); }
.loadbtn:active { transform: scale(.98); }
.loadbtn.hide { display: none; }

footer {
  margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px; line-height: 1.9;
}
footer a { color: var(--fg2); border-bottom: 1px dotted #cbd5e1; }

/* ---------- 列表视图 ---------- */
body.v-list .grid { grid-template-columns: 1fr; gap: 10px; }
body.v-list .card { padding: 12px 14px; }
body.v-list .nm { min-height: 0; margin-bottom: 6px; }
body.v-list .spec { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 12px; margin-bottom: 8px; }
body.v-list .spec dt, body.v-list .spec dd { display: inline; }
body.v-list .spec dt::after { content: "："; }
body.v-list .note { -webkit-line-clamp: 1; margin-bottom: 8px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .hrow { height: auto; padding: 10px 14px; flex-wrap: wrap; gap: 8px 12px; }
  .hrow nav { order: 3; flex: 1 1 100%; gap: 14px; overflow: auto; }
  .grow { display: none; }
  .search { order: 4; flex: 1 1 100%; width: auto; }
  .views { order: 5; }
  .subline { padding: 0 14px 9px; }
  .promos { padding: 0 14px 10px; }
  .wrap { padding: 16px 14px 56px; }
  .hero h1 { font-size: 20px; }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .nm { min-height: 0; }
  .sech h2 { font-size: 17px; }
}

/* 分享按钮 */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.share {
  width: 30px; height: 30px; padding: 0; margin-left: auto;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--muted); display: grid; place-items: center; cursor: pointer;
  transition: color .12s, border-color .12s, background .12s;
}
.share svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.share:hover { color: var(--fg); border-color: #cbd5e1; }
.share.copied { color: var(--ok); border-color: #86efac; background: #f0fdf4; }
.buy { margin-left: 8px; }
.card.flash { box-shadow: 0 0 0 3px rgba(37, 99, 235, .35); }
/* 子页返回链接 */
.back { font-size: 13px; font-weight: 600; color: var(--fg2); border: 1px solid var(--line); background: #fff; padding: 6px 12px; border-radius: 8px; }
.back:hover { border-color: #cbd5e1; color: var(--fg); }
@media (max-width: 820px) { .back { margin-left: auto; } }
/* 产品类型切换（ISP VPS / ISP 独服） */
.typebar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 10px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 16px; border: 1px solid transparent; background: #f3f4f6; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--fg2); cursor: pointer; transition: .12s; }
.tab:hover { color: var(--fg); }
.tab i { font-style: normal; font-size: 11.5px; color: var(--muted); background: #fff; border-radius: 5px; padding: 1px 6px; }
.tab.on { background: #0f172a; color: #fff; border-color: #0f172a; }
.tab.on i { color: #0f172a; background: #fff; }
.tab-note { font-size: 11.5px; color: var(--muted); margin-left: auto; }
@media (max-width: 820px) { .typebar { margin: 10px 0 8px; } .tab { height: 32px; padding: 0 13px; font-size: 13px; } .tab-note { width: 100%; margin-left: 0; } }

/* 商家页入口 */
.mdir { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; }
.mdir-lab { font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.mdir-item { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; color: var(--fg2);
  transition: border-color .12s, color .12s; }
.mdir-item b { font-weight: 700; color: var(--fg); }
.mdir-item i { font-style: normal; font-size: 11px; color: var(--muted); }
.mdir-item span { font-size: 11px; color: var(--accent); opacity: 0; transition: opacity .12s; }
.mdir-item:hover { border-color: #c7d2e3; }
.mdir-item:hover span { opacity: 1; }
a.merchant { color: inherit; }
a.merchant:hover { text-decoration: underline; text-underline-offset: 2px; }

/* 筛选卡片 */
.filterbar { margin: 14px 0 4px; padding: 10px 14px 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.filterbar .typebar { margin: 0 0 8px; padding: 0; background: transparent; border: 0; border-radius: 0; }
.filterbar .chips { margin-bottom: 6px; }
.filterbar .chips:last-child { margin-bottom: 0; }
.mfilter .search { width: 100%; margin-bottom: 10px; }
@media (max-width: 820px) {
  .filterbar { padding: 8px 10px 10px; }
  .filterbar .lab { width: 100%; margin-bottom: -2px; }
}

/* 轻提示（复制失败兜底） */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 8px);
  padding: 10px 16px; border-radius: 10px; background: rgba(15, 23, 42, .92); color: #fff;
  font-size: 13px; line-height: 1.2; box-shadow: 0 8px 24px rgba(15, 23, 42, .2);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 90;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
