@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

:root {
  --ink: #1a1a2e;
  --ink-deep: #0b0b18;
  --block: #232342;
  --block-hi: #2b2b52;
  --neon: #ff0000;
  --pink: #ff006e;
  --cyan: #00d8ff;
  --paper: #f4eefc;
  --dim: #a9a4c7;
  --rail: 232px;
  --radius: 28px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--ink-deep);
}

body {
  margin: 0;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 18px;
  line-height: 1.68;
  color: var(--paper);
  background:
    radial-gradient(900px 620px at 88% -8%, rgba(255, 0, 110, 0.30), transparent 68%),
    radial-gradient(760px 520px at -6% 96%, rgba(255, 0, 0, 0.22), transparent 70%),
    linear-gradient(180deg, #1a1a2e 0%, #101024 58%, #0b0b18 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 3px);
  opacity: 0.42;
  mix-blend-mode: screen;
}

img { max-width: 100%; }

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}

a:hover {
  color: var(--pink);
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.85);
}

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

/* 品牌图标 */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--rail);
  padding: 18px 0 0 20px;
  z-index: 70;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: linear-gradient(140deg, var(--neon), var(--pink));
  box-shadow: 0 0 26px rgba(255, 0, 110, 0.62);
  overflow: hidden;
}

.brand:hover { box-shadow: 0 0 34px rgba(255, 0, 110, 0.95); }

.brand-img { width: 54px; height: 54px; object-fit: contain; }

.brand-mark {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 26px;
  font-weight: 700;
  color: #10101f;
  letter-spacing: 0;
}

/* 左侧竖排导航 */
.rail-nav {
  position: fixed;
  top: 96px;
  bottom: 0;
  left: 0;
  width: var(--rail);
  padding: 0 0 28px 20px;
  z-index: 70;
  overflow-y: auto;
  scrollbar-width: thin;
}

.rail-nav > ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-nav > ol > li > a {
  display: block;
  padding: 11px 6px 11px 0;
  font-size: 17px;
  color: var(--dim);
  letter-spacing: 0.02em;
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.rail-nav > ol > li > a:hover,
.rail-nav > ol > li > a:focus-visible {
  color: #fff;
  border-left-color: var(--pink);
  transform: translateX(4px);
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.9);
}

.nav-search { margin-top: 14px; padding-left: 12px; }

.search { display: flex; gap: 6px; }

.search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: #2a2a4e;
  color: var(--paper);
  font: inherit;
  font-size: 16px;
}

.search input::placeholder { color: #8b86ad; }

.search button {
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: var(--pink);
  color: #10101f;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.search button:hover { background: var(--neon); color: #fff; }

/* 主区 */
main { padding: 0; }

/* 头图区 */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: center;
  padding: 24px 16px 48px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background: linear-gradient(90deg, var(--neon), var(--pink) 55%, transparent);
  clip-path: polygon(0 62%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.8;
  pointer-events: none;
}

.hero-figure {
  margin: 0;
  order: 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: #23234a;
  min-height: 170px;
  aspect-ratio: 16 / 10;
  box-shadow: 0 0 44px rgba(255, 0, 110, 0.32);
}

.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform-origin: center;
  will-change: transform;
}

.hero-art {
  width: 100%;
  height: 100%;
  min-height: 170px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 0, 110, 0.34) 0 10px, transparent 10px 20px),
    radial-gradient(circle at 32% 28%, #ff006e 0%, transparent 62%),
    radial-gradient(circle at 76% 74%, rgba(0, 216, 255, 0.7) 0%, transparent 58%),
    linear-gradient(135deg, #ff0000, #1a1a2e 78%);
}

.hero-copy { order: 1; text-align: right; }

.hero h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-family: "Crimson Pro", Georgia, "Songti SC", serif;
  font-size: clamp(36px, 8vw, 66px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.9), 0 0 44px rgba(255, 0, 0, 0.55);
}

.hero h1::before,
.hero h1::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero h1::before {
  color: var(--cyan);
  transform: translate(-3px, 0);
  clip-path: polygon(0 0, 100% 0, 100% 44%, 0 44%);
  opacity: 0.8;
  animation: glitch 3.6s steps(2, end) infinite;
}

.hero h1::after {
  color: var(--pink);
  transform: translate(3px, 0);
  clip-path: polygon(0 56%, 100% 56%, 100% 100%, 0 100%);
  opacity: 0.8;
  animation: glitch 2.8s steps(2, end) infinite reverse;
}

@keyframes glitch {
  0%, 100% { transform: translate(0, 0) skewX(0deg); }
  18% { transform: translate(-3px, 1px) skewX(-2.4deg); }
  36% { transform: translate(3px, -1px) skewX(0deg); }
  54% { transform: translate(-2px, 0) skewX(1.8deg); }
  72% { transform: translate(2px, 1px) skewX(0deg); }
}

/* 侧栏 + 正文 */
.stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 0 16px 44px;
  align-items: start;
}

.rail {
  background: linear-gradient(160deg, #2c1c46, #1c1c37);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 34px rgba(255, 0, 110, 0.16);
}

.rail-brand {
  margin: 0;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0.06em;
  color: var(--pink);
  text-shadow: 0 0 16px rgba(255, 0, 110, 0.85);
}

.subtitle {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dim);
}

