:root {
  --ink: #192617;
  --ink-2: #101a12;
  --neon: #87ff71;
  --cyan: #01cdfe;
  --pink: #ff71ce;
  --purple: #b967ff;
  --text: #e8f6e4;
  --muted: #a8c3a3;
  --line: rgba(135, 255, 113, 0.24);
  --glass: rgba(18, 32, 22, 0.55);
  --rail: 236px;
}

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

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

body {
  margin: 0;
  padding-left: var(--rail);
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Nunito Sans", "Rubik", system-ui, -apple-system, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  background:
    radial-gradient(900px 520px at 88% -10%, rgba(1, 205, 254, 0.2), transparent 60%),
    radial-gradient(760px 460px at 4% 6%, rgba(255, 113, 206, 0.13), transparent 58%),
    var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(135, 255, 113, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 205, 254, 0.06) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  -webkit-mask-image: radial-gradient(circle at 50% 22%, #000 28%, transparent 78%);
  mask-image: radial-gradient(circle at 50% 22%, #000 28%, transparent 78%);
  opacity: 0.6;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  opacity: 0.55;
}

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

img {
  max-width: 100%;
}

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

/* 侧边固定竖排导航 */
.sidedock {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  width: var(--rail);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 20px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(25, 38, 23, 0.96), rgba(11, 19, 13, 0.95));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 46px;
  padding: 8px;
  border: 1px solid var(--line);
  background: rgba(135, 255, 113, 0.07);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(135, 255, 113, 0.7);
  border-radius: 0;
}

.logo img {
  display: block;
  width: 40px;
  height: 40px;
  max-width: none;
  object-fit: contain;
}

.logo-txt {
  display: block;
  max-width: 100%;
  overflow-wrap: break-word;
}

.sidedock nav {
  flex: 0 1 auto;
  min-width: 0;
}

.sidedock nav p {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}

.sidedock nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.sidedock nav a i {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border: 1px solid var(--neon);
  background: rgba(135, 255, 113, 0.22);
  transform: rotate(45deg);
  transition: background 0.2s, border-color 0.2s;
}

.sidedock nav a:hover,
.sidedock nav a:focus-visible {
  color: #fff;
  border-color: var(--line);
  background: rgba(1, 205, 254, 0.1);
}

.sidedock nav a:hover i {
  background: var(--cyan);
  border-color: var(--cyan);
}

.cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 0;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  color: #10200f;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 0 22px rgba(135, 255, 113, 0.35);
}

/* 首屏 */
.hero {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 104px 26px 90px;
  overflow: hidden;
  text-align: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ff71ce 0%, #01cdfe 48%, #b967ff 72%, #192617 100%);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  filter: hue-rotate(-8deg) saturate(1.12);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(25, 38, 23, 0.74), rgba(25, 38, 23, 0.56) 46%, rgba(25, 38, 23, 0.95));
}

.hero-grid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background-image:
    linear-gradient(rgba(135, 255, 113, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1, 205, 254, 0.28) 1px, transparent 1px);
  background-size: 48px 26px;
  transform: perspective(220px) rotateX(64deg);
  transform-origin: bottom center;
  opacity: 0.6;
  pointer-events: none;
}

.badge {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  max-width: calc(100% - 32px);
  padding: 8px 20px;
  border: 1px solid var(--neon);
  background: rgba(25, 38, 23, 0.62);
  color: var(--neon);
  font-size: 16px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  text-shadow: 0 0 12px rgba(135, 255, 113, 0.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: badge-float 6s ease-in-out infinite;
}

@keyframes badge-float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(7px); }
}

.hero-in {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 940px;
  min-width: 0;
}

