@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --ink: #1c1726;
  --ink-2: #241b33;
  --ink-3: #150f1f;
  --violet: #6514ff;
  --magenta: #bf00ff;
  --cream: #f7f0ff;
  --mint: #00f5c8;
  --sun: #ffe66a;
  --line: rgba(247, 240, 255, 0.2);
  --shadow-hard: 7px 7px 0 rgba(0, 0, 0, 0.62);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: clip;
  background: var(--ink);
  color: var(--cream);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: -60px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  background-image:
    radial-gradient(rgba(191, 0, 255, 0.28) 1.4px, transparent 1.4px),
    linear-gradient(90deg, rgba(101, 20, 255, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(101, 20, 255, 0.13) 1px, transparent 1px);
  background-size: 26px 26px, 104px 104px, 104px 104px;
  animation: drift 20s linear infinite;
}

@keyframes drift {
  to { background-position: 26px 52px, 104px 0, 0 104px; }
}

a { color: inherit; }

img { max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 3px;
}

/* 顶部品牌栏 */
.masthead {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 14px clamp(14px, 4vw, 40px);
  background: rgba(20, 14, 30, 0.94);
  border-bottom: 3px solid var(--violet);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  background: linear-gradient(135deg, var(--violet), var(--magenta));
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.7);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 40%, 40% 40%, 40% 100%, 0 100%);
}

.search {
  display: flex;
  gap: 8px;
  flex: 1 1 250px;
  justify-content: flex-end;
}

.search input {
  width: 100%;
  max-width: 270px;
  min-height: 44px;
  padding: 9px 14px;
  color: var(--cream);
  background: #100a19;
  border: 2px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
}

.search input::placeholder { color: #a899bd; }

.search-btn {
  min-height: 44px;
  padding: 8px 20px;
  border: 2px solid var(--violet);
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, transform 0.22s;
}

.search-btn:hover {
  background: var(--sun);
  color: var(--ink);
  border-color: var(--sun);
  transform: translateY(-2px);
}

/* 二级粘性锚点条 */
.nav-band {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(17, 12, 25, 0.97);
  border-bottom: 2px solid var(--violet);
  backdrop-filter: blur(6px);
}

.nav-band nav {
  overflow-x: auto;
  scrollbar-width: thin;
}

.pillbar {
  display: flex;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 10px clamp(12px, 3vw, 32px);
  list-style: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #221a30;
  color: var(--cream);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.22s;
}

.pill:hover,
.pill:focus-visible {
  background: var(--magenta);
  border-color: var(--magenta);
  color: var(--ink);
  transform: translateY(-2px);
}

.pill[aria-current="true"] {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

/* 主体两栏 */
.shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: clamp(30px, 5vw, 64px);
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 40px) 64px;
}

main { min-width: 0; }

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: calc(100vh - 150px);
  padding: 48px 0 56px;
}

.hero-copy > * {
  animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-copy > *:nth-child(2) { animation-delay: 0.08s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.16s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.24s; }

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

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 6px solid var(--magenta);
  color: var(--sun);
  font-family: "VT323", "Courier New", monospace;
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: 0.16em;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(30px, 8vw, 56px);
  line-height: 1.26;
  font-weight: 900;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  text-shadow: 4px 4px 0 rgba(101, 20, 255, 0.85);
}

.hero-desc {
  max-width: 52ch;
  margin: 0 0 28px;
  color: #e4d9f6;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 26px;
  border: 2px solid var(--violet);
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.7);
  transition: background 0.22s, border-color 0.22s, transform 0.22s, box-shadow 0.22s;
}

.cta:hover,
.cta:focus-visible {
  background: var(--magenta);
  border-color: var(--magenta);
  transform: translate(-2px, -2px);
  box-shadow: 9px 9px 0 rgba(0, 0, 0, 0.7);
}

.cta.ghost {
  background: transparent;
  border-color: var(--cream);
  color: var(--cream);
  box-shadow: 5px 5px 0 rgba(101, 20, 255, 0.45);
}

.cta.ghost:hover,
.cta.ghost:focus-visible {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.hero-art {
  position: relative;
  margin: 0;
  min-height: clamp(290px, 46vh, 480px);
  overflow: hidden;
  border: 3px solid var(--cream);
  background: linear-gradient(155deg, #33205a, #170f23 70%);
  box-shadow: 12px 12px 0 var(--violet), 0 26px 50px rgba(0, 0, 0, 0.45);
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(247, 240, 255, 0.28) 1.6px, transparent 1.6px);
  background-size: 18px 18px;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.hero-art .blk {
  position: absolute;
  display: block;
  width: 36%;
  aspect-ratio: 1;
  mix-blend-mode: screen;
  animation: bob 6s ease-in-out infinite alternate;
}

.hero-art .b1 {
  top: 6%;
  left: 6%;
  background: var(--magenta);
}

.hero-art .b2 {
  right: 8%;
  bottom: 9%;
  background: var(--violet);
  animation-delay: 1.2s;
}

.hero-art .b3 {
  right: 12%;
  top: 12%;
  width: 16%;
  background: var(--mint);
  animation-delay: 2s;
}

@keyframes bob {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to { transform: translate3d(6px, -10px, 0) rotate(3deg); }
}

/* 正文（page.content 原样插入） */
main > section:not(.hero) {
  padding: 44px 0 10px;
  border-top: 2px dashed var(--line);
  scroll-margin-top: 96px;
}

main h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1.32;
  font-weight: 900;
  color: #fff;
  overflow-wrap: anywhere;
}

main h2::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  background: var(--magenta);
  vertical-align: 0.1em;
}

