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

:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --bg: #06060d;
  --panel: rgba(26, 26, 46, 0.55);
  --line: rgba(255, 0, 110, 0.28);
  --line-soft: rgba(255, 0, 110, 0.14);
  --text: #ececf6;
  --dim: #a6a6c2;
  --mono: 'Space Grotesk', "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  isolation: isolate;
  font-family: var(--mono);
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text);
  background:
    radial-gradient(920px 520px at 10% -10%, rgba(255, 0, 110, 0.18), transparent 72%),
    radial-gradient(760px 460px at 92% 2%, rgba(255, 0, 0, 0.16), transparent 68%),
    linear-gradient(180deg, #05050b 0%, #0b0b18 44%, #05050b 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* CRT 扫描线 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.72;
  mix-blend-mode: screen;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 3px);
}

/* 像素网格 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255, 0, 110, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 0, 110, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 76%);
}

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

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

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

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem 1rem 0.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5, 5, 11, 0.96), rgba(5, 5, 11, 0.8));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.2rem 0.1rem;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 0 6px rgba(255, 0, 110, 0.85), 0 0 20px rgba(255, 0, 0, 0.55);
}

.brand::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-left: 0.5rem;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
  animation: blink 3.4s steps(1) infinite;
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 0, 110, 0.1);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.burger:hover { background: rgba(255, 0, 110, 0.22); }

.bars { display: grid; gap: 3px; }
.bars i {
  display: block;
  width: 17px;
  height: 2px;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

.menu p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.1rem;
  margin: 0;
}

.menu a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--dim);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.menu a:hover,
.menu a:focus-visible {
  color: #fff;
  border-color: var(--line);
  background: rgba(255, 0, 110, 0.14);
  text-shadow: 0 0 10px var(--pink);
}

body.menu-open { overflow: hidden; }

body.menu-open .menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-content: center;
  padding: 5rem 1.2rem 3rem;
  background:
    radial-gradient(600px 380px at 50% 10%, rgba(255, 0, 110, 0.22), transparent 70%),
    rgba(5, 5, 11, 0.975);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

body.menu-open .menu p {
  display: grid;
  gap: 0.5rem;
  justify-items: stretch;
  text-align: center;
}

body.menu-open .menu a {
  min-height: 54px;
  justify-content: center;
  font-size: 1.22rem;
  color: #fff;
  border-color: var(--line-soft);
  background: rgba(26, 26, 46, 0.5);
}

body.menu-open .menu a:hover {
  border-color: var(--pink);
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.35) inset;
}

/* ---------- 主体 ---------- */
main {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

main div[id] { scroll-margin-top: 136px; }

.hero {
  position: relative;
  display: grid;
  place-content: center;
  gap: 0.8rem;
  min-height: 45vh;
  padding: 2.6rem 0.5rem 3.4rem;
  text-align: center;
  isolation: isolate;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 7.4vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  font-weight: 700;
  color: #fff;
  text-shadow:
    0 0 12px rgba(255, 0, 0, 0.75),
    0 0 38px rgba(255, 0, 110, 0.5),
    0 2px 0 rgba(255, 0, 110, 0.35);
  animation: jitter 7s ease-in-out infinite;
}

.lede {
  max-width: 48ch;
  margin: 0 auto;
  color: var(--dim);
  font-size: 1rem;
  line-height: 1.8;
}

.band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12px;
  transform: skewY(-1.6deg);
  transform-origin: left bottom;
  background: linear-gradient(90deg, var(--red), var(--pink) 48%, rgba(255, 0, 110, 0) 96%);
  background-size: 220% 100%;
  box-shadow: 0 0 22px rgba(255, 0, 110, 0.6);
  animation: sweep 11s linear infinite;
}

.split {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-top: 1.4rem;
}

.rail {
  position: sticky;
  top: 136px;
  padding: 1.1rem 0.95rem 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.rail small,
.prose small {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--pink);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  line-height: 1.5;
  text-shadow: 0 0 9px rgba(255, 0, 110, 0.7);
}

.rail h2 {
  margin: 0 0 0.7rem;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
}

.rail ul {
  display: grid;
  gap: 0.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-soft);
  padding-top: 0.55rem;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
  color: var(--dim);
  font-size: 0.92rem;
  text-decoration: none;
  border-left: 2px solid transparent;
}

.rail a:hover,
.rail a:focus-visible {
  color: #fff;
  border-left-color: var(--red);
  background: rgba(255, 0, 110, 0.1);
}

