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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 138px;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  color: #f7eaea;
  background-color: #140b0b;
  background-image:
    radial-gradient(58% 52% at 88% 4%, rgba(255, 20, 147, .45), rgba(255, 20, 147, 0) 70%),
    radial-gradient(54% 48% at 6% 14%, rgba(255, 0, 0, .34), rgba(255, 0, 0, 0) 72%),
    radial-gradient(80% 60% at 58% 98%, rgba(255, 20, 147, .24), rgba(255, 20, 147, 0) 72%);
  background-size: 200% 200%, 200% 200%, 200% 200%;
  animation: aurora 11s ease-in-out infinite alternate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  filter: saturate(1.2);
  background: conic-gradient(from 205deg at 72% 10%,
    rgba(255, 0, 0, .20), rgba(255, 20, 147, .14), rgba(255, 20, 147, 0) 62%);
}

@keyframes aurora {
  0%   { background-position: 0% 0%, 100% 0%, 50% 100%; }
  100% { background-position: 34% 22%, 66% 30%, 42% 78%; }
}

a { color: #ff8ab8; }
img { max-width: 100%; height: auto; }

.top, .wrap, .foot { position: relative; z-index: 1; }

/* ---------- 页头 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(20, 11, 11, .74);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 20, 147, .22);
}

.top-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.brand-name {
  background: linear-gradient(100deg, #fff, #ffc2da 60%, #ff1493);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mark { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; display: block; }

.menu-btn {
  min-height: 44px;
  padding: 0 20px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .16em;
  color: #180b0b;
  cursor: pointer;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(100deg, #ff0000, #ff1493);
  box-shadow: 0 6px 22px rgba(255, 20, 147, .32);
}

.menu-btn:hover { filter: brightness(1.08); }

.top-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 8px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.rail-list, .side-list, .foot-list, .veil-list { list-style: none; margin: 0; padding: 0; }

.rail-list {
  display: flex;
  gap: 4px;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.rail-list::-webkit-scrollbar { display: none; }

.rail-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 4px;
  border-bottom: 2px solid transparent;
  color: #e9d3d3;
  text-decoration: none;
  font-size: .93rem;
  white-space: nowrap;
}

.rail-list a:hover, .rail-list a:focus-visible {
  color: #fff;
  background: rgba(255, 20, 147, .12);
  border-bottom-color: #ff1493;
}

/* ---------- 版式 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
}

.hero {
  grid-column: 1 / -1;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  padding: 30px 0 34px;
}

.hero h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.35rem, 8.2vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -.035em;
  font-weight: 700;
  background: linear-gradient(200deg, #ffffff 10%, #ffd3e4 40%, #ff1493 76%, #ff0000 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 30px rgba(255, 20, 147, .34));
}

.body { grid-column: 1; min-width: 0; }

.prose { display: block; }

.prose > article, .prose > div > article {
  margin: 0 0 22px;
  padding: 22px 20px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-bottom: 2px solid rgba(255, 20, 147, .8);
  border-radius: 4px;
  background: rgba(38, 23, 23, .55);
}

.prose > article:last-child { margin-bottom: 0; }

.prose p, .prose li { color: #e8d8d8; }

.prose h2 {
  margin: .1em 0 .7em;
  font-size: clamp(1.34rem, 3.6vw, 1.8rem);
  line-height: 1.28;
  letter-spacing: -.01em;
  color: #fff;
}

.prose h3 {
  margin: 1.1em 0 .5em;
  font-size: 1.14rem;
  line-height: 1.35;
  color: #ffd9e7;
}

.prose h2 > span, .prose h3 > span, .side-title > span { display: inline-block; position: relative; padding-bottom: 7px; }

.prose h2 > span::after, .side-title > span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  min-width: 34px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff0000, #ff1493);
}

.prose ul, .prose ol { padding-left: 1.15em; }

.prose blockquote {
  margin: 1em 0;
  padding: 4px 0 4px 14px;
  border-left: 3px solid #ff1493;
  color: #f3dfe6;
}

.prose code {
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 20, 147, .16);
  font-size: .92em;
}

/* ---------- 侧栏 ---------- */
.side {
  grid-column: 2;
  position: sticky;
  top: 138px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-bottom: 2px solid #ff0000;
  border-radius: 4px;
  background: rgba(30, 18, 18, .62);
  backdrop-filter: blur(8px);
}

.side-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: #fff;
}

.side-list li + li { margin-top: 2px; }

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 4px;
  color: #ecdbdb;
  text-decoration: none;
  font-size: .93rem;
}

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

.side-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  border: 1px solid rgba(255, 0, 0, .55);
  border-radius: 4px;
  color: #ffb3cc;
  text-decoration: none;
  font-size: .9rem;
}

.side-top:hover { background: rgba(255, 0, 0, .14); color: #fff; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 58px;
  border-top: 1px solid rgba(255, 20, 147, .28);
  background: rgba(15, 8, 8, .72);
}

.foot > article {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.foot-brand {
  margin: 0;
  font-size: clamp(1.5rem, 5.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  background: linear-gradient(100deg, #ff0000, #ff1493);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-go {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 4px;
  background: linear-gradient(100deg, #ff0000, #ff1493);
  color: #180b0b;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}

.foot-list { display: flex; flex-wrap: wrap; gap: 6px 4px; }

.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 4px;
  color: #e2cece;
  font-size: .92rem;
  text-decoration: none;
}

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

.foot-base { text-align: center; border-bottom: 0 !important; }

.foot-base p { margin: 0; font-size: .88rem; color: #bfa9a9; letter-spacing: .04em; }

/* ---------- 全屏菜单 ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-content: center;
  gap: 18px;
  padding: 24px;
  background: rgba(16, 9, 9, .95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .32s ease, visibility .32s ease;
}

.veil.open { opacity: 1; visibility: visible; }

.veil-nav { display: block; }

.veil-list { display: grid; gap: 4px; text-align: center; }

.veil-list a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 4px;
  color: #f2dfe4;
  text-decoration: none;
  font-size: clamp(1.05rem, 3.6vw, 1.45rem);
  font-weight: 500;
  letter-spacing: .02em;
}

.veil-list a:hover, .veil-list a:focus-visible { background: rgba(255, 20, 147, .18); color: #fff; }

.veil-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 44px;
  padding: 0 18px;
  font-family: inherit;
  font-size: .92rem;
  letter-spacing: .12em;
  color: #ffd0e0;
  background: transparent;
  border: 1px solid rgba(255, 20, 147, .6);
  border-radius: 4px;
  cursor: pointer;
}

body.locked { overflow: hidden; }

/* ---------- 滚动显现 ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .62s ease, transform .62s ease; }
.reveal.in { opacity: 1; transform: none; }

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

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .wrap { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .hero { min-height: 42vh; align-items: flex-start; text-align: right; }
  .hero h1 { max-width: none; }
  .body { grid-column: 1; }
  .side { grid-column: 1; position: static; }
  html, [id] { scroll-margin-top: 128px; scroll-padding-top: 128px; }
}

@media (max-width: 520px) {
  body { font-size: 16.5px; }
  .top-bar { padding: 8px 16px; }
  .wrap { padding: 0 16px 8px; }
  .prose > article, .prose > div > article { padding: 18px 15px; }
  .hero { padding: 22px 0 26px; }
  .foot > article { padding: 20px 16px; }
}

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