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

:root {
  --pri: #ff0000;
  --acc: #ff006e;
  --ink: #1a1a2e;
  --bg: #0b0b14;
  --panel: rgba(26, 26, 46, 0.62);
  --fg: #eef0ff;
  --dim: #9ba0c4;
  --line: rgba(255, 0, 110, 0.26);
  --glow: 0 0 10px rgba(255, 0, 110, 0.78), 0 0 30px rgba(255, 0, 0, 0.42);
  --r: 10px;
  --dock: 76px;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255, 0, 110, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 0, 110, 0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: center top;
  padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom) + 8px);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 2px, rgba(0, 0, 0, 0.3) 2px 4px);
  opacity: 0.55;
}

body.lock { overflow: hidden; }

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

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

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 120;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--acc);
  transition: top 0.18s ease;
}
.skip:focus { top: 12px; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- 顶部主视觉 ---------- */

.hero {
  min-height: 45vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 44px 4px 26px;
  scroll-margin-block: 24px;
}

.hero-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 720px;
}

.hero-ico {
  width: 56px;
  height: 56px;
  color: var(--acc);
  filter: drop-shadow(0 0 12px rgba(255, 0, 110, 0.85));
}

.hero h1,
.glitch {
  position: relative;
  margin: 0;
  font-size: clamp(1.9rem, 7vw, 3.5rem);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-shadow: var(--glow);
  word-break: break-word;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
}

.glitch::before {
  color: var(--pri);
  opacity: 0.62;
  transform: translate(-2px, 1px);
  clip-path: polygon(0 0, 100% 0, 100% 47%, 0 47%);
  animation: gl-a 3.6s infinite steps(2, end);
}

.glitch::after {
  color: #22d3ee;
  opacity: 0.5;
  transform: translate(2px, -1px);
  clip-path: polygon(0 53%, 100% 53%, 100% 100%, 0 100%);
  animation: gl-b 2.8s infinite steps(2, end);
}

@keyframes gl-a {
  0%, 86%, 100% { transform: translate(-2px, 1px); }
  90% { transform: translate(-7px, -1px); }
  95% { transform: translate(3px, 2px); }
}

@keyframes gl-b {
  0%, 82%, 100% { transform: translate(2px, -1px); }
  89% { transform: translate(7px, 2px); }
  94% { transform: translate(-4px, 1px); }
}

.hero-sub {
  margin: 0;
  max-width: 46ch;
  color: var(--dim);
  font-size: 1rem;
  font-weight: 400;
}

/* ---------- 主体两栏 ---------- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding: 10px 0 44px;
}

.rail {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 16px 12px;
  background: var(--panel);
  box-shadow: inset 0 -2px 0 var(--acc), 0 0 22px rgba(255, 0, 110, 0.1);
}

.rail h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--acc);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.7);
}

.rail .subtitle {
  margin: 2px 0 12px;
  font-size: 1rem;
  color: var(--dim);
}

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

.rail li {
  counter-increment: rail;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}
.rail li:first-child { border-top: 0; }

.rail a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 4px;
  color: var(--fg);
  font-size: 1rem;
}

.rail a::before {
  content: counter(rail, decimal-leading-zero);
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--acc);
  opacity: 0.85;
}

.rail a:hover { color: #fff; text-shadow: 0 0 12px rgba(255, 0, 110, 0.8); }

/* ---------- 正文 ---------- */

.body { min-width: 0; }

.body > div {
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  scroll-margin-block: 24px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.body > div:first-child {
  border-top: 0;
  padding-top: 4px;
}

.body > div.hit {
  background: rgba(255, 0, 110, 0.07);
  box-shadow: inset 3px 0 0 var(--acc);
}

.body h2 {
  margin: 0 0 10px;
  font-size: clamp(1.28rem, 3.6vw, 1.62rem);
  line-height: 1.32;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.55);
}

.body h3 {
  margin: 22px 0 8px;
  font-size: 1.1rem;
  color: var(--acc);
}

