@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --ink-deep: #1a0f0f;
  --cream: #fbeef0;
  --dim: #dcc3c7;
  --mute: #ab8b91;
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.07);
  --r: 4px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  --glow: 0 0 0 1px rgba(255, 20, 147, 0.35), 0 16px 44px rgba(255, 0, 0, 0.22);
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Abril Fatface", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Georgia, serif;
  --body: Merriweather, "Songti SC", "PingFang SC", "Microsoft YaHei", Georgia, serif;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 18% 22%, rgba(255, 0, 0, 0.55), transparent 62%),
    radial-gradient(46% 44% at 82% 12%, rgba(255, 20, 147, 0.5), transparent 66%),
    radial-gradient(52% 50% at 62% 84%, rgba(140, 20, 64, 0.55), transparent 70%),
    radial-gradient(34% 34% at 12% 86%, rgba(255, 110, 90, 0.32), transparent 72%),
    conic-gradient(from 20deg at 70% 30%, rgba(255, 20, 147, 0.28), rgba(255, 0, 0, 0.16), rgba(38, 23, 23, 0.12), rgba(255, 20, 147, 0.28));
  filter: blur(28px) saturate(1.28);
  animation: aurora-drift 11s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 64px 64px;
  mix-blend-mode: screen;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(72% 62% at 50% 28%, #000 28%, transparent 100%);
  mask-image: radial-gradient(72% 62% at 50% 28%, #000 28%, transparent 100%);
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1.02);
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  100% {
    transform: translate3d(3%, 2%, 0) scale(1.08);
    background-position: 6% 4%, -5% 3%, 4% -4%, -6% -3%, 10% 0;
  }
}

a {
  color: #ff9ac6;
}

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

/* 顶部两行：品牌行 + 菜单行 */
.masthead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(30, 17, 17, 0.78);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
}

.brandrow {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 8px 18px 6px;
}

.logo {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-size: 21px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(96deg, #fff 6%, var(--pink) 52%, var(--red) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: saturate(1.1);
}

.find {
  display: flex;
  align-items: center;
  gap: 6px;
}

.find input {
  width: 152px;
  min-height: 42px;
  padding: 0 11px;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.find input::placeholder {
  color: var(--mute);
}

.find button {
  min-height: 42px;
  padding: 0 14px;
  font-size: 16px;
  font-family: var(--sans);
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
}

.burger {
  display: none;
  min-height: 44px;
  min-width: 56px;
  padding: 0 12px;
  font-size: 16px;
  font-family: var(--sans);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
}

.menu {
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.08));
}

.menu-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 4px 12px;
  list-style: none;
}

.menu-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 13px;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--dim);
  text-decoration: none;
  border-radius: var(--r);
  border-bottom: 2px solid transparent;
}

.menu-list a:hover {
  color: #fff;
  background: rgba(255, 20, 147, 0.16);
  border-bottom-color: var(--pink);
}

/* 极光首屏：文在上，图在下 */
.aurora {
  position: relative;
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 20px 0;
  overflow: hidden;
}

.aurora::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -40px;
  height: 200px;
  pointer-events: none;
  background: radial-gradient(50% 100% at 50% 0, rgba(255, 20, 147, 0.55), transparent 72%);
  filter: blur(34px);
}

.aurora-copy {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.aurora h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 6.2vw, 54px);
  line-height: 1.24;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 6px 30px rgba(255, 0, 0, 0.55), 0 1px 0 rgba(38, 23, 23, 0.6);
}

.aurora-media {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 940px;
  margin: 26px 0 0;
}

.aurora-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r);
  box-shadow: 0 26px 64px rgba(255, 0, 0, 0.3);
}

/* 正文区：左侧 aside + 右侧 main>section>article>div */
main {
  display: block;
}

.wrap {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 38px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 34px 20px 70px;
}