main h2 + hr {
  width: 100%;
  margin: 14px 0 22px;
  border: 0;
  border-top: 3px solid var(--violet);
}

main h3 {
  margin: 28px 0 10px;
  color: var(--sun);
  font-size: 21px;
  line-height: 1.45;
}

main p,
main li {
  color: #eae2f7;
  line-height: 1.85;
}

main p { margin: 0 0 18px; }

main ul,
main ol {
  margin: 0 0 20px;
  padding-left: 1.35em;
}

main li { margin-bottom: 8px; }

main a {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

main a:hover { color: var(--sun); }

main img {
  height: auto;
  border: 2px solid var(--line);
}

main blockquote {
  margin: 24px 0;
  padding: 14px 20px;
  border-left: 6px solid var(--magenta);
  background: var(--ink-2);
}

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

main th,
main td {
  padding: 9px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

main pre {
  overflow-x: auto;
  padding: 14px;
  background: #100a19;
  border: 2px solid var(--line);
}

/* 右侧栏 */
.side-rail {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 20px;
  padding-top: 48px;
}

.rail-card {
  padding: 16px;
  background: var(--ink-2);
  border: 2px solid var(--violet);
  border-radius: 0;
  box-shadow: var(--shadow-hard), 0 22px 44px rgba(101, 20, 255, 0.18);
}

.rail-card h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.1em;
}

.rail-card hr {
  width: 56px;
  margin: 10px 0 8px;
  border: 0;
  border-top: 2px solid var(--magenta);
}

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

.rail-list li {
  animation: rise 0.4s ease both;
}

.rail-list li:nth-child(2) { animation-delay: 0.05s; }
.rail-list li:nth-child(3) { animation-delay: 0.1s; }
.rail-list li:nth-child(4) { animation-delay: 0.15s; }
.rail-list li:nth-child(5) { animation-delay: 0.2s; }
.rail-list li:nth-child(6) { animation-delay: 0.25s; }
.rail-list li:nth-child(7) { animation-delay: 0.3s; }

.rail-list li + li { border-top: 1px dashed var(--line); }

.rail-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--cream);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s, transform 0.2s;
}

.rail-list a::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  background: var(--magenta);
}

.rail-list a:hover,
.rail-list a:focus-visible {
  color: var(--sun);
  transform: translateX(3px);
}

/* 页脚 */
.site-foot {
  position: relative;
  z-index: 1;
  margin-top: 40px;
  padding: clamp(32px, 5vw, 56px) clamp(14px, 4vw, 40px) 22px;
  background: var(--ink-3);
  border-top: 4px solid var(--violet);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  max-width: 1240px;
  margin: 0 auto;
}

.site-foot address {
  font-style: normal;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.5;
}

.site-foot address span {
  display: block;
  margin-top: 4px;
  color: var(--sun);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.6;
}

.foot-links h2,
.sub-form h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.1em;
}

.site-foot hr {
  width: 56px;
  margin: 10px 0 14px;
  border: 0;
  border-top: 2px solid var(--magenta);
}

.foot-links ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--cream);
  font-size: 16px;
  text-decoration: none;
  transition: color 0.2s;
}

.foot-links a:hover,
.foot-links a:focus-visible { color: var(--mint); }

.sub-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  max-width: 1240px;
  margin: 30px auto 0;
  padding: 14px 16px;
  border: 2px solid var(--line);
}

.sub-form h2 { width: 100%; }

.sub-form hr {
  width: 56px;
  margin: 0;
}

.sub-form input {
  flex: 1 1 200px;
  min-height: 46px;
  min-width: 0;
  padding: 10px 14px;
  color: var(--cream);
  background: #0e0917;
  border: 2px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
}

.sub-form input::placeholder { color: #a899bd; }

.sub-form button {
  min-height: 46px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--magenta);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.sub-form button:hover {
  background: var(--sun);
  transform: translateY(-2px);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  max-width: 1240px;
  margin: 28px auto 0;
  padding-top: 14px;
  border-top: 2px solid #2d2340;
  font-size: 16px;
}

.foot-bottom ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--cream);
  text-decoration: none;
}

.foot-bottom a:hover,
.foot-bottom a:focus-visible { color: var(--mint); }

/* 窄屏 */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    padding-bottom: 48px;
  }

  .side-rail {
    position: static;
    padding-top: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 34px 0 44px;
  }

  .hero-art { min-height: 260px; }

  .foot-grid { grid-template-columns: 1fr; }

  .search { justify-content: stretch; }

  .search input { max-width: none; }
}

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

  .masthead { padding: 12px 14px; }

  .shell { padding: 0 14px 40px; }

  .hero-actions .cta { flex: 1 1 140px; }

  .hero-desc { font-size: 17px; }

  .foot-links ul { grid-template-columns: 1fr; }

  .sub-form { flex-direction: column; align-items: stretch; }

  .sub-form button { width: 100%; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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