@import url('https://fonts.googleapis.com/css2?family=Exo:wght@300;400;500;600;700&family=Roboto+Mono:wght@300;400;500;700&display=swap');

:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --deep: #150c0c;
  --fg: #f8eef1;
  --mut: #c9b2ba;
  --line: rgba(255, 20, 147, .24);
  --card: rgba(255, 255, 255, .05);
  --r: 4px;
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --h: 58px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--deep);
  color: var(--fg);
  font-family: 'Exo', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
  letter-spacing: .01em;
}

body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 14% 18%, rgba(255, 0, 0, .55), transparent 70%),
    radial-gradient(38% 42% at 86% 12%, rgba(255, 20, 147, .48), transparent 70%),
    radial-gradient(52% 48% at 72% 88%, rgba(126, 18, 96, .55), transparent 72%),
    radial-gradient(40% 40% at 24% 82%, rgba(255, 88, 0, .26), transparent 70%),
    conic-gradient(from 210deg at 50% 50%, #2b1515, #4a1027, #261717, #3f1313, #2b1515);
  background-size: 200% 200%;
  filter: saturate(1.25);
  opacity: .9;
  animation: aurora 11s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 52px);
  mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 20%, transparent 100%);
}

@keyframes aurora {
  0% { background-position: 0% 0%, 100% 0%, 50% 100%, 0% 100%, 0 0; }
  100% { background-position: 26% 18%, 62% 30%, 44% 62%, 40% 40%, 100% 100%; }
}

body > * { position: relative; z-index: 1; }

a { color: #ffd0e2; }

img { max-width: 100%; height: auto; display: block; }

/* 顶部细条 */
.ann {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 14px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .2em;
  color: #ffe0ec;
  background: linear-gradient(90deg, rgba(255, 0, 0, .4), rgba(255, 20, 147, .34), rgba(255, 0, 0, .4));
  border-bottom: 1px solid var(--line);
}

.ann-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px #fff;
  animation: pulse 3.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: .45; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* 头部 */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "l b r";
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(21, 12, 12, .74);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.side {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
}

.side.left { grid-area: l; justify-content: flex-start; }
.side.right { grid-area: r; justify-content: flex-end; }

.side a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 11px;
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
  border-radius: var(--r);
  white-space: nowrap;
  transition: background .25s ease, transform .25s ease, color .25s ease;
}

.side a:hover,
.side a:focus-visible {
  color: #fff;
  background: rgba(255, 20, 147, .18);
  transform: translateY(-2px);
}

.side svg {
  width: 11px;
  height: 11px;
  flex: none;
  fill: none;
  stroke: var(--pink);
  stroke-width: 1.8;
}

.brand {
  grid-area: b;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(120deg, rgba(255, 0, 0, .34), rgba(255, 20, 147, .3));
  box-shadow: 0 0 26px rgba(255, 20, 147, .3);
  white-space: nowrap;
}

.brand .mark { font-size: 17px; }

.burger {
  grid-area: g;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
}

.burger .bar {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

/* 二级锚点条 */
.jumpbar {
  position: sticky;
  top: var(--h);
  z-index: 35;
  background: rgba(15, 9, 9, .8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.chips {
  display: flex;
  gap: 8px;
  margin: 0 auto;
  padding: 8px 16px;
  max-width: 1180px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar { display: none; }

.chips a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: .06em;
  color: #ffd7e6;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 40px;
  background: rgba(255, 20, 147, .1);
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}

.chips a:hover {
  color: #fff;
  background: rgba(255, 20, 147, .3);
  box-shadow: 0 0 18px rgba(255, 20, 147, .45);
}

/* 首屏 */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 20px;
  min-height: 45vh;
}

.hero-copy { text-align: center; }

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5.2vw, 56px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.01em;
  background: linear-gradient(100deg, #fff 8%, #ffc2da 44%, var(--pink) 72%, var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 32px rgba(255, 20, 147, .35));
}

.lead {
  margin: 0 auto;
  max-width: 32em;
  font-size: 17px;
  line-height: 1.8;
  color: #eed8de;
}

.hero-art {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(60% 60% at 30% 25%, rgba(255, 0, 0, .55), transparent 70%),
    radial-gradient(60% 60% at 75% 70%, rgba(255, 20, 147, .55), transparent 72%),
    linear-gradient(160deg, #3a1919, #1d0f16);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .95), inset 0 0 60px rgba(255, 20, 147, .2);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  opacity: .96;
}

.badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 15px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .18em;
  color: #fff;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(38, 23, 23, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: float 9s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* 正文骨架 */
.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 26px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 20px 44px;
}

.col { min-width: 0; }

.prose > div {
  margin: 0 0 20px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--card);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, .95);
  scroll-margin-top: calc(var(--h) + 62px);
}

