@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root{
  --ink:#0d0d0d;
  --ink2:#141020;
  --card:rgba(24,16,36,.92);
  --pri:#8000ff;
  --acc:#ff00ff;
  --txt:#ece7f5;
  --dim:#a99fbd;
  --line:rgba(128,0,255,.4);
  --line2:rgba(255,0,255,.32);
  --glow:0 0 12px rgba(255,0,255,.5);
  --r:18px;
  --pad:20px;
}

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

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

html,body{overflow-x:hidden}

body{
  margin:0;
  background-color:var(--ink);
  background-image:
    radial-gradient(880px 520px at 10% -10%, rgba(128,0,255,.3), transparent 62%),
    radial-gradient(720px 460px at 94% 2%, rgba(255,0,255,.2), transparent 60%);
  background-repeat:no-repeat;
  background-attachment:fixed;
  color:var(--txt);
  font-family:"DM Sans","Nunito",system-ui,-apple-system,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size:17px;
  line-height:1.72;
  letter-spacing:.01em;
  -webkit-font-smoothing:antialiased;
}

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

img{max-width:100%;height:auto}
a{color:var(--acc);text-decoration:none}
p{margin:0 0 1em}
menu,ol,ul{margin:0;padding:0;list-style:none}
hr{border:0;height:2px;margin:10px 0 18px;background:linear-gradient(90deg,var(--acc),var(--pri) 55%,transparent);box-shadow:var(--glow)}

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

.skip{
  position:absolute;
  left:12px;
  top:-64px;
  z-index:120;
  padding:10px 16px;
  border-radius:12px;
  background:var(--acc);
  color:#150018;
  font-weight:700;
  transition:top .2s ease;
}
.skip:focus{top:12px}

/* 顶部 */
.hud-head{
  position:sticky;
  top:0;
  z-index:60;
  background:rgba(13,13,13,.9);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line2);
}

.strip{
  margin:0;
  padding:7px var(--pad);
  overflow:hidden;
  white-space:nowrap;
  text-align:center;
  color:var(--acc);
  font-size:16px;
  line-height:1.6;
  letter-spacing:.22em;
  text-shadow:var(--glow);
  border-bottom:1px dashed rgba(128,0,255,.3);
}
.strip span{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:top}

.hud-bar{
  position:relative;
  display:flex;
  align-items:center;
  gap:6px;
  max-width:1140px;
  margin:0 auto;
  padding:8px var(--pad);
}

.dock{display:flex;align-items:center;gap:2px;flex:1 1 0;min-width:0;flex-wrap:wrap}
.dock-l{justify-content:flex-end}
.dock-r{justify-content:flex-start}