.prose {
  min-width: 0;
  max-width: 780px;
}

.prose div {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.35rem 1.7rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  overflow: hidden;
}

.prose div::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--red), var(--pink), rgba(255, 0, 110, 0));
  box-shadow: 0 0 14px rgba(255, 0, 110, 0.6);
}

.prose div + div { margin-top: 0; }

.prose h2 {
  margin: 0.1rem 0 0.85rem;
  font-size: clamp(1.32rem, 3.1vw, 1.85rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.55);
}

.prose h3 {
  margin: 1.3rem 0 0.55rem;
  font-size: 1.16rem;
  color: #fff;
  letter-spacing: 0.01em;
}

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

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

.prose li { margin-bottom: 0.4rem; }

.prose a {
  color: var(--pink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.5);
}

.prose strong { color: #fff; }

.prose blockquote {
  margin: 0 0 1rem;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--red);
  background: rgba(255, 0, 0, 0.07);
  color: var(--dim);
}

.prose figure { margin: 0 0 1rem; }

.prose figcaption {
  margin-top: 0.4rem;
  font-size: 0.86rem;
  color: var(--dim);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line-soft);
  text-align: left;
}

.prose th { background: rgba(255, 0, 110, 0.12); color: #fff; }

.prose code {
  padding: 0.1rem 0.34rem;
  border-radius: 4px;
  background: rgba(255, 0, 110, 0.16);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem 1.8rem;
  margin-top: 3rem;
  padding: 2.4rem 1.2rem 2rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.25), rgba(5, 5, 11, 0.9));
}

.foot p { margin: 0; }

.fbrand strong {
  display: block;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 0, 110, 0.6);
}

.fnav { display: flex; flex-direction: column; }

.foot a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--dim);
  font-size: 0.92rem;
  text-decoration: none;
}

.foot a:hover,
.foot a:focus-visible { color: #fff; text-shadow: 0 0 10px var(--pink); }

.fsub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.fsub label {
  width: 100%;
  min-height: 24px;
  color: var(--pink);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
}

.fsub input {
  flex: 1 1 120px;
  min-width: 0;
  min-height: 42px;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 5, 11, 0.75);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}

.fsub input::placeholder { color: #71718f; }

.subbtn {
  min-height: 42px;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--pink);
  border-radius: 8px;
  background: rgba(255, 0, 110, 0.16);
  color: #fff;
  font: inherit;
  font-size: 0.94rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.subbtn:hover { background: rgba(255, 0, 110, 0.34); }

.fcopy {
  grid-column: 1 / 3;
  align-self: center;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
  color: #7d7d9b;
  font-size: 0.82rem;
  line-height: 1.6;
}

.fend {
  grid-column: 3 / 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.2rem 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- 动效 ---------- */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.rv.in {
  opacity: 1;
  transform: none;
}

@keyframes blink {
  0%, 92%, 100% { opacity: 1; }
  94%, 98% { opacity: 0.25; }
}

@keyframes jitter {
  0%, 88%, 100% { transform: none; text-shadow: 0 0 12px rgba(255, 0, 0, 0.75), 0 0 38px rgba(255, 0, 110, 0.5); }
  90% { transform: translate(-2px, 1px) skewX(-1.4deg); text-shadow: 3px 0 0 rgba(255, 0, 110, 0.8), -3px 0 0 rgba(0, 255, 255, 0.35); }
  93% { transform: translate(2px, -1px) skewX(1.2deg); text-shadow: -3px 0 0 rgba(255, 0, 0, 0.8), 3px 0 0 rgba(255, 0, 110, 0.5); }
  96% { transform: none; }
}

@keyframes sweep {
  from { background-position: 0% 50%; }
  to { background-position: 200% 50%; }
}

/* ---------- 断点 ---------- */
@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.2rem;
  }

  .rail {
    position: static;
  }

  .rail ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
  }

  .fcopy,
  .fend {
    grid-column: 1 / -1;
  }

  .fend { justify-content: flex-start; }
}

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }

  main { padding: 0 0.85rem 0.5rem; }

  .hero { min-height: 42vh; padding: 2rem 0 2.8rem; }

  .prose div { padding: 1.2rem 1rem 1.35rem; }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.8rem 1rem 1.6rem;
  }

  .fnav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 1rem;
  }
}

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

  .rv { opacity: 1; transform: none; transition: none; }

  .hero h1,
  .band,
  .brand::after { animation: none; }
}

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