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

:root {
  --violet: #6514ff;
  --magenta: #bf00ff;
  --ink: #1c1726;
  --bg: #0d0914;
  --txt: #f4eefe;
  --dim: #b9a9da;
  --line: rgba(191, 0, 255, .26);
  --line-2: rgba(255, 255, 255, .14);
  --glass: rgba(255, 255, 255, .055);
  --r: 28px;
  --dock: 250px;
}

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

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

body {
  margin: 0;
  padding-left: var(--dock);
  min-height: 100vh;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--txt);
  background:
    radial-gradient(circle at 10% -6%, rgba(101, 20, 255, .58), transparent 55%),
    radial-gradient(circle at 92% 2%, rgba(191, 0, 255, .48), transparent 46%),
    radial-gradient(circle at 46% 104%, rgba(101, 20, 255, .32), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: -40px;
  z-index: 0;
  pointer-events: none;
  opacity: .48;
  background-image: radial-gradient(rgba(191, 0, 255, .38) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  animation: dots 26s linear infinite;
}

@keyframes dots {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(26px, 26px, 0); }
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: 'Fredoka', 'Nunito', system-ui, sans-serif;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0;
}
p { margin: 0; }
header, main, footer { position: relative; z-index: 1; }

/* ---------- 左侧固定竖排导航 ---------- */
.nav-dock {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--dock);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 26px 16px 28px;
  background: linear-gradient(180deg, rgba(101, 20, 255, .32), rgba(20, 15, 30, .88) 46%, rgba(191, 0, 255, .18));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  flex: none;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .22), 0 16px 34px rgba(101, 20, 255, .48);
  transition: transform .25s ease, box-shadow .25s ease;
}
.brand:hover { transform: rotate(-7deg) scale(1.06); box-shadow: 0 0 0 1px #fff, 0 18px 40px rgba(191, 0, 255, .6); }
.brand-img { width: 44px; height: 44px; object-fit: contain; border-radius: 12px; }
.brand-svg { width: 24px; height: 24px; fill: #fff; }

.nav-dock nav { flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; margin-top: 4px; }
.nav-dock nav p { display: flex; flex-direction: column; gap: 6px; margin: 0; }

.dock-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: 15px;
  color: var(--dim);
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.dock-link svg { width: 15px; height: 15px; flex: none; fill: currentColor; opacity: .8; }
.dock-link:hover, .dock-link:focus-visible {
  color: #fff;
  background: linear-gradient(90deg, rgba(101, 20, 255, .55), rgba(191, 0, 255, .28));
  transform: translateX(4px);
}
.dock-link:hover svg { opacity: 1; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 92px 48px 72px;
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 56px;
  align-items: center;
}

.hero-copy { max-width: 620px; }

.hero h1 {
  font-size: clamp(40px, 6.2vw, 78px);
  font-weight: 700;
  word-break: break-word;
  background: linear-gradient(102deg, #ffffff 12%, #e3d2ff 46%, var(--magenta) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}

.hero-sub {
  margin-top: 22px;
  font-size: 18px;
  color: var(--dim);
  max-width: 46ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--violet), var(--magenta));
  box-shadow: 0 16px 34px rgba(101, 20, 255, .46);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}
.btn:hover { transform: translateY(-3px) scale(1.02); filter: brightness(1.12); box-shadow: 0 20px 44px rgba(191, 0, 255, .55); }
.btn-ghost {
  background: rgba(255, 255, 255, .06);
  color: var(--txt);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px #fff; }

.hero-art {
  position: relative;
  min-height: 460px;
  height: 62vh;
  max-height: 620px;
}

.tile {
  position: absolute;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: linear-gradient(140deg, rgba(101, 20, 255, .9), rgba(191, 0, 255, .45));
  box-shadow: 0 34px 70px rgba(0, 0, 0, .55);
  will-change: transform;
}
.tile .shot { width: 100%; height: 100%; object-fit: cover; }
.tile-a { top: 0; left: 0; width: 64%; height: 64%; transform: rotate(-4deg); }
.tile-b { bottom: 0; right: 0; width: 60%; height: 58%; transform: rotate(5deg); border-color: rgba(191, 0, 255, .55); }

.spark {
  position: absolute;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff, var(--magenta));
  box-shadow: 0 0 24px rgba(191, 0, 255, .8);
  animation: bob 5.5s ease-in-out infinite;
}
.spark-a { width: 22px; height: 22px; top: 12%; right: 12%; }
.spark-b { width: 14px; height: 14px; bottom: 16%; left: 12%; animation-delay: 1.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-16px) rotate(18deg); }
}

