@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --bg: #120a0c;
  --text: #f9edf0;
  --dim: #caa6b1;
  --line: rgba(255, 20, 147, 0.26);
  --line-soft: rgba(255, 255, 255, 0.09);
  --rail: 248px;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Menlo, Consolas, 'PingFang SC', 'Microsoft YaHei', monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: -20% -15%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 16% 20%, rgba(255, 0, 0, 0.55), transparent 70%),
    radial-gradient(44% 46% at 84% 16%, rgba(255, 20, 147, 0.5), transparent 72%),
    radial-gradient(50% 52% at 62% 92%, rgba(255, 20, 147, 0.3), transparent 74%),
    conic-gradient(from 200deg at 50% 50%, rgba(255, 0, 0, 0.3), rgba(255, 20, 147, 0.24), rgba(38, 23, 23, 0.62), rgba(255, 0, 0, 0.3));
  background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%;
  filter: blur(52px) saturate(1.25);
  opacity: 0.72;
  animation: aurora 11s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
}

@keyframes aurora {
  0% { background-position: 0% 0%, 100% 0%, 50% 100%, 0% 50%; }
  50% { background-position: 22% 28%, 78% 20%, 42% 78%, 62% 42%; }
  100% { background-position: 42% 8%, 58% 40%, 20% 60%, 100% 28%; }
}

img { max-width: 100%; display: block; }
a { color: #ff8ec6; text-decoration: none; }
a:hover { color: #fff; }
p, li, dd, dt { overflow-wrap: anywhere; }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

/* 左侧竖排轨道 */
.rail {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 14px 20px;
  border-right: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(20, 10, 13, 0.94), rgba(30, 14, 20, 0.86));
  backdrop-filter: blur(14px);
  overflow-y: auto;
  transition: transform 0.32s ease;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 30% 25%, rgba(255, 20, 147, 0.5), rgba(255, 0, 0, 0.16) 60%, transparent);
  flex: 0 0 auto;
}

.mark img { width: 26px; height: 26px; object-fit: contain; }

.mark-glint {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--red), var(--pink));
  box-shadow: 0 0 14px rgba(255, 20, 147, 0.8);
}

.rail-nav { display: flex; flex-direction: column; gap: 16px; }

.grp { display: flex; flex-direction: column; gap: 4px; }

.grp-label {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--dim);
  text-transform: uppercase;
  padding-left: 10px;
}