.dock a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:8px 11px;
  color:var(--dim);
  font-size:16px;
  border-radius:12px;
  transition:color .2s ease,background .2s ease;
}
.dock a:hover{color:#fff;background:rgba(128,0,255,.24)}

.brand{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:6px 10px;
  min-height:44px;
  color:#fff;
}
.mark,.mark-glyph{width:32px;height:32px;border-radius:11px;flex:0 0 auto}
.mark{object-fit:cover;border:1px solid var(--line2)}
.mark-glyph{
  background:linear-gradient(140deg,var(--pri),var(--acc));
  box-shadow:inset 0 2px 0 rgba(255,255,255,.35),0 0 14px rgba(255,0,255,.55);
}
.brand-t{
  font-family:"Nunito",system-ui,sans-serif;
  font-weight:900;
  font-size:19px;
  letter-spacing:.04em;
  white-space:nowrap;
  text-shadow:0 0 10px rgba(255,0,255,.75);
}

.hud-menu{position:relative;flex:0 0 auto}
.hud-menu summary{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:8px 16px;
  list-style:none;
  cursor:pointer;
  border:1px solid var(--line2);
  border-radius:999px;
  color:var(--acc);
  font-size:16px;
  letter-spacing:.1em;
  background:rgba(128,0,255,.14);
  transition:background .2s ease,color .2s ease;
}
.hud-menu summary::-webkit-details-marker{display:none}
.hud-menu summary:hover,.hud-menu[open] summary{background:rgba(255,0,255,.24);color:#fff}

.menu-list{
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  min-width:230px;
  padding:10px;
  border:1px solid var(--line2);
  border-radius:var(--r);
  background:var(--card);
  box-shadow:0 26px 50px -22px #000,0 0 0 1px rgba(255,0,255,.12);
  border-bottom:3px solid var(--acc);
}
.menu-list a{
  display:flex;
  align-items:center;
  min-height:44px;
  padding:9px 12px;
  border-radius:12px;
  color:var(--txt);
  font-size:16px;
}
.menu-list a:hover{background:rgba(128,0,255,.28);color:#fff}

/* 首屏 */
.hero{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:20px;
  min-height:45vh;
  max-width:1140px;
  margin:0 auto;
  padding:34px var(--pad) 34px;
}
.hero::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:12px;
  background:linear-gradient(90deg,var(--pri),var(--acc));
  clip-path:polygon(0 70%,100% 0,100% 100%,0 100%);
  box-shadow:var(--glow);
  opacity:.9;
}

.hero-txt{position:relative;text-align:center;max-width:760px}

.hero h1{
  position:relative;
  display:inline-block;
  margin:0 0 14px;
  font-family:"Nunito",system-ui,sans-serif;
  font-weight:900;
  font-size:clamp(27px,6.6vw,50px);
  line-height:1.24;
  letter-spacing:.02em;
  color:#fff;
  text-shadow:0 0 18px rgba(255,0,255,.7),0 0 42px rgba(128,0,255,.55);
}
.hero h1::before,
.hero h1::after{
  content:attr(data-text);
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.72;
}
.hero h1::before{color:var(--acc);transform:translate(2px,0);animation:glitchA 5s steps(2) infinite}
.hero h1::after{color:#b47bff;transform:translate(-2px,0);animation:glitchB 6.4s steps(2) infinite}

@keyframes glitchA{
  0%,90%,100%{transform:translate(2px,0);clip-path:inset(0 0 0 0)}
  92%{transform:translate(-5px,-1px);clip-path:inset(12% 0 58% 0)}
  95%{transform:translate(4px,1px);clip-path:inset(58% 0 12% 0)}
}
@keyframes glitchB{
  0%,88%,100%{transform:translate(-2px,0);clip-path:inset(0 0 0 0)}
  91%{transform:translate(5px,1px);clip-path:inset(44% 0 26% 0)}
  94%{transform:translate(-4px,-1px);clip-path:inset(18% 0 52% 0)}
}

.hero-desc{
  margin:0;
  color:var(--dim);
  font-size:17px;
  line-height:1.7;
}

.hero-fig{margin:0;width:100%;max-width:740px}
.plate{
  position:relative;
  display:flex;
  min-height:180px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--r);
  background:
    linear-gradient(155deg,rgba(128,0,255,.42),rgba(13,13,13,.95) 62%),
    var(--ink2);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.1),0 0 26px -8px rgba(255,0,255,.5);
}
.plate::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px) 0 0/100% 24px,
    linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px) 0 0/24px 100%;
  mix-blend-mode:screen;
  pointer-events:none;
}
.plate::after{
  content:"";
  position:absolute;
  inset:10px;
  border:1px dashed rgba(255,0,255,.35);
  border-radius:12px;
  pointer-events:none;
}
.hero-img{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  min-height:180px;
  object-fit:cover;
}

/* 正文区 */
.board{
  display:grid;
  grid-template-columns:minmax(0,1fr) 268px;
  align-items:start;
  gap:34px;
  max-width:1140px;
  margin:38px auto 0;
  padding:0 var(--pad) 44px;
}

.prose{
  min-width:0;
  padding:26px 24px 30px;
  border:1px solid var(--line);
  border-bottom:3px solid var(--acc);
  border-radius:var(--r);
  background:var(--card);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 26px 50px -34px #000;
  overflow-wrap:break-word;
  word-break:break-word;
}

.prose > section{position:relative;padding-top:28px;margin-top:28px;border-top:1px dashed rgba(128,0,255,.3)}
.prose > section:first-child{padding-top:0;margin-top:0;border-top:0}

