/* ============================================================
   云枢 · 资源库  —— 视觉系统
   ============================================================ */
:root {
  /* 声明暗色配色方案：让浏览器用深色渲染原生控件（下拉列表、滚动条、日期选择器等），
     否则 Windows 的 Chrome/Edge 会按系统亮色渲染 option，出现白底白字 */
  color-scheme: dark;
  --bg: #060912;
  --bg-2: #0a1020;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf8;
  --text-dim: #b3bdd4;
  --muted: #7d879f;
  --brand: #5b8cff;
  --brand-2: #a86bff;
  --cyan: #2ad4d4;
  --gold: #ffb020;
  --green: #22c58b;
  --red: #ff5c6c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.75);
  --grad: linear-gradient(135deg, #5b8cff 0%, #a86bff 100%);
  --grad-gold: linear-gradient(135deg, #ffcf5c 0%, #ff9b21 100%);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(91, 140, 255, 0.18), transparent 60%),
    radial-gradient(760px 460px at 88% 4%, rgba(168, 107, 255, 0.16), transparent 62%),
    radial-gradient(600px 400px at 50% 110%, rgba(42, 212, 212, 0.10), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

.wrap { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------- 顶部导航 */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(8, 12, 22, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 22px; height: 66px; }
.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; cursor: pointer; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--grad);
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px; color: #fff;
  box-shadow: 0 8px 22px -6px rgba(91, 140, 255, .8);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 16px; letter-spacing: .5px; }
.logo-text span { font-size: 11px; color: var(--muted); letter-spacing: 2px; }
/* 自定义 Logo 图片（后台「站点品牌」上传或填 URL） */
.logo-img { width: 38px; height: 38px; border-radius: 10px; object-fit: contain; display: block; }

/* 后台站点品牌编辑器 */
.brand-editor { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.brand-preview {
  display: flex; align-items: center; gap: 11px; padding: 14px 18px; flex-shrink: 0;
  border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.03);
  min-width: 180px; justify-content: center;
}

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; font-size: 14px; color: var(--text-dim);
  font-weight: 500; white-space: nowrap; transition: .18s;
}
.nav-links a:hover { color: #fff; background: var(--panel-2); }
.nav-links a.active {
  color: #fff; background: rgba(91, 140, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(91, 140, 255, 0.4);
}
.nav-search {
  flex: 1; max-width: 340px; position: relative; margin-left: auto;
}
.nav-search input {
  width: 100%; height: 40px; padding: 0 16px 0 40px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  outline: none; transition: .18s;
}
.nav-search input:focus { border-color: rgba(91,140,255,.6); background: rgba(91,140,255,.07); }
.nav-search svg { position: absolute; left: 13px; top: 12px; opacity: .5; }

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.points-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,207,92,.16), rgba(255,155,33,.1));
  border: 1px solid rgba(255, 176, 32, .35);
  color: var(--gold); font-weight: 700; font-size: 13px; cursor: pointer;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; color: #fff; cursor: pointer; font-size: 14px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.1);
}
.btn {
  height: 40px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--panel-2); cursor: pointer; font-weight: 600; font-size: 14px;
  transition: .18s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: rgba(255,255,255,.13); transform: translateY(-1px); }
.btn-primary {
  background: var(--grad); border: none; color: #fff;
  box-shadow: 0 10px 26px -10px rgba(91,140,255,.9);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 14px 30px -10px rgba(91,140,255,1); }
.btn-gold { background: var(--grad-gold); border: none; color: #3a2400; box-shadow: 0 10px 26px -12px rgba(255,155,33,.9); }
.btn-ghost { background: transparent; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------- Hero */
.hero { padding: 56px 0 34px; position: relative; text-align: center; }
.hero h1 {
  font-size: 46px; line-height: 1.15; margin: 0 auto 16px; font-weight: 800; letter-spacing: -.5px;
  max-width: 900px;
  background: linear-gradient(120deg, #ffffff 10%, #b9c8ff 45%, #c9a8ff 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-dim); font-size: 16px; margin: 0 auto 30px; max-width: 720px; }
.hero-search {
  display: flex; gap: 12px; width: 100%; max-width: 760px; margin: 0 auto 26px;
}
.hero-search input {
  flex: 1; min-width: 0; height: 56px; padding: 0 24px; font-size: 15.5px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-strong);
  border-radius: 16px; outline: none; text-align: left;
}
.hero-search input:focus { border-color: rgba(91,140,255,.7); background: rgba(91,140,255,.08); }
.hero-search .btn { height: 56px; padding: 0 32px; border-radius: 16px; flex-shrink: 0; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 26px; }
.stat {
  padding: 22px 24px; border-radius: var(--radius); background: var(--panel);
  border: 1px solid var(--border); backdrop-filter: blur(8px);
}
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 8px; }
.stat span { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------------------------------------------------- 通用块 */
.section { margin: 42px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.2px; }
.section-head .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.tabs { display: flex; gap: 6px; padding: 4px; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.tabs button {
  padding: 7px 16px; border-radius: 9px; border: none; background: transparent;
  color: var(--text-dim); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .16s;
}
.tabs button.active { background: rgba(91,140,255,.2); color: #fff; box-shadow: inset 0 0 0 1px rgba(91,140,255,.35); }
.tabs button:hover:not(.active) { color: #fff; }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  backdrop-filter: blur(10px);
}
.pad { padding: 22px; }

/* ---------------------------------------------------- 分类卡 */
.cat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.cat-card {
  padding: 16px 10px; border-radius: 14px; text-align: center; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); transition: .2s;
}
.cat-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--panel-2); }
.cat-card .ic { font-size: 24px; }
.cat-card .nm { font-size: 13px; font-weight: 600; margin-top: 6px; }
.cat-card .ct { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------- 资源卡 */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 16px; }
.res-card {
  position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); transition: .22s;
  display: flex; flex-direction: column;
}
.res-card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.res-thumb {
  height: 122px; display: grid; place-items: center; position: relative; overflow: hidden;
}
.res-thumb .glyph { font-size: 40px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); position: relative; z-index: 1; }
.res-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(6,9,18,.85) 100%);
}
.res-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.res-title { font-size: 14.5px; font-weight: 700; line-height: 1.45; margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.res-sum { font-size: 12.5px; color: var(--muted); line-height: 1.55; height: 38px; overflow: hidden; }
.res-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.res-meta span { display: inline-flex; align-items: center; gap: 4px; }
.res-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.author { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-dim); }
.author .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: #fff; font-weight: 700; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .2px;
}
.badge-pan { position: absolute; top: 10px; left: 10px; z-index: 2; backdrop-filter: blur(6px); }
.badge-cost { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(6,9,18,.75); color: var(--gold); backdrop-filter: blur(6px); }
.badge-free { background: rgba(34,197,139,.18); color: var(--green); }
.badge-status { padding: 3px 10px; border-radius: 7px; font-size: 11.5px; font-weight: 700; }

