* { box-sizing: border-box; }

/*
 * 整页背景挂在 <html class="news-theme--*">，避免只改 body 时被浏览器默认底色或缓存旧 CSS 盖住，
 * 与 /news（晴天）、文章页（雨天）形成一眼可辨的对比。
 */
html {
  height: 100%;
}
html.news-theme--dark {
  min-height: 100%;
  background: radial-gradient(circle at 15% 10%, #183d7b 0%, #07162f 42%, #030915 100%);
}
html.news-theme--sunny {
  min-height: 100%;
  background:
    linear-gradient(195deg, #fff6dc 0%, #ffecc8 12%, #dff2ff 38%, #9fd8ff 78%, #6ab8f5 100%);
}
html.news-theme--rain {
  min-height: 100%;
  background: linear-gradient(172deg, #03060c 0%, #0d1a2e 45%, #152d48 100%);
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
  background: transparent;
  color: #eff4ff;
}
html.news-theme--sunny body {
  color: #132a44;
}
html.news-theme--rain body.article-page {
  color: #e8f0ff;
}

body > .page-bg {
  flex: none;
}
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* 文章页：磨砂层（雨点在下层 .rain-drops / .rain-streaks） */
.article-page {
  position: relative;
}
.article-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  background: rgba(4, 12, 26, 0.38);
}
.rain-bg {
  background:
    radial-gradient(ellipse 100% 55% at 50% 0%, rgba(130, 190, 255, 0.2), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.2));
}
.rain-streaks {
  position: absolute;
  inset: -30% -8%;
  opacity: 0.45;
  background-image: repeating-linear-gradient(
    104deg,
    transparent 0,
    transparent 18px,
    rgba(200, 230, 255, 0.14) 19px,
    rgba(200, 230, 255, 0.14) 20px,
    transparent 21px,
    transparent 44px
  );
  background-size: 100% 200px;
  animation: streakScroll 1.1s linear infinite;
}
@keyframes streakScroll {
  0% { background-position: 0 0; }
  100% { background-position: 0 200px; }
}
.rain-drops {
  position: absolute;
  inset: -8% -10%;
  opacity: 0.72;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0.65px, transparent 1.35px),
    radial-gradient(circle, rgba(190, 220, 255, 0.5) 0.5px, transparent 1.1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.35) 0.55px, transparent 1.05px);
  background-size: 100px 140px, 76px 110px, 56px 88px;
  background-position: 0 0, 36px 24px, 14px 52px;
  animation: rainDrift 18s linear infinite;
}
@keyframes rainDrift {
  0% { transform: translate3d(0, -10%, 0); }
  100% { transform: translate3d(-4%, 14%, 0); }
}

/* 新闻列表：光斑 + 云层 + 磨砂罩（与 html 暖晴天底叠加） */
.sunny-bg {
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 230, 140, 0.75), transparent 46%),
    radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.55), transparent 40%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(255, 255, 255, 0.35), transparent 55%);
}
.sunny-sun {
  position: absolute;
  width: min(58vw, 420px);
  height: min(58vw, 420px);
  top: -16%;
  right: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 220, 1) 0%, rgba(255, 220, 110, 0.55) 38%, transparent 68%);
  filter: blur(3px);
  opacity: 0.95;
}
.sunny-clouds {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 28% at 22% 72%, rgba(255, 255, 255, 0.55), transparent 70%),
    radial-gradient(ellipse 48% 24% at 58% 78%, rgba(255, 255, 255, 0.45), transparent 68%),
    radial-gradient(ellipse 40% 20% at 82% 68%, rgba(255, 255, 255, 0.4), transparent 65%);
  opacity: 0.85;
  pointer-events: none;
}
.sunny-frost-sheet {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  background: linear-gradient(185deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.18) 55%, rgba(255, 255, 255, 0.08));
}

.news-list-page {
  position: relative;
}