.prose h2,.prose h3{
  font-family:"Nunito",system-ui,sans-serif;
  font-weight:800;
  color:#fff;
  line-height:1.35;
  letter-spacing:.01em;
  text-shadow:0 0 14px rgba(128,0,255,.6);
}
.prose h2{
  margin:26px 0 6px;
  padding-left:13px;
  font-size:23px;
  border-left:3px solid var(--acc);
}
.prose h3{margin:22px 0 6px;font-size:19px;color:#f0dcff}
.prose h2 + hr,.prose h3 + hr{margin-top:10px}

.prose p{margin:0 0 1.05em}
.prose ul,.prose ol{margin:0 0 1.1em;padding-left:1.35em}
.prose ul{list-style:square}
.prose ol{list-style:decimal}
.prose li{margin:0 0 .45em}
.prose li::marker{color:var(--acc)}
.prose strong{color:#fff}
.prose a{text-decoration:underline;text-underline-offset:3px}
.prose a:hover{color:#fff;text-shadow:var(--glow)}
.prose blockquote{
  margin:0 0 1.1em;
  padding:12px 16px;
  border-left:3px solid var(--acc);
  border-radius:0 12px 12px 0;
  background:rgba(128,0,255,.16);
  color:#f3e9ff;
}
.prose img{border-radius:14px;border:1px solid var(--line);display:block;margin:0 0 1em}
.prose pre{
  margin:0 0 1.1em;
  padding:14px;
  overflow-x:auto;
  border:1px solid var(--line);
  border-radius:14px;
  background:#09090f;
  font-size:16px;
}
.prose code{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:16px}
.prose table{width:100%;border-collapse:collapse;margin:0 0 1.1em;font-size:16px}
.prose th,.prose td{border:1px solid var(--line);padding:8px 10px;text-align:left}
.prose th{background:rgba(128,0,255,.2);color:#fff}

section[id]{scroll-margin-top:112px}

/* 侧栏 */
.rail{
  position:sticky;
  top:112px;
  padding:18px 16px 20px;
  border:1px solid var(--line2);
  border-bottom:3px solid var(--pri);
  border-radius:var(--r);
  background:var(--card);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 20px 40px -30px #000;
}
.rail-title{
  margin:0;
  font-family:"Nunito",system-ui,sans-serif;
  font-size:16px;
  font-weight:800;
  letter-spacing:.14em;
  color:var(--acc);
  text-shadow:var(--glow);
}
.rail hr{margin:9px 0 14px;height:1px;background:linear-gradient(90deg,var(--acc),transparent)}

.rail-list{counter-reset:rail}
.rail-list li{counter-increment:rail}
.rail-list a{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:7px 8px;
  border-radius:11px;
  color:var(--dim);
  font-size:16px;
  transition:color .2s ease,background .2s ease;
}
.rail-list a::before{
  content:counter(rail,decimal-leading-zero);
  flex:0 0 auto;
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:16px;
  color:var(--pri);
  opacity:.9;
}
.rail-list a:hover{color:#fff;background:rgba(255,0,255,.16)}

/* 页脚 */
.hud-foot{
  display:grid;
  grid-template-columns:minmax(0,1.5fr) auto minmax(0,1fr);
  align-items:center;
  gap:16px;
  max-width:1140px;
  margin:0 auto;
  padding:26px var(--pad) 34px;
  border-top:1px solid var(--line2);
}

.f-brand{display:flex;flex-direction:column;gap:9px;min-width:0}
.f-logo{display:inline-flex;align-items:center;gap:9px;color:#fff}
.f-name{
  font-family:"Nunito",system-ui,sans-serif;
  font-weight:900;
  font-size:17px;
  letter-spacing:.04em;
  white-space:nowrap;
  text-shadow:0 0 10px rgba(255,0,255,.6);
}
.f-logo .mark,.f-logo .mark-glyph{width:26px;height:26px;border-radius:9px}

.f-form{display:flex;gap:8px;flex-wrap:wrap}
.f-form input{
  flex:1 1 128px;
  min-width:0;
  min-height:42px;
  padding:8px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#0a0a12;
  color:var(--txt);
  font:inherit;
  font-size:16px;
}
.f-form input::placeholder{color:#7d7390}
.f-form button{
  min-height:42px;
  padding:8px 18px;
  border:0;
  border-radius:12px;
  background:linear-gradient(90deg,var(--pri),var(--acc));
  color:#fff;
  font:inherit;
  font-weight:700;
  font-size:16px;
  cursor:pointer;
  box-shadow:0 0 16px -4px rgba(255,0,255,.8);
}
.f-form button:hover{filter:brightness(1.12)}

.f-copy{text-align:center;color:var(--dim);font-size:16px}
.f-copy p{margin:0}

.f-nav{display:flex;flex-wrap:wrap;gap:2px;justify-content:flex-end}
.f-nav a{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:8px 11px;
  border-radius:11px;
  color:var(--dim);
  font-size:16px;
}
.f-nav a:hover{color:#fff;background:rgba(128,0,255,.24)}

/* 回顶 */
.to-top{
  position:fixed;
  right:14px;
  bottom:16px;
  z-index:65;
  display:inline-flex;
  align-items:center;
  min-height:46px;
  padding:10px 17px;
  border:1px solid var(--acc);
  border-radius:999px;
  background:rgba(20,16,32,.92);
  color:var(--acc);
  font-size:16px;
  letter-spacing:.06em;
  backdrop-filter:blur(8px);
  opacity:0;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .25s ease,transform .25s ease;
}
.to-top.on{opacity:1;pointer-events:auto;transform:none}

/* 滚动显现 */
.reveal{opacity:0;transform:translateY(16px);transition:opacity .55s ease,transform .55s ease}
.reveal.in{opacity:1;transform:none}

@media (max-width:940px){
  .board{grid-template-columns:minmax(0,1fr);gap:24px}
  .rail{position:static;top:auto}
  .prose{padding:22px 18px 26px}
}

@media (max-width:760px){
  body{font-size:17px}
  .dock{display:none}
  .hud-bar{justify-content:space-between}
  .brand{position:absolute;left:50%;transform:translateX(-50%)}
  .brand-t{font-size:18px}
  .hud-menu summary{padding:8px 14px}
  .menu-list{min-width:200px}
  .hero{min-height:auto;padding:26px var(--pad) 30px;gap:16px}
  .hero-desc{font-size:16px}
  .hud-foot{grid-template-columns:minmax(0,1fr);gap:14px;text-align:center}
  .f-brand{align-items:center}
  .f-form{width:100%}
  .f-nav{justify-content:center}
  .f-copy{order:3}
  .to-top{right:12px;bottom:12px}
}

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

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