@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

:root {
  --ink: #0d0d0d;
  --violet: #8000ff;
  --magenta: #ff00ff;
  --txt: #ece6f8;
  --dim: #a99ec4;
  --line: rgba(128, 0, 255, 0.42);
  --line2: rgba(255, 0, 255, 0.32);
  --panel: rgba(128, 0, 255, 0.07);
  --mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: "Nunito", "DM Sans", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(900px 520px at 8% -10%, rgba(128, 0, 255, 0.28), transparent 68%),
    radial-gradient(760px 480px at 96% 4%, rgba(255, 0, 255, 0.16), transparent 70%);
  background-repeat: no-repeat;
  color: var(--txt);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.28;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0,
    rgba(255, 255, 255, 0.06) 1px,
    transparent 1px,
    transparent 3px
  );
}

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

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

a:hover,
a:focus-visible {
  color: var(--magenta);
}

menu,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3 {
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
  letter-spacing: 0.01em;
}

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

/* ---------- 顶栏 ---------- */
.hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 13, 13, 0.72);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.2rem 0.2rem 0.2rem 0;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  text-shadow: 0 0 12px var(--magenta), 0 0 26px rgba(128, 0, 255, 0.7);
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  object-fit: cover;
}

.brand-name {
  font-size: 1.02rem;
}

.bar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.search {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
}

.search input {
  width: 8.5rem;
  max-width: 42vw;
  min-height: 42px;
  padding: 0.4rem 0.7rem;
  border: 0;
  background: transparent;
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16px;
}

.search input::placeholder {
  color: var(--dim);
}

.search button {
  min-width: 42px;
  min-height: 42px;
  border: 0;
  border-left: 1px solid var(--line);
  background: rgba(128, 0, 255, 0.18);
  color: #fff;
  font-family: var(--mono);
  font-size: 15px;
  cursor: pointer;
}

.search button:hover {
  background: rgba(255, 0, 255, 0.28);
}

.dock {
  position: relative;
}

.dock > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line2);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 0, 255, 0.08);
}

.dock > summary::-webkit-details-marker {
  display: none;
}

.dock > summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid var(--magenta);
  border-bottom: 2px solid var(--magenta);
  transform: translateY(-2px) rotate(45deg);
}

.dock[open] > summary {
  border-color: var(--magenta);
  box-shadow: 0 0 14px rgba(255, 0, 255, 0.4);
}

.dock-menu {
  display: none;
}

.dock[open] > .dock-menu {
  display: grid;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 70;
  min-width: 13rem;
  padding: 0.4rem;
  border: 1px solid var(--magenta);
  border-radius: 10px;
  background: #100a1a;
  box-shadow: 0 0 24px rgba(255, 0, 255, 0.28);
}

.dock-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.35rem 0.7rem;
  border-radius: 7px;
  font-size: 16px;
  border-left: 2px solid transparent;
}

.dock-menu a:hover,
.dock-menu a:focus-visible {
  background: rgba(128, 0, 255, 0.22);
  border-left-color: var(--magenta);
}

.dock[open] .dock-menu li {
  animation: drop 0.26s ease both;
}

.dock[open] .dock-menu li:nth-child(2) { animation-delay: 0.03s; }
.dock[open] .dock-menu li:nth-child(3) { animation-delay: 0.06s; }
.dock[open] .dock-menu li:nth-child(4) { animation-delay: 0.09s; }
.dock[open] .dock-menu li:nth-child(5) { animation-delay: 0.12s; }
.dock[open] .dock-menu li:nth-child(6) { animation-delay: 0.15s; }
.dock[open] .dock-menu li:nth-child(7) { animation-delay: 0.18s; }

@keyframes drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 粘性锚点条 ---------- */
.strip {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 8, 14, 0.94);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: thin;
}

.strip-track {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem 0.7rem;
  white-space: nowrap;
}

.strip-track a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.72rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--dim);
  border: 1px solid transparent;
}

.strip-track a:hover,
.strip-track a:focus-visible {
  color: #fff;
  border-color: var(--line2);
  background: rgba(128, 0, 255, 0.2);
  text-shadow: 0 0 10px var(--magenta);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 62vh;
  padding: 2.2rem 0 2.6rem;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

.hero-copy h1 {
  font-size: clamp(2rem, 5.4vw, 3.5rem);
  color: #fff;
  text-shadow: 0 0 18px rgba(128, 0, 255, 0.9), 0 0 44px rgba(255, 0, 255, 0.45);
  animation: glitch 6s steps(1) infinite;
}

@keyframes glitch {
  0%, 92%, 100% { transform: none; }
  93% { transform: skewX(-3deg) translateX(2px); }
  95% { transform: skewX(2deg) translateX(-3px); }
  97% { transform: skewX(-1deg) translateX(1px); }
}

.hero-lead {
  margin: 1rem 0 0;
  max-width: 34ch;
  color: var(--dim);
  font-size: 1.02rem;
  line-height: 1.8;
  border-left: 2px solid var(--violet);
  padding-left: 0.85rem;
}

.badge {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  padding: 0.32rem 0.7rem;
  border: 1px solid var(--magenta);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--magenta);
  background: rgba(255, 0, 255, 0.1);
  box-shadow: 0 0 16px rgba(255, 0, 255, 0.35);
}

.collage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  align-items: start;
}

.collage-frame {
  position: absolute;
  inset: -10px -10px auto auto;
  width: 62%;
  height: 62%;
  border: 1px solid var(--line2);
  border-radius: 10px;
  pointer-events: none;
}