.stage-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.stage-body > article {
  background: var(--block);
  border-radius: var(--radius);
  padding: 26px 20px 24px;
  scroll-margin-top: 130px;
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

.stage-body > article:nth-child(even) { background: var(--block-hi); }

.stage-body > article.hit {
  animation: hitflash 1.5s ease-out 1;
}

@keyframes hitflash {
  0% { box-shadow: 0 0 0 3px rgba(255, 0, 110, 0.9), 0 0 40px rgba(255, 0, 110, 0.6); }
  100% { box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9); }
}

.stage-body h2 {
  margin: 0 0 14px;
  font-family: "Crimson Pro", Georgia, "Songti SC", serif;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.22;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 13px rgba(255, 0, 110, 0.7);
}

.stage-body h3 {
  margin: 26px 0 10px;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: 22px;
  line-height: 1.3;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 216, 255, 0.45);
}

.stage-body p { margin: 0 0 15px; max-width: 66ch; }

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

.stage-body li { margin: 0 0 8px; max-width: 64ch; }

.stage-body li::marker { color: var(--pink); }

.stage-body strong { color: #fff; }

.stage-body a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0, 216, 255, 0.45);
  text-underline-offset: 3px;
}

.stage-body blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  background: rgba(255, 0, 110, 0.12);
  border-left: 3px solid var(--pink);
  border-radius: 6px 20px 20px 6px;
  color: #ffe6f1;
}

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

.stage-body figure { margin: 20px 0; }

.stage-body figcaption { font-size: 16px; color: var(--dim); margin-top: 8px; }

.stage-body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 16px;
}

.stage-body th,
.stage-body td { padding: 10px 12px; text-align: left; }

.stage-body thead th { color: var(--pink); letter-spacing: 0.04em; }

.stage-body tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.05); }

.stage-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.94em;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 6px;
  border-radius: 6px;
}

/* 页脚 */
.foot { padding: 0 16px 30px; }

.foot-cta {
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0 12px, transparent 12px 24px),
    linear-gradient(120deg, rgba(255, 0, 110, 0.85), rgba(255, 0, 0, 0.28) 62%, rgba(26, 26, 46, 0.1));
  padding: 30px 22px;
  text-align: center;
  box-shadow: 0 0 40px rgba(255, 0, 110, 0.24);
}

.foot-cta a {
  display: inline-block;
  font-family: "Crimson Pro", Georgia, serif;
  font-size: clamp(28px, 6vw, 46px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.95);
}

.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.foot-logo {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--neon), var(--pink));
  overflow: hidden;
  flex: 0 0 auto;
}

.foot-logo .brand-img { width: 44px; height: 44px; object-fit: contain; }
.foot-logo .brand-mark { font-size: 21px; }

.foot-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  font-size: 16px;
  color: var(--dim);
}

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

.foot-copy {
  flex: 1 1 auto;
  margin: 0;
  text-align: center;
  font-size: 16px;
  color: #8b86ad;
}

/* 回到顶部 */
.totop {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--pink);
  color: #10101f;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 0 22px rgba(255, 0, 110, 0.7);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.totop.on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: var(--neon); color: #fff; }

/* 移动端：导航转顶部横条 */
@media (max-width: 899px) {
  .masthead {
    position: sticky;
    top: 0;
    width: auto;
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: rgba(11, 11, 24, 0.94);
    backdrop-filter: blur(8px);
    z-index: 76;
  }

  .brand { width: 44px; height: 44px; border-radius: 14px; }
  .brand-img { width: 44px; height: 44px; }
  .brand-mark { font-size: 21px; }

  .rail-nav {
    position: sticky;
    top: 64px;
    bottom: auto;
    width: auto;
    padding: 8px 12px;
    background: rgba(11, 11, 24, 0.95);
    backdrop-filter: blur(8px);
    overflow: visible;
    z-index: 75;
  }

  .rail-nav > ol {
    flex-direction: row;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-nav > ol::-webkit-scrollbar { display: none; }

  .rail-nav > ol > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    white-space: nowrap;
    border-left: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 16px;
  }

  .rail-nav > ol > li > a:hover,
  .rail-nav > ol > li > a:focus-visible { transform: none; background: rgba(255, 0, 110, 0.24); }

  .nav-search {
    position: sticky;
    right: -12px;
    margin-top: 0;
    padding-left: 8px;
    padding-right: 12px;
    background: linear-gradient(90deg, transparent, rgba(11, 11, 24, 0.98) 30%);
    flex: 0 0 auto;
  }

  .search { flex: 0 0 148px; }

  .hero { padding: 18px 16px 44px; gap: 18px; }
  .hero::after { height: 46px; }
  .hero-figure { min-height: 160px; aspect-ratio: 16 / 9; }
  .hero-art { min-height: 160px; }

  .stage-body > article { padding: 22px 18px; scroll-margin-top: 136px; }
}

/* 桌面版 */
@media (min-width: 900px) {
  main { padding-left: var(--rail); }

  .hero {
    grid-template-columns: 1.02fr 0.98fr;
    min-height: 70vh;
    gap: 4vw;
    padding: 56px 4vw 72px;
  }

  .hero-figure { order: 1; aspect-ratio: 4 / 3; min-height: 300px; }
  .hero-copy { order: 2; }

  .stage {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 34px;
    padding: 0 4vw 64px;
  }

  .rail { position: sticky; top: 24px; }

  .stage-body > article { scroll-margin-top: 40px; padding: 32px 30px 30px; }

  .foot { padding: 0 4vw 34px calc(var(--rail) + 4vw); }

  .foot-cta { padding: 44px 30px; }

  .totop { right: 26px; bottom: 26px; }
}

/* 动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

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