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

:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --void: #0a0a16;
  --panel: rgba(20, 20, 42, 0.82);
  --line: rgba(255, 255, 255, 0.09);
  --neon: rgba(255, 0, 110, 0.4);
  --deck: #d2d2e6;
  --dim: #9c9cb8;
}

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

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

body {
  margin: 0;
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--deck);
  background: var(--ink);
  background-image:
    radial-gradient(900px 520px at 8% -8%, rgba(255, 0, 0, 0.22), transparent 62%),
    radial-gradient(800px 620px at 96% 4%, rgba(255, 0, 110, 0.24), transparent 60%),
    radial-gradient(1000px 700px at 50% 110%, rgba(255, 0, 110, 0.14), transparent 65%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.055) 0 1px,
    rgba(0, 0, 0, 0) 1px 4px
  );
  opacity: 0.6;
  mix-blend-mode: screen;
  animation: drift 12s linear infinite;
}

@keyframes drift {
  from { background-position-y: 0; }
  to { background-position-y: 40px; }
}

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

a {
  color: #ff86b4;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 18px;
  background: var(--pink);
  color: #12000a;
  z-index: 99;
  border-radius: 0 0 12px 0;
}

.skip:focus {
  left: 0;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(9, 9, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 0, 110, 0.42);
  box-shadow: 0 0 28px rgba(255, 0, 110, 0.2);
}

.bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 8px;
  text-decoration: none;
  color: #fff;
  flex: 0 0 auto;
}

.brand-mark {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 16px;
  color: var(--red);
  text-shadow: 0 0 10px rgba(255, 0, 0, 0.9), 0 0 26px rgba(255, 0, 110, 0.7);
}

.brand-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ededf8;
}

.logo-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 0, 110, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  min-width: 0;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.nav-row a {
  display: inline-block;
  padding: 10px 10px;
  min-height: 42px;
  font-size: 16px;
  line-height: 1.4;
  color: #d7d7ea;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.nav-row a:hover,
.nav-row a:focus-visible {
  color: #fff;
  border-color: rgba(255, 0, 110, 0.7);
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.5);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.95);
}

.nav-fold {
  position: relative;
  flex: 0 0 auto;
}

.nav-fold summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  min-height: 42px;
  font-size: 16px;
  line-height: 1.4;
  color: #e8b9cd;
  border: 1px dashed rgba(255, 0, 110, 0.55);
  border-radius: 10px;
}

.nav-fold summary::-webkit-details-marker {
  display: none;
}

.fold-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 210px;
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #101024;
  border: 1px solid rgba(255, 0, 110, 0.45);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 26px rgba(255, 0, 110, 0.28);
}

.fold-grp b {
  display: block;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--pink);
  margin-bottom: 6px;
}

.fold-grp a {
  display: block;
  padding: 10px 8px;
  min-height: 42px;
  color: #dcdcee;
  text-decoration: none;
  border-radius: 8px;
  font-size: 16px;
}

.fold-grp a:hover {
  background: rgba(255, 0, 110, 0.14);
  color: #fff;
}

.chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  min-height: 42px;
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 0, 110, 0.6);
  background: rgba(255, 0, 110, 0.12);
  box-shadow: inset 0 0 16px rgba(255, 0, 110, 0.25);
  flex: 0 0 auto;
}

.chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
}

/* ---------- 骨架 ---------- */

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 18px 64px;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.rail {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 18px 16px;
  border-radius: 28px;
  border: 1px solid rgba(255, 0, 110, 0.3);
  background: rgba(15, 15, 32, 0.9);
  box-shadow: 0 0 34px rgba(255, 0, 110, 0.13);
}

.rail-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--pink);
}

.rail-title span {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid rgba(255, 0, 110, 0.55);
  border-radius: 6px;
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.9);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  counter-reset: rl;
}

.rail-list li {
  counter-increment: rl;
}

.rail-list a {
  display: block;
  padding: 10px 10px;
  min-height: 42px;
  font-size: 16px;
  line-height: 1.4;
  color: #d3d3e8;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid transparent;
}

.rail-list a::before {
  content: counter(rl, decimal-leading-zero);
  margin-right: 8px;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(255, 0, 0, 0.9);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: #fff;
  border-color: rgba(255, 0, 110, 0.6);
  background: rgba(255, 0, 110, 0.1);
}

/* ---------- 头图 ---------- */

.doc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 30px;
  align-items: center;
  align-content: center;
  min-height: 45vh;
  margin-bottom: 26px;
  padding: 26px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255, 0, 110, 0.32);
  background: linear-gradient(142deg, rgba(255, 0, 110, 0.16), rgba(26, 26, 46, 0.92) 58%);
  box-shadow: 0 22px 56px rgba(255, 0, 110, 0.14), inset 0 0 60px rgba(255, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.doc-head.has-art {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
}

.doc-head::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 180px;
  background: radial-gradient(closest-side, rgba(255, 0, 110, 0.35), transparent);
  pointer-events: none;
}

.badge {
  justify-self: start;
  margin: 0 0 14px;
  padding: 5px 14px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: #ffdbe6;
  border: 1px solid rgba(255, 0, 0, 0.6);
  border-radius: 999px;
  background: rgba(255, 0, 0, 0.14);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.9);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.22);
  animation: glitch 7s steps(1, end) infinite;
}

@keyframes glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: translate(-2px, 1px) skewX(-6deg); }
  95% { transform: translate(2px, -1px) skewX(4deg); }
  97% { transform: none; }
}

