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

:root {
  --ink: #08080f;
  --ink-2: #12122a;
  --panel: #1a1a2e;
  --panel-2: #22223c;
  --neon: #ff0000;
  --rose: #ff006e;
  --cyan: #00e5ff;
  --fg: #f3eef7;
  --dim: #a79db7;
  --line: rgba(255, 0, 110, 0.26);
  --rail: 240px;
}

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

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

body {
  margin: 0;
  padding-left: var(--rail);
  background: var(--ink);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035) 0 1px,
    rgba(0, 0, 0, 0) 1px 3px
  );
  mix-blend-mode: screen;
}

a {
  color: var(--rose);
}

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

/* ---------- 左侧固定导航 ---------- */

.rail-head {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 16px 20px;
  background: linear-gradient(180deg, #14142c 0%, #0a0a16 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.brand {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--neon), var(--rose));
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.5);
  text-decoration: none;
  overflow: hidden;
  flex: none;
}

.brand-mark {
  font-size: 16px;
  font-weight: 700;
  color: #12000a;
  letter-spacing: -0.03em;
  line-height: 1;
  padding: 0 3px;
  text-align: center;
  word-break: break-all;
  max-height: 42px;
  overflow: hidden;
}

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

.rail-head nav {
  flex: 1 1 auto;
  min-height: 0;
}

.rail-head nav p {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.rail-head nav a {
  display: block;
  padding: 12px 8px 12px 12px;
  min-height: 44px;
  color: var(--dim);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.4;
  border-left: 2px solid rgba(255, 0, 110, 0.16);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  animation: rise 0.5s ease both;
  animation-delay: calc(var(--i, 0) * 55ms + 80ms);
}

.rail-head nav a:hover,
.rail-head nav a:focus-visible {
  color: #fff;
  border-left-color: var(--neon);
  background: linear-gradient(90deg, rgba(255, 0, 110, 0.16), rgba(255, 0, 110, 0));
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.85);
}

.find {
  margin-top: auto;
  flex: none;
}

.find-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: #0d0d1c;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.find-input::placeholder {
  color: #7a7189;
}

.find-input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 2px rgba(255, 0, 110, 0.22);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 96px 40px 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.09) 1px, transparent 1px);
  background-size: 72px 72px;
}

.hero::before {
  content: attr(data-brand);
  position: absolute;
  left: -0.05em;
  top: 7%;
  font-size: clamp(4.4rem, 16vw, 13rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 0, 110, 0.4);
  pointer-events: none;
  animation: glitch 8s steps(1, end) infinite;
}

.hero-art {
  position: absolute;
  right: 4vw;
  top: 16%;
  width: min(36vw, 400px);
  aspect-ratio: 3 / 4;
  pointer-events: none;
}

.hero-img {
  position: absolute;
  width: 68%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 0 40px rgba(255, 0, 110, 0.32);
}

.hero-img-1 {
  top: 0;
  right: 0;
  z-index: 2;
  transform: rotate(-6deg);
}

.hero-img-2 {
  top: 28%;
  right: 34%;
  z-index: 1;
  transform: rotate(5deg);
  filter: hue-rotate(-16deg) saturate(1.1);
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 640px;
  text-align: left;
  animation: heroIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-index {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
  margin-bottom: 14px;
}

.hero-title {
  margin: 0;
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  line-height: 1.16;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-shadow: 0 0 24px rgba(255, 0, 110, 0.55), 0 0 2px rgba(255, 255, 255, 0.6);
}

.hero-desc {
  margin: 18px 0 0;
  max-width: 30em;
  font-size: 17px;
  color: #d9d2e4;
}

.hero-cta {
  display: inline-block;
  margin-top: 28px;
  padding: 13px 26px;
  font-size: 16px;
  font-weight: 600;
  color: #12000a;
  background: linear-gradient(100deg, var(--neon), var(--rose));
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 0 24px rgba(255, 0, 110, 0.5);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(255, 0, 110, 0.75);
}

/* ---------- 主区 ---------- */

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 44px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 60px 40px 90px;
}

.body-col {
  min-width: 0;
}

.prose {
  display: block;
}

.prose section {
  scroll-margin-top: 24px;
}

.prose section + section {
  margin-top: 52px;
  padding-top: 44px;
  border-top: 1px solid rgba(255, 0, 110, 0.16);
}

.prose h2 {
  margin: 0 0 18px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 18px rgba(255, 0, 110, 0.4);
}

.prose h2::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 12px;
  vertical-align: 0.08em;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon);
}

.prose h3 {
  margin: 34px 0 12px;
  font-size: 1.16rem;
  line-height: 1.4;
  font-weight: 600;
  color: var(--rose);
}

