@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Orbitron:wght@700;900&display=swap');

:root {
  --neon: #8000ff;
  --mag: #ff00ff;
  --ink: #0d0d0d;
  --ink-2: #0a0910;
  --ink-3: #120e1c;
  --line: rgba(128, 0, 255, 0.34);
  --line-soft: rgba(128, 0, 255, 0.18);
  --txt: #e9e4f5;
  --dim: #a79dc4;
  --r: 18px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  --disp: "Orbitron", "JetBrains Mono", ui-monospace, "PingFang SC", "Microsoft YaHei", sans-serif;
  --pad: clamp(16px, 5vw, 84px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 16.5px;
  line-height: 1.75;
  overflow-x: hidden;
  max-width: 100%;
}

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

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 69;
  background: radial-gradient(120% 90% at 50% 0%, rgba(128, 0, 255, 0.16), transparent 62%);
}

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

a { color: var(--mag); text-decoration: none; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.25; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.25em; }

/* ---------- 防横向溢出兜底 ---------- */
main, .hero, .stream, .stream-grid, .stream-head, .prose, .rail, .panel,
.hud, .hud-menuline, .hud-nav, .hud-nav ul, .foot, .foot section,
.hero-copy, .hero-frame { min-width: 0; }

.hero, .stream, .prose, .rail, .hud, .foot { overflow-x: clip; }

.hero-copy > *, .prose > *, .prose section > *, .foot section > * { max-width: 100%; }

.prose img, .prose svg, .prose video, .prose iframe,
.prose embed, .prose object, .prose table, .prose pre {
  max-width: 100%;
  box-sizing: border-box;
}

.prose iframe, .prose video, .prose embed, .prose object {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}

.hero h1, .eyebrow, .lede, .panel p, .panel-title, .rail-list a, .foot dd a, .foot p,
.prose p, .prose li, .prose h2, .prose h3, .prose h4, .prose blockquote,
.prose td, .prose th, .prose dd, .prose dt, .prose figcaption, .foot-legal p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.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;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--mag);
  color: #14001a;
  font-weight: 700;
  border-radius: 8px;
  transition: top 0.18s ease;
}
.skip:focus { top: 12px; }

/* ---------- 顶部 HUD ---------- */
.hud {
  position: relative;
  z-index: 40;
  padding-inline: var(--pad);
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.14), rgba(13, 13, 13, 0.9));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.hud-brandline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #fff;
  font-family: var(--disp);
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: 1rem;
  text-shadow: 0 0 14px rgba(128, 0, 255, 0.9);
  min-width: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  color: var(--mag);
  border: 1px solid var(--line);
  border-radius: 8px;
  filter: drop-shadow(0 0 8px rgba(255, 0, 255, 0.7));
}

.brand-tag {
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  color: var(--dim);
  text-transform: none;
  white-space: nowrap;
}

.hud-menuline {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}

.hud-nav {
  flex: 1 1 auto;
  min-width: 0;
}

.hud-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  max-width: 100%;
}

.hud-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 11px;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  border: 1px solid transparent;
  border-radius: 10px;
  white-space: nowrap;
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.hud-nav a .ico { color: var(--neon); font-size: 0.75rem; }
.hud-nav a .idx { color: var(--mag); font-size: 0.68rem; opacity: 0.85; }

.hud-nav a:hover,
.hud-nav a:focus-visible,
.hud-nav a[aria-current="true"] {
  color: #fff;
  border-color: var(--line);
  background: rgba(128, 0, 255, 0.16);
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.8);
  transform: translateY(-1px);
}

.cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 0;
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, var(--mag), var(--neon));
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  box-shadow: 0 0 22px rgba(255, 0, 255, 0.4);
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
}

.cta:hover, .btn:hover { filter: brightness(1.16); transform: translateY(-1px); }

.btn.ghost {
  background: rgba(128, 0, 255, 0.12);
  border: 1px solid var(--line);
  color: var(--txt);
  box-shadow: none;
  clip-path: none;
  border-radius: 12px;
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: 70vh;
  padding: 56px var(--pad) 108px;
  background-image:
    radial-gradient(rgba(128, 0, 255, 0.22) 1px, transparent 1px),
    linear-gradient(180deg, rgba(13, 13, 13, 0) 45%, #0d0d0d 100%);
  background-size: 22px 22px, 100% 100%;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 72px), 0 100%);
}

.hero-copy { max-width: 640px; min-width: 0; }