html.news-theme--sunny .header,
.news-list-page .header {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(30, 80, 140, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.news-list-page .brand span { color: #4a6a8f; }
.news-list-page .nav { color: #2a4566; }
.news-list-page .nav a { color: #1e4a7a; }
.news-list-page .subtitle { color: #4a6588; }
.news-list-page .news-list h1 { color: #132a44; }
.news-list-page .news-card {
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(30, 90, 160, 0.08);
}
.news-list-page .news-card p { color: #3d5570; }
.news-list-page .news-card h2 a { color: #0f3460; }
.news-list-page .meta { color: #5a7394; }
.news-list-page .chip {
  border-color: rgba(40, 120, 200, 0.25);
  background: rgba(70, 150, 255, 0.18);
  color: #1a5080;
}

.main, .header, .site-footer {
  position: relative;
  z-index: 2;
}
a { color: inherit; text-decoration: none; }
.container { width: min(1080px, 92vw); margin: 0 auto; }

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(3, 10, 25, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}
.header-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.brand strong { display: block; font-size: 1.04rem; }
.brand span { font-size: 0.82rem; color: #b7c9ea; }

.nav { display: flex; align-items: center; gap: 18px; color: #dde7ff; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 650;
}
.btn-primary {
  color: white;
  background: linear-gradient(130deg, #0a6dff, #024bbb);
  border: 1px solid rgba(124, 170, 255, 0.5);
}

.main {
  flex: 1 0 auto;
  padding: 42px 0 28px;
}

.site-footer {
  margin-top: auto;
  padding: 28px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(4, 12, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.news-list-page .site-footer {
  border-top: 1px solid rgba(40, 100, 160, 0.12);
  background: rgba(255, 255, 255, 0.5);
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
}
.site-footer-line {
  margin: 0;
  font-size: 0.88rem;
  color: #9eb3de;
}
.news-list-page .site-footer-line {
  color: #4a6588;
}
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.88rem;
}
.site-footer-nav a {
  color: #bcd0f3;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.news-list-page .site-footer-nav a {
  color: #1a5080;
}
.footer-dot {
  color: rgba(255, 255, 255, 0.35);
  user-select: none;
}
.news-list-page .footer-dot {
  color: rgba(30, 80, 140, 0.35);
}
.subtitle { color: #b7c9ea; margin-top: 0; }
.news-list h1, .article h1 { margin-bottom: 8px; }
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.news-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  padding: 18px;
}
.news-card h2 { margin: 10px 0 8px; font-size: 1.2rem; }
.news-card p { margin: 0 0 10px; color: #d0ddf9; }
.meta { color: #9eb3de; font-size: 0.9rem; }
.chip {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(10, 108, 255, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
}

.article {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.05);
}
.article-shell {
  display: grid;
  gap: 18px;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
}
.article-toc {
  position: sticky;
  top: 98px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(8, 25, 53, 0.72);
  backdrop-filter: blur(6px);
  padding: 14px;
  max-height: calc(100vh - 130px);
  overflow: auto;
}
.toc-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #d6e3ff;
}
.toc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.toc-progress-text {
  font-size: 0.8rem;
  color: #b5cef7;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 1px 8px;
}
.toc-progress {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  margin-bottom: 12px;
}
.toc-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(120deg, #2ed1a0, #0a6dff);
  transition: width 0.15s linear;
}
.toc-link {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: #b9caec;
  font-size: 0.9rem;
  margin-bottom: 3px;
  transition: 0.18s ease;
}
.toc-link.toc-sub {
  padding-left: 18px;
  font-size: 0.86rem;
}
.toc-link:hover {
  color: #eaf2ff;
  background: rgba(255, 255, 255, 0.07);
}
.toc-link.active {
  color: #ffffff;
  background: rgba(10, 108, 255, 0.3);
  border-left: 2px solid #45b0ff;
}
.toc-empty {
  color: #9eb3de;
  font-size: 0.88rem;
}
.article .back { color: #bcd0f3; display: inline-block; margin-bottom: 14px; }
.article-body {
  margin-top: 20px;
  color: #e6eeff;
}
.article-body p, .article-body li, .article-body blockquote { color: #d6e3ff; }
.article-body a {
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 2px;
  color: #9fd0ff;
  border-bottom: 1px solid rgba(140, 200, 255, 0.45);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.article-body a::after {
  content: attr(data-link-type);
  font-size: 0.72rem;
  line-height: 1;
  color: #c8def8;
  background: rgba(12, 40, 80, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 2px 6px;
}
.article-body a:hover {
  color: #d4ecff;
  border-bottom-color: rgba(200, 230, 255, 0.85);
}
.article-body pre {
  background: #0d1e40;
  padding: 12px;
  border-radius: 10px;
  overflow-x: auto;
}
.article-body img {
  max-width: 100%;
  border-radius: 12px;
}

@media (max-width: 900px) {
  .nav a:not(.btn) { display: none; }
  .grid { grid-template-columns: 1fr; }
  .article-shell {
    grid-template-columns: 1fr;
  }
  .article-toc {
    position: static;
    max-height: none;
  }
}
