/* ============================================================
   news-redesign.css — 新闻详情内页（news.html 专属）
   藏蓝 + 暖金编辑风 · 文章版式 · 分享栏 · 相关阅读
   ============================================================ */

/* ---------------- 文章头图区 ---------------- */
.ns-hero {
  position: relative;
  overflow: hidden;
  padding: 138px 0 64px;
  color: #fff;
  background: linear-gradient(152deg, #0b2f6e 0%, #071e4d 40%, #051233 68%, #030b20 100%);
}
.nsh-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140, 200, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 200, 255, .07) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 86% 90% at 30% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 86% 90% at 30% 30%, #000 30%, transparent 100%);
}
.nsh-ribbon {
  position: absolute;
  left: -6%;
  top: 30%;
  width: 112%;
  height: 46px;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .6;
  background: linear-gradient(90deg,
    transparent 0%, rgba(120, 200, 255, .16) 18%, rgba(0, 209, 104, .18) 46%,
    rgba(120, 200, 255, .16) 72%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 55%, transparent 92%);
  mask-image: linear-gradient(90deg, #000 55%, transparent 92%);
  transform: rotate(-5deg);
  animation: nshDrift 11s linear infinite;
}
@keyframes nshDrift { from { translate: -160px 0; } to { translate: 160px 0; } }
.nsh-ghost {
  position: absolute;
  top: 8px; right: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(110px, 13vw, 200px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(140, 200, 255, .16);
  pointer-events: none;
  user-select: none;
}
.nsh-head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
}
.nsh-head h1 {
  margin: 14px 0 0;
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.55;
  letter-spacing: -.01em;
  color: #fff;
  animation: nshIn .9s cubic-bezier(.22, 1, .36, 1) .12s backwards;
}
@keyframes nshIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.ns-catline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; animation: nshIn .8s ease .05s backwards; }
.ns-metaline {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 12.5px;
  color: rgba(207, 234, 255, .82);
  animation: nshIn .8s ease .3s backwards;
}
.ns-metaline .ns-views {
  color: rgba(207, 234, 255, .88);
  background: rgba(120, 200, 255, .1);
  border-color: rgba(120, 200, 255, .3);
}
.ns-metaline .ns-views svg { color: #40b6ff; }

/* ---------------- 分享栏 ---------------- */
.ns-sharebox {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  animation: nshIn .9s ease .4s backwards;
}
.ns-share-label {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: rgba(207, 234, 255, .62);
}
.ns-share { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ns-shbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 200, 255, .3);
  background: rgba(120, 200, 255, .08);
  color: rgba(207, 234, 255, .94);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .3s, border-color .3s, transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .3s, color .3s;
}
.ns-shbtn svg { width: 16px; height: 16px; }
.ns-shbtn:hover {
  transform: translateY(-3px);
  background: #40b6ff;
  border-color: #40b6ff;
  color: #04234d;
  box-shadow: 0 10px 24px rgba(64, 182, 255, .32);
  text-decoration: none;
}
.ns-shbtn i { font-style: normal; }
.ns-like {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .9);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background .3s, border-color .3s, transform .4s cubic-bezier(.34, 1.56, .64, 1), color .3s;
}
.ns-like svg { width: 15px; height: 15px; }
.ns-like b { font-variant-numeric: tabular-nums; }
.ns-like:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }
.ns-like.is-on {
  background: linear-gradient(135deg, #006AFF, #00D168);
  border-color: transparent;
  color: #fff;
}
.ns-like.is-on svg { fill: currentColor; }
.ns-like.pop { animation: nsPop .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes nsPop { 40% { transform: scale(1.18); } }

/* ---------------- 正文版式 ---------------- */
.ns-body-sec { padding: clamp(40px, 5vw, 72px) 0; }
.ns-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}
.ns-article {
  max-width: 760px;
  animation: nshIn .9s ease .1s backwards;
}
.ns-cover {
  margin: 0 0 30px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(10, 25, 60, .14);
  border: 1px solid var(--line, #e3eaf5);
}
.ns-cover img { width: 100%; display: block; aspect-ratio: 16 / 8.4; object-fit: cover; }
.ns-paragraphs p {
  margin: 0 0 20px;
  font-size: 15.5px;
  line-height: 2.15;
  color: var(--ink-2, #2a3a56);
  text-align: justify;
}
.ns-paragraphs p:first-child::first-letter {
  font-size: 2.9em;
  font-weight: 800;
  float: left;
  line-height: 1;
  margin: 4px 10px 0 0;
  color: #0069f5;
}
.ns-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.ns-tags span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #64748b);
  padding: 4px 13px;
  border-radius: 999px;
  background: rgba(20, 36, 63, .05);
  border: 1px solid rgba(20, 36, 63, .09);
  transition: color .3s, border-color .3s, background .3s;
}
.ns-tags span:hover { color: #0069f5; border-color: rgba(0, 106, 245, .3); background: rgba(0, 106, 245, .06); }
.ns-byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #f6f9fe;
  border: 1px solid var(--line, #e3eaf5);
}
.ns-byline__ava {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--grad-brand, linear-gradient(135deg, #006AFF, #00D168));
}
.ns-byline b { display: block; font-size: 14px; color: var(--ink, #14243f); }
.ns-byline em { font-style: normal; font-size: 12px; color: var(--muted, #64748b); }

/* ---------------- 侧栏 ---------------- */
.ns-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 96px; }
.ns-side__card {
  border-radius: 20px;
  padding: 24px 22px;
  border: 1px solid var(--line, #e3eaf5);
  background: #fff;
  box-shadow: 0 14px 34px rgba(10, 25, 60, .06);
}
.ns-side__card--cta {
  background:
    radial-gradient(circle at 88% 0%, rgba(0, 209, 104, .16), transparent 55%),
    linear-gradient(150deg, #0f1c42, #0a1230);
  border-color: transparent;
  color: #fff;
}
.ns-side__card--cta b { display: block; font-size: 16.5px; line-height: 1.6; }
.ns-side__card--cta p { margin: 10px 0 18px; font-size: 12.5px; line-height: 1.9; color: rgba(248, 231, 192, .85); }
.ns-side__card--cta .ed-btn { width: 100%; justify-content: center; }
.ns-side__t {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink, #14243f);
  margin-bottom: 6px;
}
.ns-hot { list-style: none; margin: 0; padding: 0; counter-reset: hot; }
.ns-hot li { counter-increment: hot; border-top: 1px dashed var(--line, #e3eaf5); }
.ns-hot li:first-child { border-top: 0; }
.ns-hot a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 2px;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-2, #2a3a56);
  transition: color .3s;
}
.ns-hot a::before {
  content: counter(hot, decimal-leading-zero);
  font-size: 12px;
  font-weight: 800;
  color: #b9c6dc;
  font-variant-numeric: tabular-nums;
  transition: color .3s;
}
.ns-hot a:hover { color: #0069f5; }
.ns-hot a:hover::before { color: #0069f5; }
.ns-hot time { margin-left: auto; flex: none; font-size: 11px; color: var(--muted, #64748b); }

/* ---------------- 上一篇 / 下一篇 ---------------- */
.ns-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: clamp(30px, 4vw, 48px);
}
.ns-pn a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line, #e3eaf5);
  text-decoration: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s, border-color .4s;
}
.ns-pn a:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 106, 245, .3);
  box-shadow: 0 16px 38px rgba(0, 106, 255, .1);
}
.ns-pn a:last-child { text-align: right; align-items: flex-end; }
.ns-pn small { font-size: 11px; letter-spacing: .18em; color: var(--muted, #64748b); }
.ns-pn b { font-size: 13.5px; line-height: 1.7; color: var(--ink, #14243f); }
.ns-backrow { display: flex; justify-content: center; margin-top: 26px; }
.ns-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--line, #e3eaf5);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2, #2a3a56);
  text-decoration: none;
  transition: color .3s, border-color .3s, transform .4s cubic-bezier(.22, 1, .36, 1), box-shadow .4s;
}
.ns-back svg { width: 15px; height: 15px; transition: transform .4s cubic-bezier(.22, 1, .36, 1); }
.ns-back:hover { color: #0069f5; border-color: rgba(0, 106, 245, .35); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 106, 255, .1); }
.ns-back:hover svg { transform: translateX(-4px); }
.ns-rel-sec { padding-top: clamp(36px, 4vw, 56px); }

/* ---------------- 微信扫码弹窗 ---------------- */
.ns-qrmodal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; }
.ns-qrmodal[hidden] { display: none; }
.ns-qrmask {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 34, .6);
  backdrop-filter: blur(6px);
  animation: nsFade .3s ease;
}
@keyframes nsFade { from { opacity: 0; } }
.ns-qrcard {
  position: relative;
  width: min(320px, calc(100vw - 48px));
  border-radius: 22px;
  background: #fff;
  padding: 28px 26px 24px;
  text-align: center;
  box-shadow: 0 40px 90px rgba(4, 10, 30, .4);
  animation: nsCard .4s cubic-bezier(.22, 1, .36, 1);
}
@keyframes nsCard { from { opacity: 0; transform: translateY(26px) scale(.96); } }
.ns-qrcard > b { font-size: 16px; color: var(--ink, #14243f); }
.ns-qr-imgbox {
  position: relative;
  width: 190px;
  height: 190px;
  margin: 18px auto;
  border-radius: 14px;
  overflow: hidden;
  background: #f6f9fe;
  border: 1px solid var(--line, #e3eaf5);
}
.ns-qr-imgbox img { width: 100%; height: 100%; object-fit: cover; }
.ns-qr-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted, #64748b);
  background: #f6f9fe;
}
.ns-qrcard p { margin: 0; font-size: 12px; line-height: 1.9; color: var(--muted, #64748b); }
.ns-qr-close {
  position: absolute;
  top: 10px; right: 12px;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 36, 63, .06);
  color: var(--ink-2, #2a3a56);
  font-size: 18px;
  cursor: pointer;
  transition: background .3s, transform .3s;
}
.ns-qr-close:hover { background: rgba(20, 36, 63, .12); transform: rotate(90deg); }

/* 文章不存在 */
.ns-missing {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  color: var(--muted, #64748b);
  font-size: 15px;
}

/* 分隔点 & 复制提示 */
.ns-msep { width: 1px; height: 12px; background: rgba(120, 200, 255, .38); }
.ns-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 950;
  transform: translate(-50%, 16px);
  padding: 11px 22px;
  border-radius: 999px;
  background: #14243f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(4, 10, 30, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s, transform .45s cubic-bezier(.22, 1, .36, 1);
}
.ns-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1060px) {
  .ns-layout { grid-template-columns: 1fr; }
  .ns-side { position: static; flex-direction: row; }
  .ns-side__card { flex: 1; }
}
@media (max-width: 760px) {
  .nsh-head { grid-template-columns: 1fr; }
  .ns-sharebox { align-items: flex-start; }
  .ns-share { justify-content: flex-start; }
  .ns-hero { padding: 120px 0 48px; }
  .nsh-ghost { display: none; }
}
@media (max-width: 640px) {
  .ns-pn { grid-template-columns: 1fr; }
  .ns-pn a:last-child { text-align: left; align-items: flex-start; }
  .ns-side { flex-direction: column; }
  .ns-paragraphs p:first-child::first-letter { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nsh-ribbon, .nsh-head h1, .ns-catline, .ns-metaline, .ns-sharebox, .ns-article, .ns-qrcard, .ns-qrmask, .ns-like.pop { animation: none !important; }
  .ns-shbtn:hover, .ns-back:hover, .ns-pn a:hover { transform: none; }
}
