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

:root {
  --ink: #1a1a2e;
  --deep: #0a0a13;
  --red: #ff0000;
  --pink: #ff006e;
  --line: rgba(255, 0, 110, 0.28);
  --text: #f3eef8;
  --dim: #b3abc6;
  --pad: clamp(16px, 4vw, 56px);
  --head-h: 68px;
  --rail-w: 288px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: radial-gradient(circle at 82% 6%, rgba(255, 0, 110, 0.16), transparent 55%), var(--deep);
  color: var(--text);
  font-family: 'Quicksand', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 0, 110, 0.22) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.5;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.26) 0px,
    rgba(0, 0, 0, 0.26) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
  mix-blend-mode: multiply;
}

body.menuOpen { overflow: hidden; }

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

/* header */
.siteHead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 var(--pad);
  background: rgba(10, 10, 19, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 0 22px rgba(255, 0, 110, 0.16);
  z-index: 960;
}

.mark {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--pink);
  border-radius: 10px;
  text-decoration: none;
  color: #fff;
  box-shadow: inset 0 0 12px rgba(255, 0, 110, 0.5), 0 0 14px rgba(255, 0, 110, 0.32);
}

.markImg { width: 30px; height: 30px; object-fit: contain; }

.markTxt {
  font-family: 'Caveat', 'PingFang SC', cursive;
  font-size: 1.5rem;
  line-height: 1;
  text-shadow: 0 0 10px var(--pink);
}

.finder {
  margin-left: auto;
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 300px;
  border: 1px solid rgba(255, 0, 110, 0.45);
  border-radius: 999px;
  background: rgba(26, 26, 46, 0.66);
  overflow: hidden;
}

.finder input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.finder input::placeholder { color: #8b84a3; }

.finder button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid rgba(255, 0, 110, 0.3);
  background: rgba(255, 0, 110, 0.14);
  color: #ffd9e7;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-shadow: 0 0 8px var(--pink);
}

.finder button:hover { background: rgba(255, 0, 110, 0.3); }

.burger {
  flex: 0 0 auto;
  width: 48px;
  height: 44px;
  margin-left: 4px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgba(255, 0, 110, 0.55);
  border-radius: 10px;
  background: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 全屏菜单 */
.menuPanel {
  position: fixed;
  inset: 0;
  z-index: 940;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--head-h) + 28px) var(--pad) 40px;
  overflow-y: auto;
  background: radial-gradient(circle at 72% 18%, rgba(255, 0, 110, 0.22), transparent 58%), rgba(8, 8, 16, 0.97);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  transition: opacity 0.32s ease, transform 0.32s ease, visibility 0.32s;
}

.menuPanel.open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.menuNav { width: min(680px, 100%); }

.menuNav ol {
  counter-reset: mc;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.menuNav li { counter-increment: mc; }

.menuNav a {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(255, 0, 110, 0.28);
  border-radius: 10px;
  color: var(--text);
  font-size: clamp(1.02rem, 3.2vw, 1.35rem);
  text-decoration: none;
  background: linear-gradient(100deg, rgba(26, 26, 46, 0.75), transparent);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.menuNav a::before {
  content: counter(mc, decimal-leading-zero);
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: var(--pink);
  text-shadow: 0 0 10px var(--pink);
}

.menuNav a:hover,
.menuNav a:focus-visible {
  border-color: var(--pink);
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
  transform: translateX(4px);
}

/* 主体骨架 */
main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: 0 56px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

section { min-width: 0; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  padding: calc(var(--head-h) + 48px) 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 0, 110, 0.5) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  opacity: 0.6;
  transform: translateY(calc(var(--par, 0px) * -1));
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 74%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 74%, transparent);
  pointer-events: none;
}