.shot {
  position: relative;
  margin: 0;
  border: 1px solid var(--line2);
  border-radius: 10px;
  overflow: hidden;
  background: #120c1b;
  aspect-ratio: 3 / 4;
}

.shot.a {
  transform: translateY(-14px) rotate(-1.5deg);
}

.shot.b {
  transform: translateY(20px) rotate(1.6deg);
}

.shot-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.05);
}

.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.12), transparent 45%, rgba(255, 0, 255, 0.22));
}

.shot.is-empty {
  border-style: dashed;
  background-image: repeating-linear-gradient(45deg, rgba(128, 0, 255, 0.14) 0 8px, transparent 8px 16px);
}

/* ---------- 主体骨架 ---------- */
.shell {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 2.2rem;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.4rem 1.2rem 1rem;
}

.rail {
  position: sticky;
  top: 4.2rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 0.9rem 1.1rem;
  background: linear-gradient(180deg, rgba(128, 0, 255, 0.14), rgba(13, 13, 13, 0.4));
}

.panel h2 {
  font-family: var(--mono);
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  color: #fff;
  text-shadow: 0 0 12px var(--violet);
}

.panel .subtitle {
  margin: 0.15rem 0 0.9rem;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--magenta);
  font-family: var(--mono);
}

.rail-menu {
  display: grid;
  gap: 0.15rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.7rem;
}

.rail-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.6rem;
  border-left: 2px solid rgba(128, 0, 255, 0.35);
  border-radius: 0 6px 6px 0;
  font-size: 16px;
  color: var(--dim);
}

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

/* ---------- 正文 ---------- */
.prose {
  min-width: 0;
}

.prose article {
  position: relative;
  margin: 0 0 1.6rem;
  padding: 1.5rem 1.2rem 1.5rem 1.35rem;
  border: 1px solid rgba(128, 0, 255, 0.3);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--panel), rgba(13, 13, 13, 0.25));
  scroll-margin-top: 4.4rem;
}

.prose article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  bottom: 1.1rem;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--violet), var(--magenta));
  box-shadow: 0 0 12px var(--violet);
}

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

.prose h2 {
  font-size: clamp(1.4rem, 3.2vw, 1.9rem);
  color: #fff;
  margin-bottom: 0.7rem;
  text-shadow: 0 0 16px rgba(128, 0, 255, 0.8);
}

.prose h3 {
  font-size: 1.18rem;
  color: #fff;
  margin: 1.4rem 0 0.5rem;
}

.prose p {
  margin: 0 0 1rem;
  line-height: 1.85;
}

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

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin: 0.35rem 0;
  line-height: 1.8;
}

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

.prose strong {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}

.prose img {
  display: block;
  border-radius: 10px;
  border: 1px solid var(--line2);
  margin: 1rem 0;
}

.prose blockquote {
  margin: 1rem 0;
  padding: 0.6rem 0 0.6rem 1rem;
  border-left: 3px solid var(--magenta);
  color: var(--dim);
  background: rgba(255, 0, 255, 0.06);
  border-radius: 0 8px 8px 0;
}

.prose a {
  color: var(--magenta);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

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

/* ---------- 页脚 ---------- */
footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.8rem;
  max-width: 1180px;
  margin: 3rem auto 0;
  padding: 2.2rem 1.2rem 1rem;
  border-top: 1px solid var(--line);
}

.foot-col {
  min-width: 0;
}

.foot-col h3 {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.18em;
  color: var(--magenta);
  margin-bottom: 0.6rem;
}

.foot-mark {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.1rem;
  letter-spacing: 0.16em;
  color: #fff;
  text-shadow: 0 0 14px var(--violet);
}

.foot-kw {
  margin: 0.35rem 0 0;
  font-size: 16px;
  color: var(--dim);
}

.foot-host {
  margin: 0 0 0.6rem;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--dim);
  word-break: break-all;
}

.foot-list {
  display: grid;
  gap: 0.1rem;
}

.foot-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--dim);
}

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

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line2);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 15px;
  color: #fff;
}

.totop:hover,
.totop:focus-visible {
  border-color: var(--magenta);
  box-shadow: 0 0 14px rgba(255, 0, 255, 0.4);
}

.foot-base {
  grid-column: 1 / -1;
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
}

.foot-base p {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.62s ease, transform 0.62s ease;
}

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

/* ---------- 断点 ---------- */
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    padding-top: 1.6rem;
  }

  .rail {
    position: static;
    order: -1;
  }

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

@media (max-width: 760px) {
  .hero {
    min-height: 0;
    padding: 1.6rem 0 2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }

  .hero-copy h1 {
    font-size: clamp(1.85rem, 8.5vw, 2.6rem);
  }

  .badge {
    position: static;
    display: inline-block;
    margin: 0 0 0.7rem;
    order: -1;
  }

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

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

  .shot.a {
    transform: none;
  }

  .shot.b {
    transform: translateY(14px);
  }

  footer {
    grid-template-columns: 1fr 1fr;
  }

  .foot-brand {
    grid-column: 1 / -1;
  }

  .search input {
    width: 6.5rem;
  }
}

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

  .search button {
    display: none;
  }

  .search input {
    width: 5.6rem;
    border-radius: 10px;
  }
}

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

  .hero-copy h1,
  .dock[open] .dock-menu li {
    animation: none;
  }

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

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