/* ---------------------------------------------------- 列表 / 表单 */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text-dim); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.input, .textarea, .select {
  width: 100%; padding: 11px 14px; border-radius: 12px; outline: none;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); transition: .18s;
}
.input:focus, .textarea:focus, .select:focus { border-color: rgba(91,140,255,.65); background: rgba(91,140,255,.07); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
/* 原生下拉列表：统一「深色底 + 白色字」。
   注意必须作用在 option 本身——只给 select 设色，展开后的列表项仍由系统按亮色渲染。 */
select option,
select optgroup {
  background-color: #101728;
  color: var(--text);
}
select option:hover,
select option:focus,
select option:checked,
select option:active {
  background-color: #1d2942;
  color: #fff;
}
select option:disabled { background-color: #0b1120; color: var(--muted); }
/* 老版本 Firefox 不支持给 option 上色，退回用系统色 */
@supports (-moz-appearance: none) {
  select option { background-color: #101728; color: #e9edf8; }
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* 网格列内表单元素最小宽度为 0，避免长文本/长 placeholder 把列撑破 */
.grid-2 > *, .grid-3 > *, .grid-2c > * { min-width: 0; }

/* ---------------------------------------------------- 详情 */
.detail-head { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.res-hero-thumb { height: 190px; border-radius: var(--radius); display: grid; place-items: center; position: relative; overflow: hidden; }
.res-hero-thumb .glyph { font-size: 66px; z-index: 1; filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)); }
.res-hero-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, transparent 20%, rgba(6,9,18,.8)); }
h1.detail-title { font-size: 27px; margin: 0 0 12px; line-height: 1.35; font-weight: 800; letter-spacing: -.3px; }
.kv { display: flex; gap: 26px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.kv b { color: var(--text); font-weight: 600; }
.desc { color: var(--text-dim); line-height: 1.85; white-space: pre-wrap; font-size: 14px; }
.code-box {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px;
  background: rgba(91,140,255,.07); border: 1px dashed rgba(91,140,255,.35); margin: 14px 0;
}
.code-box .cd { font-size: 20px; font-weight: 800; letter-spacing: 3px; color: #fff; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.side-card { padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); margin-bottom: 16px; }
.side-card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.mini-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.mini-item:last-child { border-bottom: none; }
.mini-item .rk { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.07); color: var(--muted); }
.mini-item .rk.top { background: var(--grad-gold); color: #3a2400; }
.mini-item .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-item .vl { color: var(--gold); font-weight: 700; }

/* ---------------------------------------------------- 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; padding: 11px 12px; color: var(--muted); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.table tr:hover td { background: rgba(255,255,255,.025); }
.table .nowrap { white-space: nowrap; }

/* ---------------------------------------------------- 登录弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(4, 7, 14, .78); backdrop-filter: blur(6px);
  display: grid; place-items: center; z-index: 200; animation: fade .2s ease;
}
.modal {
  width: 420px; max-width: 92vw; max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, #101728, #0b1020);
  border: 1px solid var(--border-strong); border-radius: 20px; padding: 30px;
  box-shadow: 0 40px 90px -30px #000;
}
.modal h2 { margin: 0 0 6px; font-size: 22px; }
.modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.modal-tabs { display: flex; gap: 6px; padding: 4px; background: rgba(255,255,255,.05); border-radius: 12px; margin-bottom: 20px; }
.modal-tabs button { flex: 1; padding: 9px; border: none; background: transparent; color: var(--text-dim); border-radius: 9px; cursor: pointer; font-weight: 600; }
.modal-tabs button.active { background: rgba(91,140,255,.22); color: #fff; }
.modal .btn { width: 100%; height: 46px; margin-top: 6px; }
.tip-line { margin-top: 16px; padding: 12px 14px; border-radius: 11px; background: rgba(91,140,255,.08);
  border: 1px solid rgba(91,140,255,.2); font-size: 12.5px; color: var(--text-dim); line-height: 1.7; }
.tip-line b { color: var(--gold); }

/* 验证码行：输入框拉长，按钮缩小 */
.code-row { display: flex; gap: 10px; }
.code-row .input { flex: 1; min-width: 0; letter-spacing: 2px; font-size: 15px; }
.modal .btn.code-btn {
  width: auto; flex-shrink: 0; height: 42px; padding: 0 14px;
  font-size: 12.5px; white-space: nowrap; border-radius: 12px;
}

/* ---------------------------------------------------- Toast */
.toast-host { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  padding: 12px 20px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  background: rgba(16, 23, 40, .96); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  animation: drop .25s ease; white-space: pre-line; max-width: 78vw;
}
.toast.ok { border-color: rgba(34,197,139,.5); color: var(--green); }
.toast.err { border-color: rgba(255,92,108,.5); color: var(--red); }
.toast.warn { border-color: rgba(255,176,32,.5); color: var(--gold); }
@keyframes drop { from { opacity: 0; transform: translateY(-14px); } }
@keyframes fade { from { opacity: 0; } }

/* ---------------------------------------------------- 其他 */
.announce {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-radius: 12px;
  font-size: 13px; margin-bottom: 10px; border-left: 3px solid var(--brand);
  background: rgba(91,140,255,.07);
}
.announce.success { border-color: var(--green); background: rgba(34,197,139,.07); }
.announce.danger { border-color: var(--red); background: rgba(255,92,108,.07); }
.announce b { font-weight: 700; }

.pager { display: flex; justify-content: center; gap: 8px; margin: 30px 0 10px; flex-wrap: wrap; }
.pager button {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border); font-weight: 600;
}
.pager button.active { background: var(--grad); border: none; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty .ic { font-size: 48px; margin-bottom: 14px; opacity: .6; }

.rule-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.rule-item:last-child { border-bottom: none; }
.rule-item .no { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; }
.rule-item h4 { margin: 2px 0 5px; font-size: 14.5px; }
.rule-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.points-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
  background: rgba(255,176,32,.12); color: var(--gold); font-weight: 700; font-size: 12.5px; }
.pos { color: var(--green); font-weight: 700; }
.neg { color: var(--red); font-weight: 700; }

.footer { margin: 60px 0 30px; padding-top: 26px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; display: flex; flex-direction: column; gap: 14px; }
.footer-text { display: flex; flex-direction: column; gap: 6px; line-height: 1.7; }
.footer-text a { color: var(--brand); }
.footer-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-links .fl-title { color: var(--muted); }
.footer-links a {
  display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim);
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; transition: .15s; font-size: 12.5px;
}
.footer-links a:hover { color: #fff; border-color: rgba(91,140,255,.5); background: rgba(91,140,255,.1); }
.fl-logo { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; }

/* ---- 后台：流量统计 ---- */
.traffic-chart { display: flex; align-items: flex-end; gap: 8px; overflow-x: auto; padding-bottom: 4px; min-height: 190px; }
.tc-col { flex: 1; min-width: 34px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.tc-bars { display: flex; align-items: flex-end; gap: 3px; height: 124px; }
.tc-bars i { width: 11px; border-radius: 4px 4px 0 0; display: block; transition: .2s; }
.tc-bars i.pv { background: var(--grad); }
.tc-bars i.uv { background: var(--grad-gold); }
.tc-bars i:hover { filter: brightness(1.25); }
.tc-num { font-size: 10.5px; color: var(--text-dim); font-weight: 700; }
.tc-day { font-size: 10px; color: var(--muted); }
.visit-row { display: flex; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.visit-row:last-child { border-bottom: none; }
.visit-row .vp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.visit-row .vi { color: var(--muted); white-space: nowrap; }
.visit-row .vd { color: var(--text-dim); white-space: nowrap; }
.visit-row .vr { color: var(--gold); white-space: nowrap; font-size: 11.5px; }
.visit-row .vu { color: var(--brand); white-space: nowrap; min-width: 44px; }
.visit-row .vt { color: var(--muted); white-space: nowrap; font-size: 11px; }
/* 分布条形图（设备 / 浏览器 / 地区） */
.bar-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.bar-item .bl { font-size: 12.5px; color: var(--text-dim); text-align: right; }
.bar-item .bar-track { flex: 1; min-width: 0; height: 10px; border-radius: 5px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-item .bar-fill { height: 100%; border-radius: 5px; background: var(--grad); transition: width .3s; }
.bar-item .bar-fill.gold { background: var(--grad-gold); }
.bar-item .bv { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---- 后台：友情链接管理 ---- */
.friend-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border); }
.friend-row:last-child { border-bottom: none; }
.friend-row .fr-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.friend-row .fr-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.progress { height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad-gold); border-radius: 999px; }

.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center;
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel);
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-dim); transition: .16s;
}
.chip:hover { color: #fff; border-color: var(--border-strong); }
.chip.active { background: rgba(91,140,255,.18); border-color: rgba(91,140,255,.45); color: #fff; }

.layout-2 { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }

/* 主内容 + 右侧窄信息栏（发布资源 / 积分规则）：左宽右窄，输入框不再被挤扁 */
.content-with-side { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.content-side { position: sticky; top: 88px; }
.content-side .side-card { padding: 16px; margin-bottom: 14px; }
.content-side .side-card h3 { font-size: 14px; margin-bottom: 10px; }
.content-side .mini-item { padding: 7px 0; font-size: 12.5px; gap: 8px; }
.content-side .mini-item .rk { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; }
@media (max-width: 1120px) { .content-with-side { grid-template-columns: 1fr 262px; gap: 18px; } }
@media (max-width: 900px) { .content-with-side { grid-template-columns: 1fr; } .content-side { position: static; } }
.side-nav { position: sticky; top: 88px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 11px;
  color: var(--text-dim); font-weight: 600; font-size: 13.5px; margin-bottom: 3px; transition: .16s; }
.side-nav a:hover { background: var(--panel-2); color: #fff; }
.side-nav a.active { background: rgba(91,140,255,.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(91,140,255,.35); }
.side-nav a .n { margin-left: auto; font-size: 11.5px; color: var(--muted); background: rgba(255,255,255,.07); padding: 2px 8px; border-radius: 999px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--border); }
.kpi .lb { color: var(--muted); font-size: 12.5px; }
.kpi .vl { font-size: 25px; font-weight: 800; margin-top: 4px; letter-spacing: -.5px; }
.kpi .vl small { font-size: 13px; color: var(--muted); font-weight: 600; }

@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-head { grid-template-columns: 1fr; }
  .kpi-grid, .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 32px; }
  .layout-2 { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow: auto; gap: 6px; }
  .side-nav a { white-space: nowrap; }
  .wrap { padding: 0 16px; }
}

/* ================= 新增：置顶 / 标签 ================= */
.res-card { position: relative; }
.badge-top { background: rgba(255,92,138,.2); color: #ff5c8a; font-weight: 700; }
.res-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 2px; }
.tag-chip {
  font-size: 11.5px; color: #8fb0ff; background: rgba(91,140,255,.12);
  border-radius: 999px; padding: 2.5px 9px; cursor: pointer; transition: .14s;
}
.tag-chip:hover { background: rgba(91,140,255,.26); color: #fff; }

/* ================= 站内通知铃铛 ================= */
.bell-wrap {
  position: relative; cursor: pointer; font-size: 17px; line-height: 1;
  padding: 7px 9px; border-radius: 9px; transition: .14s;
  display: flex; align-items: center; user-select: none;
}
.bell-wrap:hover { background: rgba(255, 255, 255, .07); }
.bell-dot {
  position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px;
  border-radius: 999px; background: #ff5c6c; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  padding: 0 4px; box-sizing: border-box;
}
.notif-item {
  display: flex; gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: .12s;
}
.notif-item:hover { background: rgba(255, 255, 255, .045); }
.notif-item.unread { background: rgba(91, 140, 255, .09); }
.notif-del {
  color: var(--muted); font-size: 12px; cursor: pointer;
  align-self: flex-start; padding: 2px 4px; border-radius: 5px; flex-shrink: 0;
}
.notif-del:hover { color: var(--red); background: rgba(255, 92, 108, .12); }

/* ================= 批量选择（一键复制多个资源链接） ================= */
.res-card .batch-box {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 24px; height: 24px; border-radius: 7px; cursor: pointer;
  background: rgba(10, 14, 28, .55); border: 1.5px solid rgba(255, 255, 255, .45);
  display: flex; align-items: center; justify-content: center;
  transition: .14s;
}
.res-card .batch-box .batch-tick { color: transparent; font-size: 14px; font-weight: 700; line-height: 1; }
.res-card .batch-box:hover { border-color: #fff; }
.res-card .batch-box.on {
  background: var(--brand, #5b8cff); border-color: var(--brand, #5b8cff);
}
.res-card .batch-box.on .batch-tick { color: #fff; }

/* ================= 复制成功小弹窗（1 秒自动关闭） ================= */
.mini-pop {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  pointer-events: none; animation: popIn .18s ease;
}
.mini-pop.out { opacity: 0; transition: opacity .2s; }
.mini-pop-box {
  background: rgba(16, 23, 40, .96); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); border-radius: 14px; padding: 14px 26px;
  font-size: 14.5px; font-weight: 700; color: #fff;
}
@keyframes popIn { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ================= 广告 ================= */
.ad-card {
  border-radius: var(--radius); border: 1px dashed rgba(255,176,32,.4);
  background: linear-gradient(160deg, rgba(255,176,32,.07), rgba(255,176,32,.02));
  padding: 16px; height: 100%; transition: .16s;
}
a .ad-card:hover, a:hover .ad-card { border-color: rgba(255,176,32,.8); }
.ad-side {
  border: 1px dashed rgba(255,176,32,.4); border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255,176,32,.07), transparent);
  padding: 18px; margin-bottom: 18px;
}
.ad-side img { width: 100%; border-radius: 10px; margin-top: 10px; }
/* 联盟广告代码容器：避免联盟 iframe 溢出，并保证最小展示高度 */
.ad-card-code { min-height: 100px; }
[data-ad-slot] { min-height: 50px; overflow: hidden; }
[data-ad-slot] iframe, [data-ad-slot] ins { max-width: 100% !important; }

/* ================= 热搜词 / 标签云 ================= */
.hot-words { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 14px; }
.hot-words .hw {
  font-size: 12.5px; color: var(--text-dim); background: rgba(255,255,255,.06);
  border: 1px solid var(--border); padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: .15s;
}
.hot-words .hw:hover { color: #fff; border-color: rgba(91,140,255,.5); background: rgba(91,140,255,.15); }
.hot-words .hw.hot { color: #ff7a9c; border-color: rgba(255,92,138,.4); background: rgba(255,92,138,.1); }
.tag-cloud { display: flex; gap: 9px; flex-wrap: wrap; }
.tag-cloud .tc {
  border: 1px solid var(--border); background: var(--panel); border-radius: 10px;
  padding: 7px 13px; cursor: pointer; color: var(--text-dim); transition: .15s;
}
.tag-cloud .tc:hover { color: #fff; border-color: rgba(91,140,255,.5); transform: translateY(-2px); }
.tag-cloud .tc b { color: var(--brand); font-weight: 700; margin-right: 4px; }

/* ================= 举报弹窗 / 开关 ================= */
/* ---- 分享资源弹窗 ---- */
.share-box { margin: 16px 0; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.share-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.7; }
.share-link { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(91,140,255,.1); color: #8fb0ff; font-family: Consolas,monospace; font-size: 12px; word-break: break-all; }
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btns .btn { flex: 1; min-width: 130px; width: auto !important; justify-content: center; text-decoration: none; }
.radio-line {
  display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text-dim);
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.radio-line:has(input:checked) { border-color: rgba(91,140,255,.55); background: rgba(91,140,255,.1); color: #fff; }
.switch {
  position: relative; width: 44px; height: 24px; border-radius: 999px; flex-shrink: 0;
  background: rgba(255,255,255,.12); border: 1px solid var(--border); cursor: pointer; transition: .18s;
}
.switch::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #8b93a7; transition: .18s;
}
.switch.on { background: rgba(91,140,255,.5); border-color: rgba(91,140,255,.7); }
.switch.on::after { left: 22px; background: #fff; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.set-row:last-child { border-bottom: none; }
.set-row .lb { font-size: 14px; font-weight: 600; }
.set-row .ds { color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ================= 详情页文件清单 ================= */
.dir-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dir-stat {
  flex: 1; min-width: 110px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
}
.dir-stat b { display: block; font-size: 18px; color: var(--brand); }
.dir-stat span { font-size: 12px; color: var(--muted); }
.dir-list { max-height: 300px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.dir-list .fi {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px;
  font-size: 12.5px; color: var(--text-dim); border-bottom: 1px solid var(--border);
}
.dir-list .fi:last-child { border-bottom: none; }
.dir-list .fi .sz { color: var(--muted); flex-shrink: 0; }
.check-badge { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; }
.check-ok { background: rgba(34,197,139,.15); color: #22c58b; }
.check-invalid { background: rgba(255,92,108,.15); color: #ff5c6c; }
.check-unknown { background: rgba(255,255,255,.08); color: var(--muted); }

/* ================= 首页排版：长型胶囊大卡片 ================= */
.cap-list { display: flex; flex-direction: column; gap: 16px; }
.cap-card {
  position: relative; display: flex; align-items: stretch; gap: 0;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 30px; overflow: hidden; cursor: pointer; transition: .2s;
}
.cap-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.cap-thumb {
  position: relative; width: 168px; flex-shrink: 0; min-height: 128px;
  display: grid; place-items: center;
}
.cap-thumb .glyph { font-size: 46px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
.cap-thumb .badge-pan { position: absolute; top: 12px; left: 12px; font-size: 11px; }
.cap-main { flex: 1; min-width: 0; padding: 18px 20px 14px; display: flex; flex-direction: column; }
.cap-title { font-size: 16.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 胶囊卡片的价格 / 免费角标回到标题行内：
   .badge-cost 默认是绝对定位到卡片右上角，而胶囊卡片右上角正是右侧流量列（.cap-side），
   会被「免费」两个字盖住浏览量 / 下载量。这里改回文档流，紧跟标题显示。 */
.cap-card .badge-cost { position: static; backdrop-filter: none; flex-shrink: 0; }
.cap-sum {
  color: var(--muted); font-size: 13px; margin-top: 7px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cap-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.cap-foot {
  margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px;
}
.cap-side {
  flex-shrink: 0; width: 108px; border-left: 1px dashed var(--border);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 14px 10px; color: var(--muted); font-size: 12px;
}
.cap-side b { color: var(--text); font-size: 14px; }
.cap-go {
  margin-top: 4px; padding: 6px 16px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--grad); color: #fff;
}
.cap-card:hover .cap-go { filter: brightness(1.15); }
@media (max-width: 720px) {
  .cap-thumb { width: 108px; min-height: 108px; }
  .cap-side { display: none; }
}

/* ================= 首页排版：紧凑列表 ================= */
.row-list { display: flex; flex-direction: column; gap: 9px; }
.row-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 16px; cursor: pointer; transition: .16s;
}
.row-card:hover { border-color: var(--border-strong); background: var(--panel-2); transform: translateX(3px); }
.row-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 20px;
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 8px; align-items: center; }
.row-meta { color: var(--muted); font-size: 12px; margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.row-right { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }

/* ================= 首页侧栏吸顶 ================= */
.home-side { position: sticky; top: 76px; align-self: start; }
.task-item { cursor: pointer; transition: .15s; border-radius: 10px; }
.task-item:hover { background: rgba(91,140,255,.08); }
.task-done { opacity: .55; }
.task-done .vl { color: var(--green) !important; }

/* ================= 后台：排版样式选择卡 ================= */
.layout-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 6px; }
.layout-opt {
  border: 2px solid var(--border); border-radius: 14px; padding: 14px; cursor: pointer;
  transition: .16s; background: var(--panel);
}
.layout-opt:hover { border-color: rgba(91,140,255,.4); }
.layout-opt.active { border-color: var(--brand); background: rgba(91,140,255,.08); box-shadow: 0 0 0 3px rgba(91,140,255,.15); }
.layout-opt .pv {
  height: 74px; border-radius: 9px; background: rgba(255,255,255,.05);
  border: 1px solid var(--border); margin-bottom: 10px; padding: 8px; display: flex; gap: 6px;
}
.layout-opt .pv i { display: block; border-radius: 4px; background: linear-gradient(135deg, rgba(91,140,255,.5), rgba(167,107,255,.4)); }
.layout-opt .nm { font-size: 13.5px; font-weight: 700; }
.layout-opt .ds { color: var(--muted); font-size: 11.5px; margin-top: 3px; line-height: 1.5; }
.pv-grid { flex-wrap: wrap; }
.pv-grid i { width: calc(50% - 3px); height: calc(50% - 3px); }
.pv-capsule { flex-direction: column; }
.pv-capsule i { width: 100%; height: 15px; border-radius: 999px; }
.pv-list { flex-direction: column; gap: 5px; }
.pv-list i { width: 100%; height: 9px; border-radius: 3px; }
@media (max-width: 720px) { .layout-opts { grid-template-columns: 1fr; } }

/* ================= 首页：内容居中 + 右侧窄边栏 ================= */
.home-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 264px;
  gap: 22px; align-items: start;
}
.home-main { min-width: 0; }
/* 三种排版都在内容区内水平居中 */
#homeGrid > .res-grid,
#homeGrid > .cap-list,
#homeGrid > .row-list { max-width: 860px; margin: 0 auto; }

/* 右侧边栏紧凑化：缩小内边距、字号、行高 */
.home-side { position: sticky; top: 76px; align-self: start; }
.home-side .side-card { padding: 14px 14px 12px; margin-bottom: 14px; border-radius: 14px; }
.home-side .side-card h3 { font-size: 13.5px; margin-bottom: 8px; }
.home-side .mini-item { padding: 6px 0; gap: 8px; font-size: 12.5px; }
.home-side .mini-item .rk { width: 19px; height: 19px; border-radius: 6px; font-size: 11px; }
.home-side .mini-item .avatar { width: 20px !important; height: 20px !important; font-size: 10px !important; }
.home-side .side-card .btn-sm { padding: 6px 10px; font-size: 12px; margin-top: 10px !important; }
.home-side .task-tip { margin-top: 9px; color: var(--muted); font-size: 11px; line-height: 1.6; }

@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; }
  .home-side { position: static; }
}

/* ================= 右上角签到提醒 / 星星积分 ================= */
.sign-remind {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: #ffd76a;
  background: rgba(255,176,32,.14); border: 1px solid rgba(255,176,32,.4);
  transition: .16s; animation: remindPulse 2.2s infinite;
}
.sign-remind:hover { background: rgba(255,176,32,.28); color: #fff; }
@keyframes remindPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,176,32,.35); }
  50% { box-shadow: 0 0 0 6px rgba(255,176,32,0); }
}

/* ================= 登录弹窗：第三方登录 ================= */
.oauth-line { margin-top: 16px; text-align: center; }
.oauth-line > span { color: var(--muted); font-size: 12px; }
.oauth-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--text-dim);
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  transition: .16s;
}
.oauth-btn:hover { color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }

/* ================= 管理后台：导航菜单 / 安全设置 ================= */
.nav-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--border); }
.nav-row:last-child { border-bottom: none; }
.nav-row .lbl { font-weight: 700; font-size: 14px; min-width: 110px; }
.nav-row .lk { color: var(--muted); font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-off { background: rgba(255,255,255,.08); color: var(--muted); font-size: 11px; padding: 2px 9px; border-radius: 999px; }
.badge-on { background: rgba(34,197,139,.15); color: #22c58b; font-size: 11px; padding: 2px 9px; border-radius: 999px; }
.sec-card { margin-bottom: 16px; }
.sec-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; }
.grid-2c { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
@media (max-width: 720px) { .grid-2c { grid-template-columns: 1fr; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
@media (max-width: 720px) { .grid-3 { grid-template-columns: 1fr; } }

/* ================= v6 · VIP 会员 / 收益 / 邀请 ================= */
.badge-vip {
  background: linear-gradient(135deg, rgba(255,176,32,.28), rgba(255,92,138,.24));
  color: #ffd76a; font-weight: 700; border: 1px solid rgba(255,176,32,.4);
}
.vip-tag { font-size: 13px; filter: drop-shadow(0 1px 2px rgba(255,176,32,.5)); }
.avatar { position: relative; }
.vip-crown {
  position: absolute; right: -4px; bottom: -4px; font-size: 11px; line-height: 1;
  background: rgba(10,14,28,.85); border-radius: 999px; padding: 1px;
}
.vip-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; text-decoration: none;
  color: #ffd76a; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.35);
  transition: .16s;
}
.vip-chip:hover { background: rgba(255,176,32,.26); color: #fff; }
.vip-chip.on {
  background: linear-gradient(135deg, rgba(255,176,32,.34), rgba(255,92,138,.26));
  border-color: rgba(255,176,32,.6);
}
.vip-hero {
  background: linear-gradient(135deg, rgba(255,176,32,.12), rgba(255,92,138,.08)) !important;
  border-color: rgba(255,176,32,.35) !important;
}
.vip-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.vip-plan {
  position: relative; text-align: center; padding: 16px 12px 14px;
  border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.04);
  transition: .16s;
}
.vip-plan:hover { border-color: rgba(255,176,32,.5); background: rgba(255,176,32,.07); }
.vip-plan.rec { border-color: rgba(255,176,32,.55); background: rgba(255,176,32,.09); }
.vip-flag {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--grad-gold); color: #3a2400; font-size: 11px; font-weight: 800;
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.vip-plan .vp-name { font-size: 13.5px; font-weight: 700; color: var(--text-dim); }
.vip-plan .vp-price { font-size: 24px; font-weight: 800; color: var(--gold); line-height: 1.25; margin-top: 4px; }
.vip-plan .vp-price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.vip-plan .vp-days { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.vip-plan .btn { width: 100%; }
.vip-benefits { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.vip-b {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 11px; background: rgba(255,176,32,.08); border: 1px solid rgba(255,176,32,.25);
  font-size: 12.5px; color: var(--text-dim);
}
.vip-b > span:first-child { font-size: 18px; }
.vip-b > div { flex: 1; min-width: 0; }
.vip-b b { display: block; font-size: 13px; color: var(--text); }
.vip-b div div { color: var(--muted); font-size: 11.5px; line-height: 1.5; margin-top: 2px; }
.vip-b.off { background: rgba(255,255,255,.03); border-color: var(--border); opacity: .55; }

/* 购买置顶弹窗 */
.top-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.top-opt {
  text-align: center; padding: 12px 6px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--border); background: rgba(255,255,255,.04); transition: .14s;
}
.top-opt:hover { border-color: var(--brand); }
.top-opt.active { border-color: var(--gold); background: rgba(255,176,32,.12); }
.top-opt .th { font-size: 13px; font-weight: 700; }
.top-opt .tp { font-size: 12px; color: var(--gold); margin-top: 3px; }

/* 邀请 */
.invite-code {
  display: inline-block; margin: 12px auto 6px; padding: 8px 22px;
  font-size: 22px; font-weight: 800; letter-spacing: 4px; color: var(--gold);
  background: rgba(255,176,32,.1); border: 1px dashed rgba(255,176,32,.45); border-radius: 12px;
}
.invite-link {
  font-size: 12.5px; color: var(--muted); word-break: break-all;
  padding: 8px 12px; background: rgba(255,255,255,.04); border-radius: 9px; margin-top: 4px;
}
.invite-line {
  font-size: 12.5px; color: var(--text-dim); padding: 8px 12px; margin-bottom: 12px;
  background: rgba(34,197,139,.1); border: 1px solid rgba(34,197,139,.3); border-radius: 9px;
}
.invite-line b { color: var(--gold); letter-spacing: 1px; }

/* ============================================================ v7 · 成长等级 */
.lv-badge {
  display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px;
  font-weight: 700; border: 1px solid transparent; vertical-align: middle; white-space: nowrap;
}
.lv-badge.sm { font-size: 10.5px; padding: 0 6px; }
.lv-bar-wrap { margin-top: 10px; }
.lv-bar-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lv-chip { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 7px; }
.lv-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,.08); margin-top: 7px; overflow: hidden; }
.lv-bar-in { height: 100%; border-radius: 4px; transition: width .4s; }

/* ============================================================ v7 · 求购悬赏 */
.wish-list { display: flex; flex-direction: column; gap: 12px; }
.wish-card {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  cursor: pointer; transition: .16s;
}
.wish-card:hover { border-color: var(--border-strong); transform: translateY(-1px); background: var(--panel-2); }
.wish-reward {
  width: 74px; flex-shrink: 0; text-align: center; padding: 10px 4px; border-radius: 12px;
  background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.3);
}
.wish-reward .wr-num { font-size: 20px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.wish-reward .wr-unit { font-size: 11px; color: var(--muted); margin-top: 2px; }
.wish-main { flex: 1; min-width: 0; }
.wish-title { font-size: 14.5px; font-weight: 700; line-height: 1.45; }
.wish-sum { font-size: 12.5px; color: var(--muted); margin-top: 4px; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wish-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }

.wish-reward-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 14px 16px;
  background: rgba(255,176,32,.08); border: 1px dashed rgba(255,176,32,.35); border-radius: 12px;
}
.wrb-num { font-size: 26px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.wrb-unit { font-size: 11.5px; color: var(--muted); }

.reply-item {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px;
  background: rgba(255,255,255,.03);
}
.reply-item.accepted { border-color: rgba(34,197,139,.4); background: rgba(34,197,139,.08); }

/* ============================================================ v7 · 资源合集 */
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.col-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; cursor: pointer; transition: .16s;
}
.col-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.col-cover {
  position: relative; height: 88px; display: flex; align-items: center; justify-content: center;
}
.col-cover .glyph { font-size: 34px; }
.col-count {
  position: absolute; left: 12px; bottom: 10px; font-size: 11.5px; color: var(--text-dim);
  background: rgba(0,0,0,.35); padding: 2px 8px; border-radius: 6px;
}
.col-body { padding: 12px 14px 14px; }
.col-title { font-size: 14px; font-weight: 700; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-sum { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.6; min-height: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.col-item { position: relative; }
.col-item-del { position: relative; z-index: 2; }
.col-pick { max-height: 220px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.03); }
.col-pick .radio-line { margin: 4px 0; }

/* ============================================================ v7 · 作者主页 / 关注 */
.user-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.user-stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.user-stats b { color: var(--text); font-size: 14px; }
.fol-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 11px;
  transition: .14s; text-decoration: none; color: inherit;
}
.fol-item:hover { background: var(--panel-2); }
.feed-authors { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.feed-author {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--border); font-size: 12.5px; text-decoration: none; color: var(--text-dim);
}
.feed-author:hover { border-color: var(--brand); color: var(--text); }
.btn-follow { transition: .14s; }

/* 详情页侧栏所属合集 */
.side-cols { display: flex; flex-direction: column; gap: 8px; }
.side-col {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border); text-decoration: none; color: var(--text-dim);
  font-size: 12.5px; transition: .14s;
}
.side-col:hover { border-color: var(--brand); color: var(--text); }
.side-col .sc-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-col .sc-n { color: var(--muted); font-size: 11.5px; flex-shrink: 0; }

@media (max-width: 560px) {
  .wish-card { flex-direction: column; align-items: flex-start; }
  .wish-reward { width: 100%; display: flex; gap: 8px; align-items: baseline; justify-content: center; }
  .user-hero { flex-direction: column; align-items: flex-start; }
}

/* 首页求购 / 合集双栏 */
.home-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .home-2col { grid-template-columns: 1fr; } }

/* ============================================================
   v8 · 搜索联想下拉
   ============================================================ */
.sug-host { position: relative; display: block; }
.hero-search .sug-host { flex: 1; min-width: 0; }
.sug-host > input { width: 100%; }

.sug-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: #101728; border: 1px solid var(--border-strong); border-radius: 14px;
  box-shadow: 0 22px 48px -14px rgba(0,0,0,.8); overflow: hidden;
  max-height: 380px; overflow-y: auto; text-align: left;
}
.sug-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  cursor: pointer; font-size: 13.5px; border-bottom: 1px solid rgba(255,255,255,.05);
}
.sug-item:last-child { border-bottom: 0; }
.sug-item:hover, .sug-item.active { background: rgba(91,140,255,.14); }
.sug-ic { flex-shrink: 0; width: 20px; text-align: center; opacity: .85; }
.sug-tx { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-sub { flex-shrink: 0; color: var(--muted); font-size: 11.5px; }
.sug-foot { padding: 8px 16px; border-top: 1px solid var(--border); text-align: right; }
.sug-foot button {
  background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px;
}
.sug-foot button:hover { color: var(--brand); }

/* ============================================================
   v8 · 资源评分
   ============================================================ */
.stars { display: inline-flex; gap: 1px; }
.stars .st { font-style: normal; color: rgba(255,255,255,.18); font-size: 13px; }
.stars .st.full, .stars .st.half { color: var(--gold); }
.stars.lg .st { font-size: 17px; }

.rating-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: rgba(255,176,32,.14); color: var(--gold);
  border: 1px solid rgba(255,176,32,.28); border-radius: 6px;
  padding: 1px 7px; font-size: 12px; font-weight: 600; white-space: nowrap;
}

.rating-box { border: 1px solid var(--border); }
.rating-box-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.rating-owner { color: var(--text-dim); font-size: 13.5px; }

.star-picker { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sp-stars { display: flex; gap: 4px; }
.sp-star {
  font-style: normal; font-size: 30px; line-height: 1; cursor: pointer;
  color: rgba(255,255,255,.16); transition: color .12s, transform .12s; user-select: none;
}
.sp-star:hover { transform: scale(1.12); }
.sp-star.on { color: var(--gold); }
.sp-info { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.sp-info .sp-avg { font-size: 22px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.sp-info .sp-cnt, .sp-info .sp-my { color: var(--muted); }

.rating-list { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.rl-title { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.rl-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.rl-nm { font-weight: 600; }
.rl-st { color: var(--gold); letter-spacing: 1px; }
.rl-t { margin-left: auto; color: var(--muted); font-size: 11.5px; }

/* ============================================================
   v8 · 收藏夹分组
   ============================================================ */
.fav-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.ff-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; font-size: 13px;
  background: var(--panel); border: 1px solid var(--border); color: var(--text-dim);
}
.ff-chip b { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.ff-chip:hover { border-color: var(--border-strong); color: var(--text); }
.ff-chip.active { background: rgba(91,140,255,.16); border-color: var(--brand); color: var(--brand); }
.ff-chip.active b { color: var(--brand); }
.ff-op { font-style: normal; font-size: 11.5px; opacity: .55; padding: 0 2px; }
.ff-op:hover { opacity: 1; color: var(--brand); }

.fav-wrap { position: relative; }
.fav-sel {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  background: rgba(10,16,32,.88); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 8px; font-size: 11.5px; padding: 4px 6px; max-width: 118px; outline: none;
}

/* ============================================================
   v8 · 微信内打开引导
   ============================================================ */
.wx-tip {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 0;
  padding: 12px 14px; border-radius: 12px;
  background: rgba(255,176,32,.1); border: 1px solid rgba(255,176,32,.32);
}
.wx-tip-ic { font-size: 22px; }
.wx-tip-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wx-tip-tx b { font-size: 13.5px; color: var(--gold); }
.wx-tip-tx span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.wx-tip-btn {
  background: var(--gold); color: #241a05; border: 0; border-radius: 8px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.wx-tip-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 2px; }

/* ============================================================
   v8 · 移动端与微信内体验
   ============================================================ */
@media (max-width: 720px) {
  /* 卡片信息更紧凑，避免小屏上文字被挤到换行 */
  .res-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-search { flex-direction: column; gap: 10px; }
  .hero-search .btn { height: 46px; width: 100%; }
  .hero-search input { height: 48px; }
  /* 触摸目标放大到 40px 以上 */
  .btn { min-height: 40px; }
  .chip { padding: 8px 14px; }
  .action-row { gap: 8px; }
  .action-row .btn { flex: 1 1 auto; min-width: 96px; justify-content: center; }
  /* 表格横向滚动，别把页面撑宽 */
  .table { display: block; overflow-x: auto; white-space: nowrap; }
  /* 详情页评分区在小屏改为纵向 */
  .star-picker { gap: 10px; }
  .sp-star { font-size: 26px; }
  .fav-sel { position: static; display: block; width: 100%; max-width: none; margin-bottom: 8px; }
}

/* 详情页移动端底部常驻操作条 */
.mobile-actions {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: rgba(10,16,32,.96); border-top: 1px solid var(--border);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  gap: 10px;
}
.mobile-actions .btn { flex: 1; min-height: 44px; }
@media (max-width: 720px) {
  .mobile-actions { display: flex; }
  body.has-mobile-actions .wrap { padding-bottom: 76px; }
}

/* iOS 安全区：底部内容不被小黑条挡住 */
@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 720px) {
    .wrap { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  }
}
