/* ==========================================================
   VPSLIST.CN - 全局样式
   暗色科技风 / 响应式 / 支持亮色切换
   ========================================================== */

:root {
  --bg: #0b0e14;
  --bg-soft: #11151f;
  --panel: #151a26;
  --panel-2: #1b2130;
  --line: #262d3d;
  --line-soft: #1e2432;
  --txt: #e6ebf5;
  --txt-2: #9aa7bd;
  --txt-3: #6b7893;
  --brand: #4d8dff;
  --brand-2: #22d3a7;
  --warn: #ffb020;
  --danger: #ff5d5d;
  --hot: #ff4d6d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --maxw: 1220px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-soft: #eef1f7;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --line: #e2e8f0;
  --line-soft: #edf1f6;
  --txt: #12182a;
  --txt-2: #5a6780;
  --txt-3: #8b97ad;
  --shadow: 0 4px 18px rgba(20, 30, 60, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .35em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-in { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; font-size: 18px; letter-spacing: -.02em; white-space: nowrap;
}
.logo-dot {
  width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #06121f; font-size: 13px; font-weight: 900;
}
.logo span.t { color: var(--brand); }
.nav-links { display: flex; gap: 4px; margin-left: 6px; }
.nav-links a {
  padding: 7px 12px; border-radius: 8px; font-size: 14px; color: var(--txt-2); font-weight: 500;
  transition: .15s;
}
.nav-links a:hover { color: var(--txt); background: var(--panel-2); }
.nav-links a.on { color: var(--txt); background: var(--panel-2); }
.nav-sp { flex: 1; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--panel); color: var(--txt-2); cursor: pointer; display: grid; place-items: center;
  font-size: 15px; transition: .15s; flex: none;
}
.icon-btn:hover { color: var(--txt); border-color: var(--brand); }
.nav-toggle { display: none; }

/* ---- 顶栏搜索框（桌面/移动各一份，由 JS 注入） ---- */
.desktop-only { display: block; }
.mobile-only { display: none; }
@media (max-width: 860px) {
  .desktop-only { display: none; }
  .mobile-only { display: block; }
}
.nav-search {
  display: flex; align-items: center;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 9px; padding: 4px 6px 4px 12px;
  height: 36px; flex: none;
}
.nav-search.desktop-only { flex: 1 1 auto; max-width: 320px; min-width: 0; margin: 0 6px 0 0; }
.nav-search input {
  background: transparent; border: 0; outline: none;
  color: var(--txt); font-size: 14px; padding: 4px;
  flex: 1; min-width: 0; font-family: inherit;
}
.nav-search input::placeholder { color: var(--txt-3); }
.nav-search button {
  background: none; border: 0; cursor: pointer;
  color: var(--txt-2); font-size: 14px; padding: 0 4px; flex: none; line-height: 1;
}
.nav-search button:hover { color: var(--brand); }

@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: absolute; top: 62px; left: 0; right: 0; display: none;
    flex-direction: column; gap: 2px; padding: 10px; background: var(--panel);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 14px; }
  .nav-links .nav-search {
    width: 100%; margin: 4px 0 0; padding: 6px 8px 6px 14px; height: 40px;
  }
}

/* ---------- 英雄区 ---------- */
.hero { padding: 50px 0 32px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -60% -10% auto -10%; height: 420px;
  background: radial-gradient(ellipse at 30% 40%, rgba(77,141,255,.18), transparent 60%),
              radial-gradient(ellipse at 75% 30%, rgba(34,211,167,.13), transparent 60%);
  pointer-events: none;
}
.hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero h1 { font-size: 40px; margin-bottom: 14px; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 16px; color: var(--txt-2); max-width: 560px; margin-bottom: 22px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* 右侧统计卡（玻璃质感，融入渐变光） */
.hero-stats-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  background: color-mix(in srgb, var(--panel) 55%, transparent);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px 26px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.hero-stat { min-width: 0; }
.hero-stat b {
  display: block; font-size: 30px; line-height: 1.1; font-weight: 800;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stat span { display: block; font-size: 12.5px; color: var(--txt-2); margin-top: 4px; }

@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats-side { grid-template-columns: 1fr 1fr; padding: 20px 22px; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .hero { padding: 32px 0 22px; }
  .hero-stats-side { grid-template-columns: 1fr 1fr; gap: 16px 22px; }
  .hero-stat b { font-size: 24px; }
}

/* ---------- 搜索条 ---------- */
.searchbar {
  display: flex; gap: 10px; margin: 22px 0 8px; background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; align-items: center;
  box-shadow: var(--shadow);
}
.searchbar input {
  flex: 1; background: transparent; border: 0; outline: none; color: var(--txt);
  font-size: 15px; padding: 10px 12px; font-family: inherit;
}
.searchbar input::placeholder { color: var(--txt-3); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--txt); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: .16s; font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: var(--brand); transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), #6ea1ff);
  border-color: transparent; color: #061423; font-weight: 700;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-buy {
  background: linear-gradient(135deg, var(--brand-2), #4ee0b5);
  border-color: transparent; color: #05231b; font-weight: 700;
}
.btn-buy:hover { filter: brightness(1.08); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- 通用区块 ---------- */
.sec { padding: 34px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h2 { font-size: 24px; margin: 0; }
.sec-head .sub { color: var(--txt-3); font-size: 13.5px; margin: 4px 0 0; }
.sec-head .more { font-size: 13.5px; color: var(--brand); font-weight: 600; }

/* ---------- 优惠横幅 ---------- */
.deal-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px;
}
.deal-card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  position: relative; overflow: hidden; transition: .18s;
}
.deal-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.deal-card.top { border-color: color-mix(in srgb, var(--hot) 55%, var(--line)); }
.deal-card.top::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 110px; height: 110px;
  background: radial-gradient(circle, rgba(255,77,109,.22), transparent 70%);
}
.deal-tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 20px; background: color-mix(in srgb, var(--hot) 20%, transparent);
  color: var(--hot); margin-bottom: 8px;
}
.deal-card h3 { font-size: 15.5px; margin: 0 0 6px; }
.deal-card p { font-size: 13.5px; color: var(--txt-2); margin: 0 0 12px; }
.deal-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--txt-3); }
.countdown { font-variant-numeric: tabular-nums; color: var(--warn); font-weight: 700; }