.eyebrow {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 6px 12px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--mag);
  border: 1px solid rgba(255, 0, 255, 0.42);
  border-radius: 6px;
  background: rgba(255, 0, 255, 0.08);
}

.hero h1 {
  position: relative;
  font-family: var(--disp);
  font-weight: 900;
  font-size: clamp(1.85rem, 5vw, 3.5rem);
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 0 26px rgba(128, 0, 255, 0.8), 0 0 4px rgba(255, 255, 255, 0.5);
  margin-bottom: 18px;
  max-width: 100%;
}

.glitch { position: relative; }

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  text-shadow: none;
}

.glitch::before {
  color: var(--mag);
  clip-path: polygon(0 0, 100% 0, 100% 46%, 0 46%);
  animation: glitch-a 5.5s steps(2) infinite;
  opacity: 0.85;
}

.glitch::after {
  color: #7b2bff;
  clip-path: polygon(0 52%, 100% 52%, 100% 100%, 0 100%);
  animation: glitch-b 6.5s steps(2) infinite;
  opacity: 0.8;
}

@keyframes glitch-a {
  0%, 88%, 100% { transform: translate(0, 0); }
  90% { transform: translate(-3px, -2px) skewX(-4deg); }
  94% { transform: translate(3px, 1px); }
}

@keyframes glitch-b {
  0%, 84%, 100% { transform: translate(0, 0); }
  87% { transform: translate(3px, 2px) skewX(5deg); }
  92% { transform: translate(-2px, -1px); }
}

.lede {
  max-width: 46ch;
  color: var(--dim);
  font-size: 1.02rem;
}

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

.hero-frame {
  position: relative;
  margin: 0;
  min-height: 300px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: linear-gradient(160deg, #170f28, #0b0910);
  box-shadow: 0 24px 60px rgba(128, 0, 255, 0.28), 0 0 0 1px rgba(255, 0, 255, 0.16) inset;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 14px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--dim);
  background: rgba(13, 13, 13, 0.78);
  border-top: 1px solid var(--line-soft);
}

.hero-fallback {
  height: 100%;
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  text-align: center;
  color: var(--dim);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  padding: 0 14px;
}

.hero-fallback i {
  display: block;
  width: 132px;
  max-width: 60%;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--neon), var(--mag));
  opacity: 0.7;
  animation: bar 2.6s ease-in-out infinite;
}

.hero-fallback i:nth-child(2) { width: 92px; animation-delay: 0.3s; }
.hero-fallback i:nth-child(3) { width: 58px; animation-delay: 0.6s; }

@keyframes bar {
  0%, 100% { transform: scaleX(0.4); opacity: 0.35; }
  50% { transform: scaleX(1); opacity: 0.85; }
}

/* ---------- 正文区 ---------- */
.stream {
  padding: 8px var(--pad) 72px;
}

.stream-head {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 32px;
  max-width: 720px;
}

.stream-head h2 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 18px rgba(128, 0, 255, 0.65);
}

.subtitle {
  margin: 0;
  color: var(--dim);
  font-size: 0.98rem;
}

.stream-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.prose { min-width: 0; }

.prose section {
  position: relative;
  padding: 4px 0 26px 20px;
  margin-bottom: 30px;
  border-left: 2px solid var(--line-soft);
  max-width: 100%;
}

.prose section::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--mag);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--mag);
}

.prose h2 {
  font-family: var(--disp);
  font-weight: 700;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  color: #fff;
  letter-spacing: 0.03em;
  text-shadow: 0 0 14px rgba(128, 0, 255, 0.55);
  margin-top: 0.2em;
}

.prose h3 {
  font-size: 1.05rem;
  color: #f2ecff;
  letter-spacing: 0.04em;
  border-bottom: 1px dashed var(--line-soft);
  padding-bottom: 6px;
}

.prose p, .prose li {
  color: #d6d0e6;
  font-size: 1rem;
  line-height: 1.85;
}

.prose li { margin: 0.35em 0; }

.prose a {
  color: var(--mag);
  border-bottom: 1px dashed rgba(255, 0, 255, 0.6);
}

