:root {
  --ink: #1a1a2e;
  --ink-2: #12121f;
  --ink-3: #0d0d16;
  --red: #ff0000;
  --rose: #ff006e;
  --cyan: #00e5ff;
  --paper: #f4eefb;
  --dim: #b7a9c8;
  --line: rgba(255, 0, 110, 0.28);
  --r: 18px;
  --maxw: 1180px;
}

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

html {
  background: var(--ink-2);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--paper);
  font-family: 'Lexend', 'Source Sans 3', system-ui, -apple-system, 'Noto Sans SC', sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.78;
  letter-spacing: 0.012em;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 6%, rgba(255, 0, 110, 0.18), transparent 46%),
    radial-gradient(circle at 86% 84%, rgba(255, 0, 0, 0.15), transparent 48%),
    linear-gradient(180deg, #1a1a2e, #12121f 62%, #0d0d16);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  mix-blend-mode: screen;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 3px
  );
  animation: scan 9s linear infinite;
}

@keyframes scan {
  to {
    background-position: 0 303px;
  }
}

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

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

.skip {
  position: absolute;
  top: -70px;
  left: 16px;
  z-index: 99;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  transition: top 0.2s;
}

.skip:focus {
  top: 10px;
}

/* 顶栏 */
.masthead {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.96), rgba(18, 18, 31, 0.7));
}

.headbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
}

.head-side {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.m-left {
  grid-column: 1;
  justify-self: start;
}

.m-right {
  grid-column: 3;
  justify-self: end;
  gap: 8px;
}

.menu-a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--paper);
  font-size: 0.93rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.menu-a:hover,
.menu-a:focus-visible {
  color: #fff;
  border-color: var(--rose);
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.45);
  text-shadow: 0 0 10px var(--rose);
}

.brand {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  color: var(--paper);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.7);
}

.brand:hover {
  animation: glitch 0.4s steps(2, end) 1;
}

@keyframes glitch {
  0%,
  100% {
    transform: translate(0, 0);
  }
  20% {
    transform: translate(-1px, 1px);
  }
  40% {
    transform: translate(2px, -1px);
  }
  60% {
    transform: translate(-1px, 0);
  }
  80% {
    transform: translate(1px, 1px);
  }
}

.brand-mark {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--rose));
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.6);
  object-fit: cover;
}

/* 搜索 */
.search {
  display: flex;
  align-items: center;
  padding: 3px 3px 3px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  border-color: var(--rose);
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.45);
}

.search-in {
  width: 104px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.search-in::placeholder {
  color: rgba(244, 238, 251, 0.5);
}

.search-btn {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: var(--rose);
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.search-btn:hover {
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.7);
}

/* 汉堡 */
.burger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.burger:hover {
  border-color: var(--rose);
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.45);
}

.burger-lines {
  display: grid;
  gap: 3px;
}

.burger-lines i {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  box-shadow: 0 0 8px var(--rose);
}

/* 全屏遮罩菜单 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 80;
  padding: 22px 20px 56px;
  overflow-y: auto;
  background: rgba(13, 13, 22, 0.975);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

body.menu-open .veil {
  opacity: 1;
  visibility: visible;
  transform: none;
}

body.menu-open {
  overflow: hidden;
}

.veil-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.veil-brand {
  font-weight: 600;
  letter-spacing: 0.18em;
  text-shadow: 0 0 16px rgba(255, 0, 110, 0.8);
}

.veil-close {
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--rose);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.veil-close:hover {
  background: var(--rose);
  color: #fff;
}

.veil-nav {
  display: grid;
  gap: 6px;
  max-width: 720px;
  margin: 0 auto 26px;
}

.veil-a {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--paper);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.veil-a:hover {
  border-color: var(--rose);
  background: rgba(255, 0, 110, 0.12);
  box-shadow: inset 3px 0 0 var(--rose), 0 0 22px rgba(255, 0, 110, 0.28);
}

.search-veil {
  max-width: 720px;
  margin: 0 auto;
}

.search-veil .search-in {
  flex: 1;
  width: auto;
}

/* 粘性锚点条 */
.anchorbar {
  position: sticky;
  top: 0;
  z-index: 25;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 18, 31, 0.9);
  backdrop-filter: blur(10px);
}

.anchor-nav {
  display: flex;
  gap: 4px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 7px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-nav::-webkit-scrollbar {
  display: none;
}

.anchor-nav .menu-a {
  min-height: 42px;
  font-size: 0.87rem;
  white-space: nowrap;
}

/* 首屏 */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 128px);
  padding: 44px 20px 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: center;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.hero-grid:not(.has-fig) {
  grid-template-columns: minmax(0, 1fr);
  max-width: 820px;
}

.hero-fig {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 0, 110, 0.22);
}

.hero-fig img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-fig::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 0, 0, 0.2), transparent 62%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.26) 0 2px, transparent 2px 4px);
  mix-blend-mode: screen;
}