.hero h1 {
  position: relative;
  margin: 0;
  max-width: 22ch;
  font-family: 'Caveat', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-weight: 700;
  font-size: clamp(2.15rem, 8.4vw, 5.8rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: #fff;
  overflow-wrap: break-word;
  text-shadow: 0 0 10px #fff, 0 0 26px var(--pink), 0 0 54px var(--red);
}

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

.hero h1::before { color: var(--pink); animation: glitchA 4.4s steps(1, end) infinite; }
.hero h1::after { color: var(--red); animation: glitchB 4.4s steps(1, end) infinite; }

@keyframes glitchA {
  0%, 86%, 100% { transform: translate(-2px, -2px); clip-path: inset(0 0 52% 0); }
  88% { transform: translate(-9px, -3px) skewX(-6deg); clip-path: inset(10% 0 40% 0); }
  92% { transform: translate(5px, 2px); clip-path: inset(30% 0 20% 0); }
}

@keyframes glitchB {
  0%, 86%, 100% { transform: translate(2px, 2px); clip-path: inset(48% 0 0 0); }
  89% { transform: translate(8px, 3px) skewX(5deg); clip-path: inset(20% 0 24% 0); }
  94% { transform: translate(-4px, -2px); clip-path: inset(52% 0 6% 0); }
}

.heroSub {
  position: relative;
  max-width: 42ch;
  margin: 24px 0 0;
  color: var(--dim);
  font-size: 1rem;
  line-height: 1.8;
}

/* 正文区 */
section > div:not(.hero) {
  padding: clamp(44px, 7vw, 84px) 0;
  border-bottom: 1px dashed rgba(255, 0, 110, 0.16);
  scroll-margin-top: calc(var(--head-h) + 22px);
}

section > div:not(.hero):target,
section > div.hit {
  box-shadow: inset 3px 0 0 var(--pink), inset 16px 0 26px -22px var(--pink);
}

section h2 {
  margin: 0 0 0.55em;
  font-family: 'Caveat', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  line-height: 1.32;
  color: #fff;
  text-shadow: 0 0 16px rgba(255, 0, 110, 0.7);
  overflow-wrap: break-word;
}

section h2::after {
  content: '';
  display: block;
  width: 72px;
  height: 2px;
  margin-top: 14px;
  background: linear-gradient(90deg, var(--red), var(--pink), transparent);
  box-shadow: 0 0 10px var(--pink);
}

section h3 {
  margin: 1.5em 0 0.5em;
  font-size: 1.16rem;
  color: #fff;
}

section p { margin: 0 0 1.05em; color: #ded8ea; }

section > div:not(.hero) > h2 + p {
  color: #eee7f7;
  font-size: 1.04rem;
}

section ul, section ol { margin: 0 0 1.1em; padding-left: 1.3em; }
section li { margin: 0.35em 0; color: #ded8ea; }
section li::marker { color: var(--pink); }
section strong { color: #fff; }
section a { color: #ff86b3; text-underline-offset: 3px; }
section a:hover { color: #fff; }
section blockquote {
  margin: 1.2em 0;
  padding: 10px 18px;
  border-left: 2px solid var(--pink);
  background: rgba(255, 0, 110, 0.08);
  color: #e7e0f1;
}
section blockquote p:last-child { margin-bottom: 0; }

/* 右侧栏 */
.rail {
  position: sticky;
  top: calc(var(--head-h) + 26px);
  align-self: start;
  margin-top: calc(var(--head-h) + 56px);
  padding: 18px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(165deg, rgba(26, 26, 46, 0.94), rgba(10, 10, 19, 0.92));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 0, 110, 0.12);
}

.railTitle {
  margin: 0 0 6px;
  font-family: 'Caveat', 'PingFang SC', sans-serif;
  font-size: 1.32rem;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 0 12px var(--pink);
}

.rail .subtitle {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--dim);
}

.railList {
  counter-reset: rc;
  list-style: none;
  margin: 0;
  padding: 0;
}

.railList li { counter-increment: rc; }

.railList a {
  position: relative;
  display: block;
  min-height: 40px;
  padding: 9px 6px 9px 32px;
  border-bottom: 1px dashed rgba(255, 0, 110, 0.16);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
  text-decoration: none;
}

.railList a::before {
  content: counter(rc, decimal-leading-zero);
  position: absolute;
  left: 4px;
  top: 9px;
  font-family: 'Caveat', cursive;
  font-size: 0.98rem;
  color: var(--pink);
  text-shadow: 0 0 8px var(--pink);
}

.railList a:hover,
.railList a:focus-visible { color: #ffb6cf; }

/* 页脚 */
.siteFoot {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 72px auto 0;
  padding: 26px var(--pad) 34px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px 22px;
  flex-wrap: wrap;
  box-shadow: 0 -1px 24px rgba(255, 0, 110, 0.14);
}

.footBrand {
  font-family: 'Caveat', 'PingFang SC', sans-serif;
  font-size: clamp(1.55rem, 5.6vw, 2.9rem);
  line-height: 1.1;
  color: #fff;
  text-shadow: 0 0 12px var(--pink), 0 0 30px var(--red);
}

.footNav { flex: 1 1 220px; min-width: 0; }

.footNav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}

.footNav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 0;
  color: var(--dim);
  font-size: 0.88rem;
  text-decoration: none;
}

.footNav a:hover, .footNav a:focus-visible { color: #ff9ec2; }

.footCopy { color: #7d7695; font-size: 0.84rem; }

/* 回到顶部 */
.toTop {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 800;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--pink);
  border-radius: 10px;
  background: rgba(10, 10, 19, 0.9);
  color: #ffd9e7;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.28s, transform 0.28s, visibility 0.28s;
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.35);
}

.toTop.show { opacity: 1; visibility: visible; transform: none; }

/* 入场 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--d, 0ms);
}

.reveal.in { opacity: 1; transform: none; }

@media (max-width: 940px) {
  main { display: block; }
  .rail {
    position: static;
    margin-top: 44px;
    max-width: 460px;
  }
  .hero { min-height: 92vh; }
}

@media (max-width: 560px) {
  :root { --head-h: 62px; }
  body { font-size: 16.5px; }
  .finder { max-width: none; }
  .finder button { padding: 0 11px; font-size: 0.84rem; }
  .hero h1 { max-width: none; }
  .menuNav a { padding: 11px 14px; }
  .toTop { bottom: 14px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero h1::before, .hero h1::after { animation: none; }
  .hero::before { transform: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .menuNav a { transition: none; }
}

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