.rail {
  position: sticky;
  top: 128px;
  align-self: start;
  padding: 16px 14px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.rail-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 17px;
  letter-spacing: 0.16em;
  color: var(--pink);
}

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

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  font-size: 16px;
  font-family: var(--sans);
  color: var(--dim);
  text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: var(--r);
}

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

.stage {
  min-width: 0;
}

.doc-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(22px, 3.4vw, 31px);
  line-height: 1.3;
  color: #fff;
  letter-spacing: 0.01em;
}

.subtitle {
  margin: 0 0 28px;
  padding-left: 14px;
  font-size: 16px;
  line-height: 1.72;
  color: var(--dim);
  border-left: 3px solid var(--red);
}

.body {
  font-size: 17px;
}

.body > article {
  margin: 0 0 30px;
  padding: 22px 22px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-left: 3px solid rgba(255, 20, 147, 0.55);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.body article[id] {
  scroll-margin-top: 132px;
}

.body h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.34;
  color: #fff;
  letter-spacing: 0.01em;
}

.body h3 {
  margin: 26px 0 10px;
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.5;
  color: #ffd0e2;
}

.body p {
  margin: 0 0 16px;
  line-height: 1.86;
}

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

.body li {
  margin-bottom: 8px;
}

.body a {
  color: #ff9ac6;
  text-decoration-color: rgba(255, 154, 198, 0.5);
  text-underline-offset: 3px;
}

.body a:hover {
  color: #fff;
  text-decoration-color: var(--pink);
}

.body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.body blockquote {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 20, 147, 0.09);
  border-radius: var(--r);
}

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

.body strong {
  color: #fff;
}

.body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 15px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}

/* 页脚：仅 p + small */
footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 34px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 20px 44px;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  font-size: 16px;
}

.foot-brand {
  font-family: var(--display);
  font-size: 21px;
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 4px 20px rgba(255, 0, 0, 0.4);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  justify-content: flex-end;
  align-content: flex-start;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  font-family: var(--sans);
  color: var(--dim);
  text-decoration: none;
}

.foot-links a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer small {
  grid-column: 1 / -1;
  margin-top: 18px;
  padding-top: 16px;
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  color: var(--mute);
  border-top: 1px dashed var(--line-soft);
}

/* 滚动显现 */
html.js .reveal,
html.js .body > article {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

html.js .reveal.in,
html.js .body > article.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .wrap {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 26px;
  }

  .rail {
    position: static;
  }

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

  footer {
    grid-template-columns: 1fr;
  }

  .foot-links {
    justify-content: flex-start;
  }
}

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

  .brandrow {
    flex-wrap: wrap;
    padding: 8px 14px 8px;
  }

  .logo {
    font-size: 19px;
  }

  .burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 3;
  }

  .find {
    order: 2;
    flex: 1 1 auto;
  }

  .find input {
    width: 100%;
    min-width: 0;
  }

  /* 无 JS 时菜单常开 */
  .menu {
    display: block;
  }

  html.js .menu {
    display: none;
  }

  html.js .menu.open {
    display: block;
  }

  .menu-list {
    flex-direction: column;
    flex-wrap: nowrap;
    padding: 6px 10px 10px;
    max-height: 62vh;
    overflow-y: auto;
  }

  .menu-list a {
    min-height: 46px;
    border-radius: 3px;
  }

  .aurora {
    min-height: auto;
    padding: 34px 16px 0;
  }

  .aurora h1 {
    font-size: clamp(26px, 8vw, 36px);
  }

  .aurora-media {
    margin-top: 20px;
  }

  .body > article {
    padding: 18px 16px 6px;
  }

  .body article[id] {
    scroll-margin-top: 116px;
  }

  footer {
    padding: 32px 16px 36px;
  }
}

@media (max-width: 420px) {
  .rail-list {
    grid-template-columns: 1fr;
  }

  .find button {
    padding: 0 11px;
  }
}

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

  body::before {
    animation: none;
  }

  html.js .reveal,
  html.js .body > article {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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