/* ============================================================
   全站公告 · 前台样式（公告栏 / 弹窗 / 弹幕 / 公告中心）
   主题变量沿用站点：--card / --text / --muted / --bg
   ============================================================ */

/* ---------- 1. 公告栏 ---------- */
.nq-nb-slot { margin-top: 18px; }
.nq-nb-slot:empty { display: none; }
.nq-nb { margin: 0 0 2px; }
.nq-nb-top { padding: 14px 0 0; }
.nq-nb-in {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 10px 16px;
  border-radius: 12px;
  background: var(--card, #fff);
  border: 1px solid rgba(120, 140, 170, .18);
  overflow: hidden;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
.nq-nb-in::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c);
}
.nq-nb-in:hover { box-shadow: 0 8px 22px rgba(16, 24, 40, .09); border-color: var(--c); }
.nq-nb-link {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  text-decoration: none; color: var(--text, #1f2937);
}
.nq-nb-ico {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 8px; background: var(--t); font-size: 15px;
}
.nq-nb-tag {
  flex: none; font-size: 12px; font-weight: 700; line-height: 1;
  padding: 5px 9px; border-radius: 999px; color: var(--c); background: var(--t);
}
.nq-nb-txt {
  flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.55;
  white-space: nowrap; overflow: hidden;
  color: var(--muted, #5b6478);
}
.nq-nb-txt b { color: var(--text, #1f2937); font-weight: 700; }
.nq-nb-s {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nq-nb-txt.sc .nq-nb-s {
  display: inline-block; overflow: visible; text-overflow: clip;
  animation: nqMarq 18s linear infinite;
}
@keyframes nqMarq {
  0%, 8%   { transform: translateX(0); }
  92%, 100% { transform: translateX(-100%); }
}
.nq-nb-btn {
  flex: none; font-size: 12.5px; font-weight: 700; line-height: 1;
  padding: 7px 14px; border-radius: 999px; background: var(--c); color: #fff;
  white-space: nowrap;
}
.nq-nb-x {
  flex: none; width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: rgba(120, 140, 170, .12); color: var(--muted, #8a94a6);
  font-size: 12px; line-height: 1; cursor: pointer; padding: 0;
  transition: background .15s, color .15s;
}
.nq-nb-x:hover { background: rgba(120, 140, 170, .24); color: var(--text, #1f2937); }

/* 宽屏：右侧固定悬浮工具条（.float-nav，宽 54 + 右边距）会压住内容区右端，
   公告栏把右侧留白让出来，避免「查看详情 / 关闭」被浮窗盖住 */
@media (min-width: 1024px) {
  .nq-nb-in { padding-right: 58px; }
}

/* ---------- 2. 弹窗 ---------- */
.nq-np-open { overflow: hidden; }
.nq-np-mask {
  position: fixed; inset: 0; z-index: 10060;
  display: flex; align-items: center; justify-content: center;
  padding: 22px 18px;
  background: rgba(9, 14, 24, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  animation: nqFade .18s ease-out;
}
@keyframes nqFade { from { opacity: 0; } to { opacity: 1; } }
.nq-np {
  width: min(var(--w, 460px), 100%);
  max-height: 82vh; display: flex; flex-direction: column;
  background: var(--card, #fff); border-radius: 18px; overflow: hidden;
  box-shadow: 0 26px 64px rgba(6, 12, 26, .38);
  animation: nqPop .26s cubic-bezier(.18, .9, .32, 1.18);
}
@keyframes nqPop { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.nq-np-h {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 18px;
  background: linear-gradient(135deg, var(--c), var(--c2));
  color: #fff;
}
.nq-np-h::after {
  content: ''; position: absolute; right: -30px; top: -46px;
  width: 130px; height: 130px; border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.nq-np-ico {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; font-size: 21px;
  background: rgba(255, 255, 255, .2);
}
.nq-np-hb { flex: 1; min-width: 0; position: relative; z-index: 1; }
.nq-np-tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 4px 8px; border-radius: 999px; background: rgba(255, 255, 255, .22); margin-bottom: 7px;
}
.nq-np-t {
  margin: 0; font-size: 17px; line-height: 1.35; font-weight: 800;
  word-break: break-word;
}
.nq-np-x {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  width: 28px; height: 28px; border: 0; border-radius: 50%; padding: 0;
  background: rgba(255, 255, 255, .18); color: #fff; font-size: 13px; line-height: 1;
  cursor: pointer;
}
.nq-np-x:hover { background: rgba(255, 255, 255, .32); }
.nq-np-b { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 6px; }
.nq-np-txt {
  font-size: 14px; line-height: 1.85; color: var(--text, #33415c);
  white-space: pre-wrap; word-break: break-word;
}
.nq-np-f {
  flex: none; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 14px 20px 18px;
}
.nq-np-go, .nq-np-ok {
  font-size: 13.5px; font-weight: 700; line-height: 1;
  padding: 11px 20px; border-radius: 10px; border: 0; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.nq-np-go { background: var(--c); color: #fff; order: 2; }
.nq-np-ok { background: rgba(120, 140, 170, .14); color: var(--text, #33415c); order: 1; }
.nq-np-go:hover { filter: brightness(1.06); }
.nq-np-ok:hover { background: rgba(120, 140, 170, .24); }

/* ---------- 3. 弹幕 ---------- */
.nq-dm { position: fixed; inset: 0; z-index: 10055; pointer-events: none; overflow: hidden; }
.nq-dm-i {
  position: absolute; left: 100%; top: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(12, 18, 32, .62);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-weight: 600; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(4, 8, 18, .28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  will-change: transform;
}
.nq-dm-i::before {
  content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 8px var(--c);
}
@keyframes nqDmFly {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-100vw - 120%), 0, 0); }
}

/* ---------- 4. 公告中心 ---------- */
.nq-page { padding: 12px 0 30px; }
.nq-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 20px 20px 18px; margin-bottom: 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef3ff, #f7faff);
  border: 1px solid rgba(52, 102, 255, .14);
}
.nq-hero h1 { margin: 0 0 6px; font-size: 22px; line-height: 1.3; color: #16233c; }
.nq-hero p { margin: 0; font-size: 13px; color: #5b6478; }
.nq-hero-back { font-size: 12.5px; color: #3466ff; text-decoration: none; white-space: nowrap; }
.nq-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.nq-tabs::-webkit-scrollbar { display: none; }
.nq-tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  padding: 7px 14px; border-radius: 999px;
  background: var(--card, #fff); color: var(--muted, #5b6478);
  border: 1px solid rgba(120, 140, 170, .2);
}
.nq-tab i { font-style: normal; }
.nq-tab.on { background: #3466ff; border-color: #3466ff; color: #fff; }
.nq-list { display: grid; gap: 12px; grid-template-columns: 1fr; }
.nq-card {
  position: relative; display: block; padding: 15px 16px 13px;
  border-radius: 14px; text-decoration: none;
  background: var(--card, #fff);
  border: 1px solid rgba(120, 140, 170, .18);
  transition: box-shadow .18s, transform .18s, border-color .18s;
  overflow: hidden;
}
.nq-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c);
}
.nq-card:hover { box-shadow: 0 10px 26px rgba(16, 24, 40, .09); border-color: var(--c); transform: translateY(-1px); }
.nq-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.nq-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 5px 9px; border-radius: 999px;
  color: var(--c); background: rgba(120, 140, 170, .14);
}
.nq-mode { font-size: 11.5px; color: var(--muted, #8a94a6); margin-left: auto; }
.nq-card h3 {
  margin: 0 0 7px; font-size: 15.5px; line-height: 1.5; font-weight: 700;
  color: var(--text, #16233c); word-break: break-word;
}
.nq-card p {
  margin: 0 0 10px; font-size: 13px; line-height: 1.7; color: var(--muted, #5b6478);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nq-meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted, #98a2b3); }
.nq-more { margin-left: auto; color: #3466ff; font-weight: 600; }
.nq-state { color: #e0457b; font-weight: 600; }
.nq-empty { padding: 54px 0; text-align: center; color: var(--muted, #98a2b3); }
.nq-empty b { font-size: 34px; display: block; margin-bottom: 10px; }
.nq-empty p { margin: 0; font-size: 13.5px; }

/* 详情 */
.nq-detail {
  position: relative; padding: 22px 22px 18px; border-radius: 16px;
  background: var(--card, #fff); border: 1px solid rgba(120, 140, 170, .18);
  overflow: hidden;
}
.nq-detail::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--c);
}
.nq-detail-head { padding-bottom: 14px; border-bottom: 1px dashed rgba(120, 140, 170, .26); }
.nq-detail-head h1 {
  margin: 10px 0 10px; font-size: 21px; line-height: 1.45; color: var(--text, #16233c);
  word-break: break-word;
}
.nq-detail-body { padding: 16px 0 6px; }
.nq-detail-body p {
  margin: 0 0 10px; font-size: 14px; line-height: 1.9; color: var(--text, #33415c);
  word-break: break-word;
}
.nq-gap { height: 8px; }
.nq-detail-foot { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 14px; }
.nq-btn {
  font-size: 13px; font-weight: 700; line-height: 1;
  padding: 11px 20px; border-radius: 10px; text-decoration: none;
  background: var(--c); color: #fff;
}
.nq-btn.ghost { background: rgba(120, 140, 170, .14); color: var(--text, #33415c); }
.nq-pn { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 12.5px; }
.nq-pn a { color: #3466ff; text-decoration: none; max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 5. 暗色 ---------- */
html[data-theme=dark] .nq-hero { background: linear-gradient(135deg, #1a2438, #161d2c); border-color: rgba(255, 255, 255, .08); }
html[data-theme=dark] .nq-hero h1 { color: #e8eefb; }
html[data-theme=dark] .nq-hero p { color: #93a0b8; }
html[data-theme=dark] .nq-card,
html[data-theme=dark] .nq-detail,
html[data-theme=dark] .nq-nb-in { background: #1c2533; border-color: rgba(255, 255, 255, .09); }
html[data-theme=dark] .nq-card h3,
html[data-theme=dark] .nq-detail-head h1,
html[data-theme=dark] .nq-detail-body p { color: #d7dfec; }
html[data-theme=dark] .nq-nb-txt b { color: #e6edf9; }
html[data-theme=dark] .nq-tab { background: #1c2533; border-color: rgba(255, 255, 255, .09); color: #93a0b8; }
html[data-theme=dark] .nq-tab.on { background: #3466ff; border-color: #3466ff; color: #fff; }
html[data-theme=dark] .nq-np { background: #1c2533; }
html[data-theme=dark] .nq-np-txt { color: #d7dfec; }
html[data-theme=dark] .nq-np-ok { background: rgba(255, 255, 255, .1); color: #d7dfec; }
html[data-theme=dark] .nq-btn.ghost { background: rgba(255, 255, 255, .1); color: #d7dfec; }
html[data-theme=dark] .nq-nb-x { background: rgba(255, 255, 255, .1); color: #93a0b8; }

/* ---------- 6. 响应式 ---------- */
@media (min-width: 900px) {
  .nq-page { padding: 26px 0 50px; }
  .nq-hero { padding: 26px 28px; }
  .nq-hero h1 { font-size: 26px; }
  .nq-list { grid-template-columns: 1fr 1fr; }
  .nq-detail { padding: 28px 32px 22px; }
  .nq-detail-head h1 { font-size: 24px; }
}
@media (max-width: 560px) {
  .nq-nb-tag { display: none; }
  .nq-nb-btn { display: none; }
  .nq-nb-in { padding: 9px 10px 9px 14px; }
  .nq-nb-ico { width: 22px; height: 22px; font-size: 13px; }
  .nq-nb-txt { font-size: 13px; }
  .nq-nb-link::after {
    content: '›'; flex: none; margin-left: auto; padding-left: 6px;
    font-size: 16px; line-height: 1; color: var(--muted, #98a2b3); opacity: .8;
  }
  .nq-np { max-height: 78vh; }
  .nq-np-f { padding: 12px 16px 16px; }
  .nq-np-go, .nq-np-ok { flex: 1; text-align: center; }
  .nq-detail { padding: 18px 16px 16px; }
  .nq-detail-head h1 { font-size: 19px; }
}
