* { box-sizing: border-box; }
body {
  margin: 0;
  color: #eff4ff;
  background: radial-gradient(circle at 15% 10%, #183d7b 0%, #07162f 42%, #030915 100%);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  line-height: 1.65;
}
.article-page {
  background:
    radial-gradient(ellipse at 18% 16%, rgba(107, 224, 255, 0.16), rgba(0, 0, 0, 0) 42%),
    radial-gradient(ellipse at 78% 20%, rgba(95, 255, 187, 0.14), rgba(0, 0, 0, 0) 40%),
    radial-gradient(ellipse at 50% 88%, rgba(126, 132, 255, 0.12), rgba(0, 0, 0, 0) 38%),
    linear-gradient(120deg, #061328, #0b1f42, #081a37);
  background-size: 180% 180%;
  animation: auroraBase 16s ease-in-out infinite;
  position: relative;
}
.article-page::before {
  content: "";
  position: fixed;
  inset: -25% -20%;
  pointer-events: none;
  background:
    conic-gradient(
      from 180deg at 20% 42%,
      rgba(0, 0, 0, 0) 0deg,
      rgba(82, 225, 255, 0.18) 70deg,
      rgba(109, 255, 201, 0.16) 125deg,
      rgba(135, 156, 255, 0.14) 175deg,
      rgba(0, 0, 0, 0) 260deg
    ),
    conic-gradient(
      from 220deg at 78% 52%,
      rgba(0, 0, 0, 0) 0deg,
      rgba(123, 255, 226, 0.16) 65deg,
      rgba(96, 172, 255, 0.15) 130deg,
      rgba(164, 136, 255, 0.13) 185deg,
      rgba(0, 0, 0, 0) 260deg
    );
  filter: blur(34px) saturate(130%);
  mix-blend-mode: screen;
  animation: auroraWaves 10s ease-in-out infinite alternate;
  z-index: 0;
}
.bg-meteors {
  display: none;
}
.article-page .bg-meteors {
  display: block;
  position: fixed;
  inset: -10% -20%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  filter: blur(4px) saturate(130%);
  opacity: 0.9;
}
.aurora-band {
  position: absolute;
  width: 120vw;
  height: 34vh;
  left: -10vw;
  border-radius: 50%;
  mix-blend-mode: screen;
  opacity: 0.48;
  transform-origin: 50% 50%;
  background:
    linear-gradient(
      100deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(112, 255, 238, 0.18) 20%,
      rgba(111, 178, 255, 0.22) 42%,
      rgba(183, 129, 255, 0.2) 64%,
      rgba(0, 0, 0, 0) 88%
    );
  animation-name: auroraCurtain;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.aurora-band::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0) 0px,
      rgba(255, 255, 255, 0.08) 2px,
      rgba(255, 255, 255, 0) 8px,
      rgba(255, 255, 255, 0.1) 12px,
      rgba(255, 255, 255, 0) 18px
    );
  opacity: 0.35;
}
.aurora-band.a1 { top: 2%; animation-duration: 11.5s; animation-delay: 0.2s; }
.aurora-band.a2 { top: 12%; animation-duration: 14.2s; animation-delay: 1.4s; opacity: 0.4; }
.aurora-band.a3 { top: 24%; animation-duration: 12.8s; animation-delay: 2.6s; }
.aurora-band.a4 { top: 40%; animation-duration: 15.4s; animation-delay: 0.9s; opacity: 0.35; }
.aurora-band.a5 { top: 56%; animation-duration: 13.7s; animation-delay: 3.1s; }
.aurora-band.a6 { top: 72%; animation-duration: 16.6s; animation-delay: 2.1s; opacity: 0.32; }
.main, .header {
  position: relative;
  z-index: 1;
}

@keyframes flowBg {
  0% { background-position: 0% 40%, 100% 20%, 0% 50%; }
  50% { background-position: 30% 60%, 70% 40%, 100% 50%; }
  100% { background-position: 0% 40%, 100% 20%, 0% 50%; }
}
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 { padding: 42px 0 60px; }
.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;
  --link-hue-1: 210;
  --link-hue-2: 240;
  --link-hue-3: 270;
  --link-delay: 0s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 2px;
  border-bottom: 1px dashed hsla(var(--link-hue-2), 85%, 70%, 0.6);
  background-image: linear-gradient(
    110deg,
    hsl(var(--link-hue-1), 85%, 70%),
    hsl(var(--link-hue-2), 90%, 74%),
    hsl(var(--link-hue-3), 88%, 72%)
  );
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px hsla(var(--link-hue-1), 90%, 70%, 0.18);
  animation: linkPulse 5.6s ease-in-out infinite, linkShift 4.8s linear infinite;
  animation-delay: var(--link-delay);
  transition: 0.2s ease;
}
.article-body a::after {
  content: attr(data-link-type);
  font-size: 0.72rem;
  line-height: 1;
  color: #dbe9ff;
  background: rgba(7, 29, 63, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 2px 6px;
}
.article-body a:hover {
  filter: brightness(1.25);
  border-bottom-color: hsla(var(--link-hue-3), 90%, 75%, 0.95);
  text-shadow: 0 0 16px hsla(var(--link-hue-2), 90%, 70%, 0.35);
}
@keyframes linkPulse {
  0%, 100% {
    color: hsl(var(--link-hue-1), 84%, 68%);
    text-decoration-color: hsla(var(--link-hue-2), 85%, 70%, 0.9);
  }
  50% {
    color: hsl(var(--link-hue-2), 90%, 72%);
    text-decoration-color: hsla(var(--link-hue-1), 90%, 72%, 0.92);
  }
}
@keyframes linkShift {
  0% { background-position: 0% 50%; }
  100% { background-position: 160% 50%; }
}
@keyframes auroraBase {
  0%, 100% { background-position: 0% 35%, 100% 22%, 50% 100%, 0% 50%; }
  50% { background-position: 24% 52%, 76% 36%, 48% 88%, 100% 50%; }
}
@keyframes auroraWaves {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate3d(0, -10px, 0) scale(1.06);
    opacity: 0.95;
  }
  100% {
    transform: translate3d(0, -18px, 0) scale(1.1);
    opacity: 0.78;
  }
}
@keyframes auroraCurtain {
  0% {
    transform: translate3d(-8vw, -4vh, 0) rotate(-10deg) scaleX(1.02) scaleY(0.94);
    opacity: 0.18;
  }
  20% {
    opacity: 0.52;
  }
  50% {
    transform: translate3d(10vw, 3vh, 0) rotate(8deg) scaleX(1.12) scaleY(1.05);
    opacity: 0.6;
  }
  80% {
    opacity: 0.42;
  }
  100% {
    transform: translate3d(-6vw, -2vh, 0) rotate(-6deg) scaleX(1.04) scaleY(0.96);
    opacity: 0.2;
  }
}
.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;
  }
}