.hero h1 {
  position: relative;
  margin: 0 0 18px;
  color: #f4fff2;
  font-family: "Rubik", "Nunito Sans", system-ui, sans-serif;
  font-size: clamp(2.3rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
  text-shadow: 0 0 18px rgba(135, 255, 113, 0.55), 0 0 54px rgba(1, 205, 254, 0.4);
}

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

.hero h1::before {
  color: var(--cyan);
  opacity: 0.62;
  clip-path: inset(0 0 56% 0);
  animation: glitch-a 5.5s steps(2, end) infinite;
}

.hero h1::after {
  color: var(--pink);
  opacity: 0.55;
  clip-path: inset(56% 0 0 0);
  animation: glitch-b 6.5s steps(2, end) infinite;
}

@keyframes glitch-a {
  0%, 90%, 100% { transform: translate(-2px, -1px); }
  92% { transform: translate(-7px, 1px); }
  95% { transform: translate(3px, -2px); }
}

@keyframes glitch-b {
  0%, 88%, 100% { transform: translate(2px, 1px); }
  91% { transform: translate(6px, -1px); }
  94% { transform: translate(-3px, 2px); }
}

.hero-sub {
  margin: 0 auto;
  max-width: 46ch;
  color: rgba(232, 246, 228, 0.9);
  font-size: 17px;
  overflow-wrap: break-word;
}

/* 内容区 */
main {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.wrap {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 36px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 28px 74px;
  align-items: start;
}

.wrap > * {
  min-width: 0;
}

.rail {
  position: sticky;
  top: 24px;
  padding: 16px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.rail h2 {
  margin: 0;
  color: var(--neon);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.rail hr {
  height: 2px;
  margin: 10px 0 12px;
  border: 0;
  background: linear-gradient(90deg, var(--neon), transparent);
}

.rail ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: railc;
}

.rail li a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 40px;
  padding: 6px 4px;
  border-bottom: 1px dashed rgba(135, 255, 113, 0.16);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.4;
  text-decoration: none;
}

.rail li a::before {
  counter-increment: railc;
  content: counter(railc, decimal-leading-zero);
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.rail li a:hover,
.rail li a:focus-visible {
  color: #fff;
}

.sheet {
  min-width: 0;
}

.prose {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.prose > article {
  padding: 28px 26px 32px;
  border: 1px solid var(--line);
  border-left: 3px solid rgba(135, 255, 113, 0.6);
  border-radius: 0;
  background: var(--glass);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  scroll-margin-top: 24px;
  transition: border-color 0.3s, background 0.3s;
}

.prose > article + article {
  margin-top: 26px;
}

.prose > article:hover {
  border-color: rgba(1, 205, 254, 0.4);
  border-left-color: var(--cyan);
}

.prose h2 {
  margin: 0;
  color: #f4fff2;
  font-family: "Rubik", "Nunito Sans", system-ui, sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 600;
  line-height: 1.32;
  text-shadow: 0 0 16px rgba(1, 205, 254, 0.35);
}

.prose h2 + hr {
  display: block;
  height: 3px;
  margin: 12px 0 20px;
  border: 0;
  background: linear-gradient(90deg, var(--neon), var(--cyan) 45%, transparent 88%);
  box-shadow: 0 0 14px rgba(1, 205, 254, 0.4);
}

.prose h3 {
  margin: 26px 0 10px;
  color: var(--neon);
  font-size: 1.15rem;
  line-height: 1.4;
}

.prose h3 + hr {
  display: block;
  height: 2px;
  margin: 8px 0 16px;
  border: 0;
  background: linear-gradient(90deg, rgba(135, 255, 113, 0.7), transparent);
}

.prose p {
  margin: 0 0 1em;
}

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

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: break-word;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.35em;
}

.prose li {
  margin: 0 0 0.4em;
}

.prose blockquote {
  margin: 20px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--pink);
  background: rgba(255, 113, 206, 0.08);
  color: #f3e7f5;
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 0;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

.prose pre {
  max-width: 100%;
  overflow-x: auto;
}

.prose code {
  padding: 1px 5px;
  background: rgba(1, 205, 254, 0.14);
  color: var(--cyan);
  font-size: 0.94em;
}

/* 页脚 */
.site-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 26px;
  padding: 28px 28px 34px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 26, 18, 0.45), rgba(10, 17, 12, 0.95));
}

.foot-left {
  min-width: 0;
}

.foot-logo {
  color: #fff;
  font-family: "Rubik", "Nunito Sans", system-ui, sans-serif;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: 0 0 18px rgba(135, 255, 113, 0.55);
}

.site-foot nav {
  min-width: 0;
}

.site-foot nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
}

.site-foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 16px;
  text-decoration: none;
}

.site-foot nav a:hover,
.site-foot nav a:focus-visible {
  color: var(--neon);
}

.foot-copy {
  color: var(--muted);
  font-size: 16px;
}

/* 回到顶部 */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--neon);
  border-radius: 0;
  background: rgba(16, 26, 18, 0.86);
  color: var(--neon);
  font-size: 16px;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s;
}

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

/* 进场 */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 45ms);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

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

/* 平板与移动端 */
@media (max-width: 900px) {
  body {
    padding-left: 0;
  }

  .sidedock {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    max-width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .logo {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 6px 10px;
    letter-spacing: 0.04em;
  }

  .logo img {
    width: 32px;
    height: 32px;
  }

  .sidedock nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .sidedock nav p {
    flex-direction: row;
    gap: 2px;
  }

  .sidedock nav a {
    min-height: 44px;
    padding: 6px 10px;
    white-space: nowrap;
  }

  .sidedock nav a i {
    display: none;
  }

  .cta {
    display: none;
  }

  .hero {
    min-height: 86vh;
    min-height: 86svh;
    padding: 84px 18px 64px;
  }

  .hero h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 26px 16px 58px;
  }

  .rail {
    position: static;
    overflow: hidden;
  }

  .rail ol {
    display: flex;
    gap: 4px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .rail li a {
    border-bottom: 0;
    border: 1px solid rgba(135, 255, 113, 0.2);
    padding: 6px 10px;
    white-space: nowrap;
  }

  .rail li a::before {
    display: none;
  }

  .prose > article {
    padding: 22px 16px 26px;
    scroll-margin-top: 78px;
  }

  .site-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 18px 30px;
  }

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

@media (max-width: 380px) {
  .hero h1 {
    font-size: 1.95rem;
  }
}

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