.prose p {
  margin: 0 0 18px;
  color: #ddd6e7;
}

.prose a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.4);
}

.prose a:hover {
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.8);
}

.prose ul,
.prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 9px;
  color: #ddd6e7;
}

.prose blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--rose);
  background: var(--panel);
  border-radius: 0 10px 10px 0;
  color: #e7e0f0;
}

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

.prose table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  font-size: 16px;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
}

.prose th,
.prose td {
  padding: 11px 13px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.prose th {
  color: var(--rose);
  font-weight: 600;
}

.prose code {
  padding: 2px 6px;
  font-size: 15px;
  background: var(--panel-2);
  border-radius: 6px;
  color: var(--cyan);
}

/* ---------- 右侧栏 ---------- */

.rail-aside {
  position: sticky;
  top: 26px;
  padding: 22px 20px;
  background: var(--panel);
  border-radius: 10px;
}

.rail-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #fff;
}

.rail-title::after {
  content: '';
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--neon), var(--rose));
}

.subtitle {
  margin: 12px 0 16px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--dim);
}

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

.rail-list li {
  counter-increment: rail;
}

.rail-list a {
  display: block;
  padding: 9px 0;
  min-height: 40px;
  font-size: 15px;
  line-height: 1.5;
  color: #cfc6dd;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: color 0.16s ease, padding-left 0.16s ease;
}

.rail-list a::before {
  content: counter(rail, decimal-leading-zero);
  margin-right: 10px;
  font-size: 12px;
  color: var(--neon);
  letter-spacing: 0.06em;
}

.rail-list a:hover {
  color: #fff;
  padding-left: 5px;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.8);
}

/* ---------- 页脚 ---------- */

.site-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 30px;
  padding: 52px 40px 46px;
  border-top: 1px solid var(--line);
  background: linear-gradient(0deg, #0d0d1c, var(--ink));
}

.foot-brand {
  width: 100%;
  margin: 0;
  font-size: clamp(2.4rem, 9.5vw, 6.4rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.055em;
  background: linear-gradient(92deg, var(--neon), var(--rose) 60%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-copy {
  font-size: 14px;
  color: #8c8399;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  font-size: 14px;
}

.foot-links a {
  display: inline-block;
  padding: 8px 2px;
  min-height: 40px;
  color: var(--dim);
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--rose);
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.8);
}

/* ---------- 回到顶部 ---------- */

.to-top {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 55;
  min-height: 44px;
  padding: 11px 18px;
  font: inherit;
  font-size: 14px;
  color: #fff;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* ---------- 动效 ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

html.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes glitch {
  0%,
  91%,
  100% {
    transform: translate(0, 0) skewX(0);
  }
  92% {
    transform: translate(-5px, 2px) skewX(2deg);
  }
  94% {
    transform: translate(5px, -3px) skewX(-2deg);
  }
  96% {
    transform: translate(-3px, 1px) skewX(1deg);
  }
  98% {
    transform: translate(2px, 0) skewX(0);
  }
}

/* ---------- 移动端 ---------- */

@media (max-width: 900px) {
  :root {
    --rail: 0px;
  }

  body {
    padding-left: 0;
    padding-top: 62px;
  }

  .rail-head {
    inset: 0 0 auto 0;
    width: auto;
    height: 62px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .brand {
    width: 44px;
    height: 44px;
  }

  .rail-head nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

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

  .rail-head nav p {
    flex-direction: row;
    gap: 4px;
  }

  .rail-head nav a {
    white-space: nowrap;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 11px 9px;
    font-size: 15px;
  }

  .rail-head nav a:hover,
  .rail-head nav a:focus-visible {
    border-bottom-color: var(--neon);
    background: none;
  }

  .find {
    margin-top: 0;
    width: 96px;
    flex: none;
  }

  .find-input {
    padding: 8px 9px;
    font-size: 14px;
    min-height: 40px;
  }

  .hero {
    min-height: 88svh;
    padding: 56px 20px 48px;
    background-size: 48px 48px;
  }

  .hero::before {
    font-size: clamp(3.2rem, 19vw, 6rem);
    top: 5%;
    opacity: 0.8;
  }

  .hero-art {
    width: 62vw;
    right: 4vw;
    top: 9%;
    opacity: 0.42;
  }

  .hero-copy {
    max-width: 100%;
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
    padding: 44px 20px 64px;
  }

  .rail-aside {
    position: static;
    order: 2;
  }

  .prose section {
    scroll-margin-top: 82px;
  }

  .site-foot {
    padding: 40px 20px 36px;
  }

  .to-top {
    right: 14px;
    bottom: 14px;
  }
}

@media (max-width: 420px) {
  .find {
    width: 78px;
  }

  .hero-art {
    width: 68vw;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

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