.prose h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.34;
  font-weight: 600;
  letter-spacing: .01em;
  background: linear-gradient(96deg, #fff 5%, #ffc9dd 48%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.prose h3 {
  margin: 20px 0 8px;
  font-size: 19px;
  line-height: 1.45;
  color: #ffe3ee;
  letter-spacing: .01em;
}

.prose hr {
  border: 0;
  height: 1px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, var(--red), var(--pink) 38%, rgba(255, 20, 147, .06));
}

.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

.prose ul,
.prose ol {
  margin: 0 0 14px;
  padding-left: 1.35em;
}

.prose li { margin: 0 0 7px; }

.prose strong { color: #fff; }

.prose a {
  color: #ffd0e2;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 20, 147, .5);
}

.prose a:hover { color: #fff; border-color: #fff; }

.prose blockquote {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-left: 3px solid var(--pink);
  border-radius: 0 var(--r) var(--r) 0;
  background: rgba(255, 20, 147, .09);
  color: #ffe1ec;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 14px;
  font-size: 16px;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
}

.prose th { background: rgba(255, 20, 147, .14); }

/* 侧栏 */
.rail {
  position: sticky;
  top: calc(var(--h) + 62px);
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgba(38, 23, 23, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 22px 46px -28px rgba(0, 0, 0, .95);
}

.rail h2 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: .28em;
  color: #ffc9de;
}

.rail hr {
  border: 0;
  height: 1px;
  margin: 0 0 10px;
  background: linear-gradient(90deg, var(--pink), transparent);
}

.rail-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
  border-radius: var(--r);
  border-left: 2px solid transparent;
  transition: background .22s ease, border-color .22s ease, color .22s ease;
}

.rail-list a:hover {
  color: #fff;
  background: rgba(255, 20, 147, .16);
  border-left-color: var(--pink);
}

/* 页脚 */
.foot {
  margin-top: 10px;
  padding: 42px 20px 30px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 20, 147, .12), rgba(10, 6, 6, .85));
}

.foot-top {
  max-width: 1180px;
  margin: 0 auto 20px;
}

.bigmark {
  margin: 0;
  font-size: clamp(38px, 9vw, 84px);
  line-height: .96;
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--red), var(--pink) 58%, #ffd2e6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footnav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.footnav dl { margin: 0; }

.footnav dt {
  margin-bottom: 5px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .24em;
  color: #ffb9d3;
}

.footnav dd { margin: 0; }

.footnav a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-size: 16px;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.footnav a:hover { color: #fff; border-bottom-color: var(--pink); }

.copy {
  max-width: 1180px;
  margin: 26px auto 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--mut);
}

/* 回到顶部 */
.totop {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 50;
  min-height: 44px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 15px;
  color: #fff;
  background: rgba(38, 23, 23, .82);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .3s ease;
}

.totop.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.totop:hover { background: rgba(255, 20, 147, .55); }

/* 滚动出现 */
.js .prose > div {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}

.js .prose > div.in {
  opacity: 1;
  transform: none;
}

/* 断点 */
@media (max-width: 1120px) {
  .side a { font-size: 15px; padding: 8px 8px; }
}

@media (max-width: 940px) {
  .top {
    grid-template-columns: 1fr auto;
    grid-template-areas: "b g" "l l" "r r";
    padding: 6px 12px;
  }

  .brand { justify-self: start; font-size: 17px; padding: 8px 12px; }

  .burger { display: flex; justify-self: end; }

  .side {
    display: none;
    flex-direction: column;
    padding: 4px 0;
  }

  body.menu .side { display: flex; }

  .side.right { justify-content: flex-start; }

  .side a { min-height: 46px; }

  .jumpbar { top: calc(var(--h) - 4px); }

  .hero-in {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 22px 16px 26px;
    min-height: 0;
  }

  .hero-art { aspect-ratio: 16 / 10; order: 2; }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    padding: 4px 16px 36px;
  }

  .rail { position: static; order: 2; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .footnav { grid-template-columns: 1fr 1fr; }

  .prose > div { padding: 20px 16px; }

  .prose table { font-size: 15px; }

  .copy { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before,
  .ann-dot,
  .badge { animation: none; }
  .js .prose > div { opacity: 1; transform: none; transition: none; }
  .side a:hover { transform: none; }
}

button[aria-expanded]{min-width:44px;min-height:44px}