.hero-copy {
  min-width: 0;
}

.hero-h1 {
  margin: 0 0 28px;
  font-size: clamp(1.9rem, 5.1vw, 3.8rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.012em;
  text-shadow: 0 0 22px rgba(255, 0, 110, 0.55), 0 0 64px rgba(255, 0, 0, 0.35);
}

.hero-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}

.btn-hot {
  background: linear-gradient(100deg, var(--red), var(--rose));
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 0, 110, 0.5);
}

.btn-hot:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(255, 0, 110, 0.8);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--rose);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 0, 110, 0.4);
}

/* 主区 */
.main {
  padding: 52px 0 76px;
}

.wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 40px;
  align-items: start;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.stage {
  min-width: 0;
}

.prose {
  min-width: 0;
}

.prose > div {
  position: relative;
  margin: 0 0 26px;
  padding: 28px 26px 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.048), rgba(255, 255, 255, 0.014));
  scroll-margin-top: 96px;
  animation: rise 0.6s ease both;
}

.prose > div:nth-child(2n) {
  animation-delay: 0.07s;
}

.prose > div:nth-child(2n + 1) {
  animation-delay: 0.02s;
}

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

.prose > div::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--rose) 40%, transparent);
}

.prose h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: clamp(1.32rem, 2.5vw, 1.82rem);
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: 0.012em;
}

.prose h2::before {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--rose);
  box-shadow: 0 0 14px var(--rose);
  transform: rotate(45deg);
}

.prose h3 {
  margin: 26px 0 8px;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffd9e7;
}

.prose hr {
  height: 2px;
  margin: 10px 0 20px;
  border: 0;
  background: linear-gradient(90deg, var(--rose), rgba(255, 0, 110, 0.14) 62%, transparent);
}

.prose p {
  margin: 0 0 16px;
  color: #e6dcef;
}

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

.prose a {
  color: #ff8ab5;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 110, 0.5);
}

.prose a:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--rose);
}

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

.prose li {
  margin-bottom: 8px;
  color: #e6dcef;
}

.prose li::marker {
  color: var(--rose);
}

.prose strong {
  font-weight: 600;
  color: #fff;
}

.prose blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--rose);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 0, 110, 0.09);
  color: #f0e4f8;
}

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

.prose code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 229, 255, 0.12);
  color: #9ff0ff;
  font-size: 0.92em;
}

/* 侧栏 */
.rail {
  position: sticky;
  top: 74px;
  padding: 22px 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 0, 110, 0.1), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 46px rgba(255, 0, 110, 0.12), 0 18px 42px rgba(0, 0, 0, 0.4);
}

.rail-h {
  margin: 0;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.7);
}

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

.rail-nav ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-nav a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 40px;
  padding: 8px 7px;
  border-radius: 8px;
  color: var(--dim);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.16s, background 0.16s, box-shadow 0.16s;
}

.rail-nav a:hover {
  color: #fff;
  background: rgba(255, 0, 110, 0.15);
  box-shadow: inset 2px 0 0 var(--rose);
}

.rail-n {
  flex: none;
  color: var(--rose);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
}

/* 页脚 */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 34px;
  padding: 26px clamp(20px, 5vw, 64px) 30px;
  border-top: 1px solid var(--line);
  background: rgba(13, 13, 22, 0.92);
}

.foot-brand {
  flex: none;
}

.foot-home {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.6);
}

.foot-nav {
  flex: 1 1 400px;
  min-width: 0;
}

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  margin: 0;
}

.foot-nav dt {
  color: var(--rose);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.foot-nav dd {
  margin: 0;
}

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.16s, text-shadow 0.16s;
}

.foot-nav a:hover {
  color: #fff;
  text-shadow: 0 0 12px var(--rose);
}

.foot-copy {
  flex: none;
}

.foot-copy p {
  margin: 0;
  color: var(--dim);
  font-size: 0.86rem;
  letter-spacing: 0.06em;
}

/* 断点 */
@media (max-width: 980px) {
  .head-side.m-left {
    display: none;
  }

  .m-right .m-right {
    display: none;
  }

  .headbar {
    grid-template-columns: 1fr auto 1fr;
  }

  .brand {
    grid-column: 2;
    justify-self: center;
  }

  .m-right {
    grid-column: 3;
    justify-self: end;
  }

  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

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

  .hero {
    min-height: 0;
    padding: 28px 20px 44px;
  }

  .hero-grid,
  .hero-grid:not(.has-fig) {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .hero-fig {
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .foot-nav {
    flex: 1 1 auto;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .prose > div {
    padding: 22px 18px 28px;
    border-radius: 14px;
  }

  .main {
    padding: 36px 0 56px;
  }

  .search-top {
    display: none;
  }

  .brand-t {
    font-size: 0.95rem;
    letter-spacing: 0.1em;
  }

  .hero-h1 {
    font-size: clamp(1.75rem, 8.4vw, 2.5rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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