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

:root {
  --red: #ff0000;
  --pink: #ff006e;
  --ink: #1a1a2e;
  --bg: #0e0e1a;
  --fg: #ece8f6;
  --muted: #a79dc2;
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(26, 26, 46, 0.74);
  --radius: 10px;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 104px;
  overflow-x: hidden;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Noto Sans SC', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 0, 110, 0.17) 1px, transparent 1px),
    radial-gradient(rgba(255, 0, 0, 0.09) 1px, transparent 1px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
}

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

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

a {
  color: #ffb3d1;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  font-family: 'Calistoga', Georgia, serif;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.4px;
}

h1 {
  font-size: clamp(30px, 7.2vw, 52px);
  text-shadow: 0 0 18px rgba(255, 0, 0, 0.55), 0 0 44px rgba(255, 0, 110, 0.34);
}

h2 {
  font-size: clamp(22px, 4vw, 30px);
  text-shadow: 0 0 14px rgba(255, 0, 110, 0.42);
}

h3 {
  font-size: clamp(18px, 3.2vw, 22px);
  text-shadow: 0 0 10px rgba(255, 0, 110, 0.3);
}

p {
  margin: 0 0 1em;
}

::selection {
  background: var(--pink);
  color: #101020;
}

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

/* 顶部：角落品牌 + 搜索 */
.site-head {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 0, 110, 0.28);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.94), rgba(14, 14, 26, 0.5));
}

.brand {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 0, 110, 0.5);
  border-radius: 12px;
  color: #ff5c9d;
  background: rgba(255, 0, 110, 0.1);
  box-shadow: inset 0 0 16px rgba(255, 0, 110, 0.32), 0 0 12px rgba(255, 0, 110, 0.22);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.brand:hover,
.brand:focus-visible {
  color: #fff;
  background: var(--pink);
  box-shadow: 0 0 22px rgba(255, 0, 110, 0.8);
}

.mark-svg {
  width: 22px;
  height: 22px;
}

.search {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
  max-width: 420px;
  margin-left: auto;
}

.search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 45px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
}

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

.search input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 0, 110, 0.25);
}

.search button {
  height: 45px;
  padding: 0 16px;
  border: 1px solid rgba(255, 0, 110, 0.6);
  border-radius: 999px;
  background: rgba(255, 0, 110, 0.14);
  color: #ffd0e2;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.search button:hover,
.search button:focus-visible {
  background: var(--pink);
  color: #12121f;
}

/* 底部药丸导航 */
.dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 0, 110, 0.35);
  background: linear-gradient(0deg, rgba(11, 11, 20, 0.98), rgba(11, 11, 20, 0.86));
  backdrop-filter: blur(12px);
}

.dock-row {
  display: flex;
  gap: 8px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-row::-webkit-scrollbar {
  display: none;
}

.dock-row a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 0, 110, 0.42);
  border-radius: 999px;
  background: rgba(255, 0, 110, 0.07);
  color: #ffe0ec;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s, background 0.18s, box-shadow 0.18s, color 0.18s;
}

.dock-row a:hover,
.dock-row a:focus-visible {
  background: var(--pink);
  color: #141428;
  box-shadow: 0 0 18px rgba(255, 0, 110, 0.7);
  transform: translateY(-2px);
}

/* 主体 */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px;
  gap: 16px;
  align-items: center;
  min-height: 45vh;
  padding: 26px 0 22px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.16);
}

.hero-desc {
  max-width: 46ch;
  margin: 0;
  color: var(--muted);
}

.hero-art {
  margin: 0;
  color: #ff4d8d;
  filter: drop-shadow(0 0 12px rgba(255, 0, 110, 0.55));
}

.hero-svg {
  width: 100%;
  height: auto;
}

.hero-img {
  width: 100%;
  border: 1px solid rgba(255, 0, 110, 0.45);
  border-radius: var(--radius);
}

