/* ============ 牛逼服 Wiki 自定义样式 ============ */

:root {
  --nb-red: #e63946;
  --nb-red-dark: #b3202c;
  --nb-gold: #f4a261;
  --nb-ink: #0d0d0f;
  --nb-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
             "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --nb-mono: "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

body,
input,
textarea,
select {
  font-family: var(--nb-font);
}

code,
kbd,
pre {
  font-family: var(--nb-mono);
}

/* ---------- 顶部横幅 ---------- */
.nb-announce {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.nb-announce__text {
  opacity: 0.92;
  font-size: 0.78rem;
  letter-spacing: 0.2px;
}

.nb-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.7;
  white-space: nowrap;
}

.nb-tag--free {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.nb-tag--adult {
  background: var(--nb-red);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

/* ---------- 首页 Hero ---------- */
.nb-hero {
  margin: 0 0 1.6rem;
  padding: 2.2rem 1.8rem;
  border-radius: 14px;
  background:
    radial-gradient(1200px 300px at 10% -20%, rgba(230, 57, 70, 0.35), transparent 60%),
    linear-gradient(135deg, #16161a 0%, #0b0b0d 100%);
  color: #f2f2f2;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

.nb-hero__logo {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 0 0.9rem;
  filter: drop-shadow(0 6px 18px rgba(230, 57, 70, 0.35));
}

.nb-hi {
  color: var(--nb-red);
  font-weight: 700;
}

.nb-hero h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #fff;
}

.nb-hero p {
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  line-height: 1.8;
}

.nb-hero__badges {
  margin: 0.9rem 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nb-hero__badges .nb-tag {
  font-size: 0.72rem;
  padding: 3px 11px;
}

.nb-tag--ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e9e9e9;
  font-weight: 600;
}

/* ---------- 18+ 警告条 ---------- */
.nb-agegate {
  border-left: 4px solid var(--nb-red);
  background: linear-gradient(90deg, rgba(230, 57, 70, 0.12), rgba(230, 57, 70, 0.02));
  box-shadow: none;
}

[data-md-color-scheme="slate"] .nb-agegate {
  background: linear-gradient(90deg, rgba(230, 57, 70, 0.18), rgba(230, 57, 70, 0.03));
}

/* ---------- 公益服声明 ---------- */
.nb-nonprofit {
  border-left: 4px solid #2a9d8f;
  background: linear-gradient(90deg, rgba(42, 157, 143, 0.12), rgba(42, 157, 143, 0.02));
}

/* ---------- 卡片网格 ---------- */
.grid.cards > ul > li {
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.grid.cards > ul > li:hover {
  transform: translateY(-3px);
  border-color: var(--nb-red);
  box-shadow: 0 14px 30px -18px rgba(230, 57, 70, 0.55);
}

.grid.cards > ul > li > hr {
  margin: 0.6rem 0;
  border-bottom-color: rgba(128, 128, 128, 0.25);
}

/* ---------- 关键数字 ---------- */
.nb-kpi {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 1.2rem 0;
}

.nb-kpi > div {
  flex: 1 1 140px;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid rgba(128, 128, 128, 0.18);
}

.nb-kpi b {
  display: block;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--nb-red);
}

.nb-kpi span {
  font-size: 0.8rem;
  opacity: 0.75;
}

/* ---------- 黑名单 / 白名单 ---------- */
.md-typeset ul.nb-blocklist,
.md-typeset ul.nb-allowlist,
.md-typeset .nb-blocklist,
.md-typeset .nb-allowlist {
  margin: 0.4rem 0 0;
  padding-left: 0;
  list-style: none;
}

.md-typeset .nb-blocklist li::before,
.md-typeset .nb-allowlist li::before {
  content: none;
}

.md-typeset .nb-blocklist li,
.md-typeset .nb-allowlist li {
  margin: 0.35rem 0;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-weight: 500;
  list-style: none;
}

.nb-blocklist li {
  background: rgba(230, 57, 70, 0.09);
  border-left: 3px solid rgba(230, 57, 70, 0.65);
}

.nb-allowlist li {
  background: rgba(42, 157, 143, 0.09);
  border-left: 3px solid rgba(42, 157, 143, 0.65);
}

.md-typeset .nb-blocklist li,
.md-typeset .nb-allowlist li {
  margin-left: 0;
}

/* ---------- 表格 ---------- */
.md-typeset table:not([class]) th {
  background: rgba(128, 128, 128, 0.12);
  font-weight: 700;
}

/* ---------- 页脚 ---------- */
.md-footer-meta {
  background-color: rgba(0, 0, 0, 0.55);
}