/* ---------- 正文 + 右侧栏 ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 48px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 48px;
  align-items: start;
}

.content { min-width: 0; }
.prose { min-width: 0; }

.prose-title {
  font-size: clamp(30px, 3.6vw, 42px);
  font-weight: 700;
  background: linear-gradient(100deg, #ffffff, #d8c2ff 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin-top: 12px;
  font-size: 17px;
  color: var(--dim);
}

.prose section {
  margin-top: 40px;
  padding: 34px 32px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .28);
  transition: transform .26s ease, border-color .26s ease, box-shadow .26s ease;
}
.prose section:hover {
  transform: translateY(-4px);
  border-color: rgba(191, 0, 255, .6);
  box-shadow: 0 28px 60px rgba(101, 20, 255, .32);
}
.prose section[id] { scroll-margin-top: 96px; }

.prose h2 {
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 600;
  color: #fff;
}
.prose h2 + p { margin-top: 14px; }
.prose h3 { margin-top: 26px; font-size: 21px; color: #ecdfff; }

.prose p { margin-top: 16px; color: #e7ddf7; }
.prose p:first-of-type { margin-top: 0; }
.prose strong { color: #fff; }
.prose ul, .prose ol { margin: 16px 0 0; padding-left: 22px; color: #e7ddf7; }
.prose li { margin-top: 8px; }
.prose li::marker { color: var(--magenta); }
.prose a { color: #d8bcff; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #fff; }
.prose blockquote {
  margin: 22px 0 0;
  padding: 16px 22px;
  border-left: 3px solid var(--magenta);
  border-radius: 0 18px 18px 0;
  background: rgba(191, 0, 255, .1);
  color: #eee4ff;
}
.prose img { border-radius: 20px; margin-top: 18px; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 16px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { color: #fff; }
.prose time { display: inline-block; font-size: 16px; color: #c6b2ea; letter-spacing: .02em; }
.prose code { font-size: 16px; }

/* ---------- 侧栏 ---------- */
.rail {
  position: sticky;
  top: 40px;
  padding: 28px 24px;
  border-radius: var(--r);
  border: 1px solid var(--line-2);
  background: linear-gradient(165deg, rgba(101, 20, 255, .28), rgba(255, 255, 255, .05));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 54px rgba(0, 0, 0, .35);
}
.rail-title { font-size: 24px; font-weight: 600; color: #fff; }
.rail .subtitle { margin-top: 8px; font-size: 16px; }

.rail-links { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
.rail-link {
  display: block;
  padding: 10px 12px;
  min-height: 42px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--dim);
  text-decoration: none;
  background: rgba(255, 255, 255, .04);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.rail-link:hover { color: #fff; background: rgba(191, 0, 255, .26); transform: translateX(4px); }

.rail-form { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.rail-input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  color: var(--txt);
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: rgba(13, 9, 20, .6);
}
.rail-input::placeholder { color: #9c8cbd; }
.rail-input:focus { outline: 2px solid var(--magenta); outline-offset: 2px; }
.rail-btn {
  min-height: 46px;
  padding: 12px 18px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--violet), var(--magenta));
  transition: filter .2s ease, transform .2s ease;
}
.rail-btn:hover { filter: brightness(1.14); transform: translateY(-2px); }

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 48px 64px;
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 28px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.foot p { font-size: 16px; }
.foot-brand {
  font-family: 'Fredoka', 'Nunito', sans-serif;
  font-size: 21px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .01em;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-links a {
  display: inline-block;
  padding: 10px 0;
  min-height: 42px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  transition: color .2s ease;
}
.foot-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.foot-note { display: block; text-align: center; font-size: 16px; color: #a291c4; }

/* ---------- 断点 ---------- */
@media (max-width: 1080px) {
  body { padding-left: 0; }

  .nav-dock {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { width: 42px; height: 42px; border-radius: 14px; }
  .brand-img, .brand-svg { width: 22px; height: 22px; }
  .brand-img { width: 38px; height: 38px; }
  .nav-dock nav { margin-top: 0; overflow-x: auto; overflow-y: hidden; }
  .nav-dock nav p { flex-direction: row; gap: 8px; align-items: center; }
  .dock-link { white-space: nowrap; padding: 11px 14px; }
  .dock-link:hover { transform: none; }

  .hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding: 48px 24px 56px; }
  .hero-art { height: 340px; min-height: 0; max-height: none; }
  .hero-sub { font-size: 17px; }

  .wrap { grid-template-columns: minmax(0, 1fr); padding: 32px 24px 64px; gap: 40px; }
  .rail { position: static; order: 2; }
  .prose section { padding: 26px 22px; }
  .prose section[id] { scroll-margin-top: 120px; }

  .foot { grid-template-columns: 1fr; gap: 10px; padding: 36px 24px 56px; text-align: center; }
  .foot-links { justify-content: center; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: clamp(34px, 10vw, 46px); }
  .hero-cta { gap: 10px; }
  .btn { flex: 1 1 auto; padding: 13px 18px; }
  .hero-art { height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before, .spark { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

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