.body p { margin: 0 0 14px; max-width: 66ch; }
.body ul, .body ol { margin: 0 0 14px; padding-left: 1.25em; }
.body li { margin: 6px 0; }

.body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.body blockquote {
  margin: 0 0 14px;
  padding: 10px 16px;
  border-left: 3px solid var(--acc);
  background: rgba(255, 0, 110, 0.07);
  color: var(--dim);
}

.body strong { color: #fff; }

.body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r);
  border: 1px solid var(--line);
}

.body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 1rem;
}

.body th, .body td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}

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

.body time,
.body .time {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color: var(--dim);
  font-size: 0.95rem;
}

/* ---------- 页脚 ---------- */

.foot {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0) 0%, rgba(26, 26, 46, 0.72) 100%);
  margin-top: 12px;
}

.cta {
  max-width: 1080px;
  margin: 0 auto;
  padding: 38px 16px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid var(--acc);
}

.cta-t {
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-shadow: var(--glow);
  color: #fff;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--r);
  border: 1px solid var(--acc);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.35), inset 0 -2px 0 var(--pri);
}
.cta-btn:hover { box-shadow: 0 0 26px rgba(255, 0, 110, 0.65), inset 0 -2px 0 var(--pri); }

.foot-bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 16px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 22px;
}

.foot-logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.6);
}

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

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--dim);
  font-size: 1rem;
}
.foot-nav a:hover { color: var(--acc); }

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

/* ---------- 底部固定条 + 全屏遮罩菜单 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(11, 11, 20, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
}

.dock.open {
  top: 0;
  background: rgba(9, 9, 16, 0.985);
  border-top: 0;
}

.dock-nav {
  height: 0;
  overflow: hidden;
  opacity: 0;
  display: flex;
  justify-content: center;
  gap: 8vw;
  padding: 0 20px;
  transition: opacity 0.22s ease;
}

.dock.open .dock-nav {
  flex: 1;
  height: auto;
  opacity: 1;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 9vw;
}

.dock-col {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dock-col a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--fg);
  font-size: 1.16rem;
  letter-spacing: 0.04em;
}

.dock.open .dock-col a { font-size: 1.34rem; }
.dock-col a:hover { color: var(--acc); text-shadow: 0 0 14px rgba(255, 0, 110, 0.85); }

.dock-find {
  display: none;
  gap: 8px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}
.dock.find .dock-find { display: flex; }

.dock-find input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #0f0f1c;
  color: var(--fg);
  font: inherit;
  font-size: 1rem;
}
.dock-find input::placeholder { color: var(--dim); }

.dock-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.brand {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 6px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 1rem;
  text-shadow: var(--glow);
}
.dock.open .brand { font-size: 1.1rem; }

.ibtn {
  appearance: none;
  font: inherit;
  font-size: 1rem;
  min-height: 44px;
  min-width: 62px;
  padding: 0 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  box-shadow: inset 0 -2px 0 rgba(255, 0, 110, 0.55);
}

.ibtn:hover {
  border-color: var(--acc);
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 0, 110, 0.5), inset 0 -2px 0 var(--acc);
}

.dock-bar > .ibtn:first-child { justify-self: start; }
.dock-bar > .ibtn:last-child { justify-self: end; }

/* ---------- 断点 ---------- */

@media (min-width: 860px) {
  .grid {
    grid-template-columns: 244px minmax(0, 1fr);
    gap: 44px;
    align-items: start;
  }
  .rail { position: sticky; top: 22px; }
  .wrap { padding: 0 24px; }
  .hero { padding-top: 60px; }
}

@media (max-width: 520px) {
  .cta { padding: 30px 16px 22px; }
  .foot-nav ul { gap: 0 12px; }
  .dock.open .dock-nav { gap: 14px; padding: 30px 12px; }
  .dock.open .dock-col a { font-size: 1.12rem; padding: 6px 8px; }
}

@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}