/* ---------- 筛选栏 ---------- */
.filters {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 18px;
}
.f-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.f-row + .f-row { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.f-label { font-size: 12.5px; color: var(--txt-3); width: 52px; flex: none; font-weight: 600; }
.chip {
  padding: 5px 10px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--txt-2); font-size: 13px; cursor: pointer;
  transition: .14s; user-select: none;
  white-space: nowrap;     /* 防止中文 chip 在窄空间内部断行 */
  flex: none;              /* 防止 chip 被父容器压缩 */
  letter-spacing: 0;
}
.chip:hover { color: var(--txt); border-color: var(--brand); }
.chip.on { background: color-mix(in srgb, var(--brand) 18%, transparent); border-color: var(--brand); color: var(--txt); font-weight: 600; }
.chip.more-tag { background: transparent; cursor: default; border-style: dashed; color: var(--txt-3); font-weight: 600; }
.chip.more-tag:hover { color: var(--txt-3); border-color: var(--line); }
select.sel {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--txt);
  padding: 7px 10px; border-radius: 8px; font-size: 13px; font-family: inherit; cursor: pointer; outline: none;
}
.f-count { margin-left: auto; font-size: 13px; color: var(--txt-3); }

/* ---------- 商家卡片网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; transition: .18s; position: relative;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); }
.card-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.avatar {
  width: 44px; height: 44px; border-radius: 11px; flex: none; display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: #fff; letter-spacing: -.02em;
}
.card-name { flex: 1; min-width: 0; }
.card-name h3 { font-size: 16.5px; margin: 0 0 3px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card-name .meta { font-size: 12.5px; color: var(--txt-3); }
.rating { color: var(--warn); font-size: 12.5px; font-weight: 700; }
.rating small { color: var(--txt-3); font-weight: 500; }

.badge {
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 5px;
  letter-spacing: .02em; white-space: nowrap;
}
.badge.hot { background: color-mix(in srgb, var(--hot) 22%, transparent); color: var(--hot); }
.badge.deal { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--warn); }
.badge.line { background: color-mix(in srgb, var(--brand-2) 20%, transparent); color: var(--brand-2); }

.card-desc { font-size: 13.5px; color: var(--txt-2); margin: 0 0 12px; flex: 1; }

.plan-box {
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: 11px 13px; margin-bottom: 12px;
}
.plan-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.plan-spec { font-size: 12.8px; color: var(--txt-2); font-variant-numeric: tabular-nums; }
.plan-price { font-size: 20px; font-weight: 800; color: var(--brand-2); font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 12px; color: var(--txt-3); font-weight: 500; }
.plan-note { font-size: 11.5px; color: var(--txt-3); margin-top: 5px; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.tag {
  font-size: 11.5px; padding: 2px 8px; border-radius: 5px;
  background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--txt-2);
}
.tag.pay { color: var(--brand-2); border-color: color-mix(in srgb, var(--brand-2) 35%, var(--line)); }
.tag.line-t { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.tag.icp { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, var(--line)); font-weight: 600; }

.card-actions { display: flex; gap: 8px; }
.card-actions .btn { flex: 1; }
.card-cmp {
  flex: none !important; width: 40px; padding: 0 !important; font-size: 15px;
}
.card-cmp.on { border-color: var(--brand); color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, transparent); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.tb { width: 100%; border-collapse: collapse; min-width: 780px; font-size: 13.5px; }
table.tb th, table.tb td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.tb th {
  background: var(--panel-2); color: var(--txt-2); font-size: 12.5px; font-weight: 700;
  position: sticky; top: 0; cursor: pointer; user-select: none;
}
table.tb th:hover { color: var(--txt); }
table.tb th .ar { color: var(--brand); font-size: 10px; margin-left: 3px; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tbody tr:hover { background: var(--panel-2); }
table.tb td.nm { font-weight: 700; }
.price-cell { color: var(--brand-2); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- 对比抽屉 ---------- */
.cmp-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  padding: 12px 0; transform: translateY(110%); transition: .25s;
}
.cmp-bar.show { transform: translateY(0); }
.cmp-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cmp-items { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.cmp-item {
  display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px;
  background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600;
}
.cmp-item button {
  background: none; border: 0; color: var(--txt-3); cursor: pointer; font-size: 15px; padding: 0 0 0 2px; line-height: 1;
}
.cmp-item button:hover { color: var(--danger); }

/* ---------- 内容页 ---------- */
.page-head { padding: 34px 0 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 26px; }
.page-head h1 { font-size: 30px; margin-bottom: 8px; }
.page-head p { color: var(--txt-2); margin: 0 0 14px; max-width: 720px; }
.crumb { font-size: 12.5px; color: var(--txt-3); margin-bottom: 12px; }
.crumb a:hover { color: var(--brand); }

.article { max-width: 820px; }
.article h2 { font-size: 21px; margin-top: 34px; padding-top: 10px; }
.article h3 { font-size: 17px; margin-top: 24px; }
.article p, .article li { color: var(--txt-2); font-size: 15px; }
.article strong { color: var(--txt); }
.article ul li::marker { color: var(--brand); }
.article blockquote {
  margin: 18px 0; padding: 12px 16px; border-left: 3px solid var(--brand);
  background: var(--panel); border-radius: 0 8px 8px 0; color: var(--txt-2); font-size: 14.5px;
}
.article table { font-size: 14px; }
.article code {
  background: var(--panel-2); padding: 2px 6px; border-radius: 4px; font-size: 13px;
  color: var(--brand-2); font-family: ui-monospace, Menlo, Consolas, monospace;
}
.toc {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; margin: 22px 0;
}
.toc b { display: block; font-size: 13px; color: var(--txt-3); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 1.3em; font-size: 14px; }
.toc a { color: var(--txt-2); }
.toc a:hover { color: var(--brand); }

/* 教程卡片 */
.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.guide {
  display: block; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; transition: .18s;
}
.guide:hover { transform: translateY(-2px); border-color: var(--brand); }
.guide .cat {
  font-size: 11px; font-weight: 700; color: var(--brand-2); letter-spacing: .05em;
}
.guide h3 { font-size: 16px; margin: 8px 0 8px; }
.guide p { font-size: 13.5px; color: var(--txt-2); margin: 0 0 12px; }
.guide .gm { font-size: 12px; color: var(--txt-3); }

/* FAQ */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--panel); overflow: hidden; }
.faq-q { padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; gap: 12px; }
.faq-q:hover { background: var(--panel-2); }
.faq-q .pm { color: var(--brand); flex: none; }
.faq-a { padding: 0 18px; max-height: 0; overflow: hidden; transition: .25s; color: var(--txt-2); font-size: 14px; }
.faq-item.open .faq-a { padding: 0 18px 15px; max-height: 400px; }