.prose strong { color: #fff; }

.prose ul, .prose ol {
  background: rgba(128, 0, 255, 0.06);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px 12px 30px;
  margin: 1em 0;
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 12px 18px;
  border-left: 3px solid var(--mag);
  background: rgba(255, 0, 255, 0.07);
  color: #f0e7ff;
  border-radius: 0 12px 12px 0;
}

.prose figure {
  margin: 1.4em 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink-3);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.prose figcaption {
  padding: 8px 14px;
  font-size: 0.78rem;
  color: var(--dim);
  border-top: 1px solid var(--line-soft);
}

.prose img { width: 100%; height: auto; }

.prose table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin: 1.2em 0;
  display: block;
  overflow-x: auto;
}

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

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

.prose pre {
  background: var(--ink-3);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 14px;
  overflow-x: auto;
  font-size: 0.88rem;
}

.prose code { font-family: var(--mono); color: #ffb8ff; }

/* ---------- 右侧栏 ---------- */
.rail {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin: 0;
  min-width: 0;
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.12), rgba(13, 13, 13, 0.72));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6);
}

.panel p { margin: 0; color: var(--dim); font-size: 0.94rem; }

.panel-title {
  font-family: var(--disp);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  color: #fff;
  margin: 0 0 12px;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--line-soft);
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.rail-list a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  font-size: 0.92rem;
  color: var(--dim);
  border-radius: 10px;
  border-left: 2px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.rail-list a:hover, .rail-list a:focus-visible {
  color: #fff;
  background: rgba(128, 0, 255, 0.18);
  border-left-color: var(--mag);
}

.rail-note { border-left: 3px solid var(--mag); }

.rail-note blockquote {
  margin: 0;
  color: #f0e7ff;
  font-size: 0.92rem;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 24px;
  padding: 48px var(--pad) 0;
  border-top: 1px solid var(--line);
  background: var(--ink-2);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 30px;
}

.foot section { min-width: 0; }

.foot-logo {
  font-family: var(--disp);
  font-size: 0.96rem;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 14px rgba(128, 0, 255, 0.7);
  margin-bottom: 10px;
}

.foot p { color: var(--dim); font-size: 0.9rem; }

.foot-host { color: #8c83a8; font-size: 0.82rem; }

.foot-t {
  font-family: var(--disp);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  color: #fff;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-soft);
  margin-bottom: 10px;
}

.foot dl { margin: 0; }

.foot dt {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--mag);
  margin: 12px 0 4px;
}

.foot dt:first-child { margin-top: 0; }

.foot dd { margin: 0; }

.foot dd a {
  display: block;
  min-height: 40px;
  padding: 8px 0;
  color: var(--dim);
  font-size: 0.9rem;
  border-bottom: 1px dashed rgba(128, 0, 255, 0.14);
  transition: color 0.16s ease, padding-left 0.16s ease;
}

.foot dd a:hover, .foot dd a:focus-visible {
  color: #fff;
  padding-left: 6px;
  text-shadow: 0 0 12px rgba(255, 0, 255, 0.75);
}

.sub-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}

.sub-form input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 11px 13px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  font-family: var(--mono);
  font-size: 0.95rem;
}

.sub-form input:focus {
  outline: none;
  border-color: var(--mag);
  box-shadow: 0 0 0 2px rgba(255, 0, 255, 0.28);
}

.sub-form button {
  min-height: 44px;
  border: 1px solid var(--mag);
  border-radius: 12px;
  background: rgba(255, 0, 255, 0.16);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: background 0.16s ease;
}

.sub-form button:hover { background: rgba(255, 0, 255, 0.34); }

.foot-legal {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line-soft);
  margin-top: 6px;
  padding: 16px 0 26px;
  text-align: center;
}

.foot-legal p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: #857c9f;
}

/* ---------- 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ---------- 断点 ---------- */
@media (max-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding-bottom: 84px;
  }
  .hero-frame { aspect-ratio: 16 / 9; min-height: 220px; }
  .stream-grid { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail-note { grid-column: 1 / -1; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .hud-menuline { flex-wrap: wrap; }
  .hud-nav { flex: 1 1 100%; order: 1; }
  .hud-nav ul {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .hud-nav a { min-height: 40px; padding: 8px 10px; font-size: 0.85rem; }
  .hud .cta { order: 2; margin-left: auto; }
  .hero { clip-path: none; padding-top: 34px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 0.92rem; letter-spacing: 0.08em; }
  .rail { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .foot { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .prose section { padding-left: 14px; }
  .prose ul, .prose ol { padding-left: 26px; }
  .eyebrow { letter-spacing: 0.14em; font-size: 0.7rem; }
  .hero-fallback { letter-spacing: 0.12em; }
}

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

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