.body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  padding: 26px 0 8px;
}

/* 左侧栏 */
.rail {
  padding: 16px;
  border: 1px solid rgba(255, 0, 110, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.9), rgba(18, 18, 32, 0.92));
  box-shadow: var(--shadow);
}

.kicker {
  display: inline-block;
  margin-bottom: 6px;
  color: #ff8ab5;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px;
  letter-spacing: 0.2em;
}

.rail-h {
  margin: 0 0 10px;
  font-size: 22px;
}

.rail-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.rail-list a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  font-size: 16px;
  text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, color 0.18s;
}

.rail-list a:hover,
.rail-list a:focus-visible {
  border-color: var(--pink);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 0, 110, 0.45);
}

.rail-top {
  margin: 0;
}

.rail-top a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #ff8ab5;
  font-size: 16px;
  text-decoration: none;
}

.rail-top a:hover {
  color: #fff;
}

/* 正文 */
.prose {
  min-width: 0;
  max-width: 70ch;
  overflow-wrap: break-word;
}

.prose article {
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), rgba(16, 16, 28, 0.94));
  box-shadow: var(--shadow);
  scroll-margin-top: 24px;
  animation: rise 0.5s ease both;
}

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

.prose article:nth-child(1) { animation-delay: 0.03s; }
.prose article:nth-child(2) { animation-delay: 0.08s; }
.prose article:nth-child(3) { animation-delay: 0.13s; }
.prose article:nth-child(4) { animation-delay: 0.18s; }
.prose article:nth-child(5) { animation-delay: 0.23s; }
.prose article:nth-child(6) { animation-delay: 0.28s; }
.prose article:nth-child(7) { animation-delay: 0.33s; }

.prose h2,
.prose h3 {
  margin-top: 0.1em;
}

.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose a {
  color: #ffb3d1;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: #fff;
}

.prose strong {
  color: #fff;
}

.prose img {
  margin: 1em 0;
  border-radius: 8px;
}

.prose blockquote {
  margin: 1em 0;
  padding: 10px 16px;
  border-left: 3px solid var(--pink);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 0, 110, 0.08);
}

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

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

.prose code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 15px;
  color: #ffc2d8;
}

/* 页脚 */
.foot {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  max-width: 1120px;
  margin: 36px auto 0;
  padding: 28px 16px 32px;
  border-top: 1px solid rgba(255, 0, 110, 0.3);
}

.foot-brand {
  margin: 0;
  font-family: 'Calistoga', Georgia, serif;
  font-size: clamp(38px, 11vw, 84px);
  line-height: 0.92;
  letter-spacing: -1px;
  color: #ff2d7a;
  text-shadow: 0 0 26px rgba(255, 0, 110, 0.5);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
  margin: 0;
  font-size: 16px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #ffb3d1;
  text-decoration: none;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: #fff;
}

.foot-copy {
  grid-column: 1 / -1;
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}

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

@keyframes glitch {
  0%,
  100% {
    text-shadow: 0 0 18px rgba(255, 0, 0, 0.6), 0 0 44px rgba(255, 0, 110, 0.34);
  }
  33% {
    text-shadow: -2px 0 0 #00eaff, 2px 0 0 var(--pink), 0 0 22px rgba(255, 0, 110, 0.7);
  }
  66% {
    text-shadow: 2px -1px 0 #00eaff, -2px 1px 0 var(--pink), 0 0 22px rgba(255, 0, 0, 0.7);
  }
}

h1:hover {
  animation: glitch 0.7s steps(3) infinite;
}

@media (min-width: 900px) {
  .body {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
  }

  .rail {
    position: sticky;
    top: 22px;
  }
}

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

  .hero {
    grid-template-columns: minmax(0, 1fr) 88px;
    min-height: 38vh;
  }

  .prose article {
    padding: 16px;
  }

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

  .foot-links {
    justify-content: flex-start;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

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