/* 订阅 */
.subscribe {
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--panel)), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-align: center;
}
.subscribe h3 { font-size: 20px; }
.subscribe p { color: var(--txt-2); font-size: 14px; max-width: 520px; margin: 0 auto 16px; }
.sub-form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.sub-form input {
  flex: 1; background: var(--bg-soft); border: 1px solid var(--line); color: var(--txt);
  padding: 10px 14px; border-radius: var(--radius-sm); outline: none; font-family: inherit; font-size: 14px;
}
.sub-form input:focus { border-color: var(--brand); }

/* 联盟声明 */
.aff-note {
  background: color-mix(in srgb, var(--warn) 9%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; color: var(--txt-2);
  margin: 20px 0;
}
.aff-note b { color: var(--warn); }

/* 页脚 */
.footer { border-top: 1px solid var(--line); margin-top: 50px; padding: 34px 0 26px; background: var(--bg-soft); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 26px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: 13px; color: var(--txt); margin-bottom: 10px; }
.footer a { display: block; font-size: 13.5px; color: var(--txt-3); padding: 3px 0; }
.footer a:hover { color: var(--brand); }
.footer .copy { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--txt-3); }

/* 商家详情 优缺点双栏 -> 窄屏单栏 */
@media (max-width: 720px) {
  .pros-cons { grid-template-columns: 1fr !important; }
}

/* 空状态 */
.empty { text-align: center; padding: 50px 20px; color: var(--txt-3); }
.empty b { display: block; font-size: 16px; color: var(--txt-2); margin-bottom: 6px; }

/* 提示条 */
.notice {
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 13px; color: var(--txt-2); margin-bottom: 16px;
}
.notice b { color: var(--brand); }