.grp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.grp-list a {
  display: block;
  padding: 12px 10px;
  min-height: 44px;
  border-radius: 12px;
  border-left: 2px solid transparent;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.grp-list a:hover,
.grp-list a:focus-visible {
  background: linear-gradient(90deg, rgba(255, 20, 147, 0.2), transparent);
  border-left-color: var(--pink);
  color: #fff;
}

.rail-foot {
  margin: auto 0 0;
  padding: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
  border-top: 1px solid var(--line-soft);
}

/* 外壳 */
.wrap {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 54px;
  padding: 0 clamp(14px, 3.4vw, 40px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(18, 10, 12, 0.78);
  backdrop-filter: blur(12px);
}

.topbar-brand {
  font-size: 13px;
  letter-spacing: 0.22em;
  color: #ffd6e8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--pink), rgba(255, 0, 0, 0.35), transparent);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 64px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 20, 147, 0.12);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
}

.menu-btn:hover { background: rgba(255, 20, 147, 0.24); }

/* 正文 */
main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px clamp(14px, 3.4vw, 40px) 54px;
}

main > div {
  position: relative;
  margin: 0 0 26px;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(158deg, rgba(255, 20, 147, 0.09), rgba(255, 0, 0, 0.04) 46%, rgba(38, 23, 23, 0.28) 78%);
  scroll-margin-top: 84px;
}

main > div > * + * { margin-top: 0.9em; }

main > div > h2 {
  margin: 0;
  padding-left: 0.55em;
  border-left: 3px solid var(--pink);
  font-size: clamp(1.32rem, 2.6vw, 1.86rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

main > div > h3 {
  margin: 1.2em 0 0;
  font-size: 1.14rem;
  line-height: 1.45;
  color: #ffd0e4;
}

main > div p,
main > div li {
  line-height: 1.85;
  color: var(--text);
}

main > div ul,
main > div ol { padding-left: 1.3em; }
main > div li + li { margin-top: 0.45em; }
main > div strong { color: #fff; }
main > div blockquote {
  margin: 1em 0;
  padding: 0.4em 1em;
  border-left: 2px solid var(--red);
  color: var(--dim);
}
main > div table { width: 100%; border-collapse: collapse; font-size: 15px; }
main > div th,
main > div td { border: 1px solid var(--line-soft); padding: 9px 11px; text-align: left; }

.subtitle {
  margin: 0.35em 0 0;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.8;
}

/* 首屏 */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr 0.82fr;
  gap: 18px;
  align-items: stretch;
  min-height: 42vh;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255, 0, 0, 0.16), rgba(255, 20, 147, 0.1) 45%, rgba(38, 23, 23, 0.5));
}

.hero::after {
  content: '';
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -18px;
  height: 30px;
  background: linear-gradient(90deg, transparent, var(--red), var(--pink), transparent);
  transform: skewY(-2.4deg);
  opacity: 0.55;
  pointer-events: none;
}

.hero-fig {
  margin: 0;
  border-radius: 24px;
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 240px;
  background:
    radial-gradient(60% 60% at 30% 25%, rgba(255, 20, 147, 0.48), transparent 70%),
    radial-gradient(70% 70% at 78% 78%, rgba(255, 0, 0, 0.42), transparent 72%),
    #1d1013;
}

.hero-img { width: 100%; height: 100%; object-fit: cover; }

.hero-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  background: linear-gradient(104deg, #ffffff, #ffd3e6 45%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-aside {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(26, 13, 17, 0.62);
  padding: 14px 12px;
  align-self: start;
  max-height: 100%;
  overflow-y: auto;
}

.aside-title {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--dim);
  padding-left: 6px;
}

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

.aside-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 8px;
  min-height: 42px;
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.aside-list a em {
  font-style: normal;
  font-size: 11px;
  color: var(--pink);
  letter-spacing: 0.06em;
}

.aside-list a:hover { background: rgba(255, 20, 147, 0.16); color: #fff; }

.stage { padding-bottom: clamp(18px, 2.6vw, 28px); }
.stage h2 {
  background: linear-gradient(96deg, #fff, #ff9fcb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* 页脚 */
.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 23, 23, 0.5), rgba(12, 7, 9, 0.9));
  padding: clamp(24px, 4vw, 44px) clamp(14px, 3.4vw, 40px) 22px;
}

.foot-brand,
.foot-links { margin-bottom: 22px; }

.foot-big {
  margin: 0;
  font-size: clamp(2rem, 8.5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(100deg, #fff 10%, var(--pink) 55%, var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
}

.foot-links nav dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 18px;
}

.foot-links dt {
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--dim);
  margin-top: 8px;
}

.foot-links dd { margin: 0; }

.foot-links dd a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 0;
  color: var(--text);
  font-size: 15px;
}

.foot-links dd a:hover { color: var(--pink); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--dim);
}

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
}

.to-top:hover { color: #fff; background: rgba(255, 20, 147, 0.18); }

/* 滚动出现 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--d, 0ms);
}

.js [data-reveal].in {
  opacity: 1;
  transform: none;
}

/* 中屏 */
@media (max-width: 1120px) {
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-aside { grid-column: 1 / -1; max-height: none; }
  .aside-list { display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .aside-list li { flex: 1 1 28%; }
}

@media (max-width: 900px) {
  .rail { transform: translateX(-100%); width: min(80vw, 300px); box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); }
  body.nav-open .rail { transform: none; }
  .wrap { margin-left: 0; }
  .menu-btn { display: inline-flex; order: 3; }
  .topbar-brand { flex: 1; }
  .topbar-rule { display: none; }
  .foot-links nav dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 14px 6px; }
  .hero-fig { min-height: 190px; }
  .aside-list li { flex: 1 1 44%; }
  main > div { border-radius: 22px; }
  .hero-fig,
  .hero-aside { border-radius: 20px; }
  .foot-links nav dl { grid-template-columns: 1fr 1fr; }
  .foot-base { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .rail { transition: none; }
}

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