.doc-h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.4vw, 50px);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 0, 110, 0.55), 0 0 52px rgba(255, 0, 0, 0.3);
  animation: pulse 7s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { text-shadow: 0 0 18px rgba(255, 0, 110, 0.45), 0 0 44px rgba(255, 0, 0, 0.24); }
  50% { text-shadow: 0 0 26px rgba(255, 0, 110, 0.8), 0 0 66px rgba(255, 0, 0, 0.42); }
}

.lede {
  margin: 0;
  max-width: 58ch;
  font-size: 17px;
  line-height: 1.72;
  color: #cfcfe4;
}

.hero-art {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 3;
  min-height: 210px;
  height: 100%;
  align-self: stretch;
}

.art {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(255, 0, 110, 0.55);
  box-shadow: 0 0 34px rgba(255, 0, 110, 0.34);
  background: #0d0d1f;
  will-change: transform;
}

.art-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.06);
}

.art-1 {
  width: 66%;
  height: 78%;
  transform: rotate(-2deg) translateY(-8px);
}

.art-2 {
  position: absolute;
  right: -6px;
  bottom: -14px;
  width: 58%;
  height: 54%;
  transform: rotate(3deg);
}

/* ---------- 正文 ---------- */

.doc {
  min-width: 0;
}

.doc > article {
  margin: 0 0 24px;
  padding: 26px 24px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 0, 110, 0.05);
}

.doc > article:nth-of-type(odd) {
  border-color: rgba(255, 0, 110, 0.26);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 0, 110, 0.1);
}

article[id] {
  scroll-margin-top: 96px;
}

.doc h1,
.doc h2,
.doc h3,
.doc h4 {
  color: #fff;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.doc h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 2.9vw, 30px);
  font-weight: 700;
}

.doc h3 {
  margin: 22px 0 12px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
}

.doc h2 span,
.doc h3 span {
  display: inline-block;
  position: relative;
  padding-left: 16px;
  text-shadow: 0 0 16px rgba(255, 0, 110, 0.5);
}

.doc h2 span::before,
.doc h3 span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.18em;
  width: 6px;
  border-radius: 2px;
  background: linear-gradient(var(--red), var(--pink));
  box-shadow: 0 0 12px var(--pink);
}

.doc p {
  margin: 0 0 16px;
  max-width: 70ch;
  line-height: 1.85;
  color: #cfcfe2;
}

.doc ul,
.doc ol {
  margin: 0 0 18px;
  padding-left: 1.25em;
}

.doc li {
  margin-bottom: 10px;
  line-height: 1.78;
}

.doc strong {
  color: #fff;
}

.doc blockquote {
  margin: 0 0 18px;
  padding: 12px 18px;
  border-left: 3px solid var(--red);
  border-radius: 0 18px 18px 0;
  background: rgba(255, 0, 110, 0.09);
}

.doc blockquote p:last-child {
  margin-bottom: 0;
}

.doc img {
  border-radius: 16px;
  border: 1px solid rgba(255, 0, 110, 0.3);
}

.doc table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.doc th,
.doc td {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
}

.doc th {
  background: rgba(255, 0, 110, 0.12);
  color: #fff;
}

.doc a {
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.55);
}

/* ---------- 页脚 ---------- */

.foot {
  margin-top: 40px;
  border-top: 1px solid rgba(255, 0, 110, 0.34);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.55), var(--void));
}

.foot-top {
  max-width: 1180px;
  margin: 0 auto;
  padding: 38px 18px 6px;
}

.mega {
  margin: 0;
  font-size: clamp(38px, 11vw, 128px);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #ff5c8f;
  text-shadow: 0 0 30px rgba(255, 0, 110, 0.5), 0 0 70px rgba(255, 0, 0, 0.3);
  word-break: break-word;
}

.foot-cols {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.foot-col h3 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #fff;
}

.foot-col h3 span {
  display: inline-block;
  padding: 2px 9px;
  border-left: 2px solid var(--pink);
  background: rgba(255, 0, 110, 0.1);
  border-radius: 0 6px 6px 0;
}

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  padding: 10px 8px;
  min-height: 42px;
  font-size: 16px;
  color: #cfcfe4;
  text-decoration: none;
  border-radius: 8px;
}

.foot-links a:hover {
  color: #fff;
  background: rgba(255, 0, 110, 0.14);
}

.foot-base {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 18px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copy {
  margin: 0;
  font-size: 16px;
  color: var(--dim);
  letter-spacing: 0.04em;
}

/* ---------- 断点 ---------- */

@media (max-width: 880px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 18px 14px 44px;
  }

  .rail {
    position: static;
    padding: 14px 12px;
    border-radius: 22px;
  }

  .rail-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-head {
    min-height: 0;
    padding: 20px 16px;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .doc-head.has-art {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    grid-column: 1;
    grid-row: auto;
    min-height: 170px;
    height: 180px;
  }

  .art-1 {
    width: 62%;
    height: 100%;
  }

  .art-2 {
    width: 44%;
    height: 62%;
  }

  .doc > article {
    padding: 20px 16px;
    border-radius: 22px;
  }

  .foot-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 10px 14px 20px;
  }

  .foot-top {
    padding: 28px 14px 4px;
  }

  .foot-base {
    padding: 12px 14px 34px;
  }

  .chip {
    margin-left: auto;
  }

  .nav-fold .fold-panel {
    left: auto;
    right: 0;
  }
}

@media (max-width: 560px) {
  .bar {
    padding: 8px 12px;
    gap: 8px;
  }

  .nav-row {
    gap: 2px;
  }

  .nav-row a {
    padding: 9px 8px;
  }

  .doc-h1 {
    font-size: clamp(27px, 8.4vw, 36px);
  }

  .lede {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::after,
  .badge,
  .doc-h1 {
    animation: none;
  }

  * {
    transition: none !important;
  }
}

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