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

:root {
  --pink: #ff0080;
  --fuchsia: #ff00ff;
  --ink: #26171f;
  --text: #f7eff4;
  --dim: #d3bccb;
  --line: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.065);
  --radius: 28px;
  --serif: "Cormorant Infant", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --script: "Great Vibes", "Cormorant Infant", cursive;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  background-image: radial-gradient(120% 90% at 50% -10%, #3c1b30 0%, #1a1017 60%, #140c11 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

/* ---------- 极光网格底纹 ---------- */
.aurora {
  position: fixed;
  inset: -25vmax;
  z-index: -3;
  pointer-events: none;
  filter: blur(72px) saturate(150%);
  opacity: 0.92;
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora span:nth-child(1) {
  width: 70vmax;
  height: 70vmax;
  left: -16vmax;
  top: -22vmax;
  background: radial-gradient(circle at 40% 40%, rgba(255, 0, 128, 0.9), rgba(255, 0, 128, 0) 62%);
  animation: drift-a 24s ease-in-out infinite alternate;
}

.aurora span:nth-child(2) {
  width: 58vmax;
  height: 58vmax;
  right: -18vmax;
  top: -8vmax;
  background: radial-gradient(circle at 50% 50%, rgba(255, 0, 255, 0.8), rgba(255, 0, 255, 0) 60%);
  animation: drift-b 31s ease-in-out infinite alternate;
}

.aurora span:nth-child(3) {
  width: 64vmax;
  height: 64vmax;
  left: 16vmax;
  bottom: -30vmax;
  background: radial-gradient(circle at 50% 50%, rgba(132, 40, 255, 0.72), rgba(132, 40, 255, 0) 62%);
  animation: drift-c 36s ease-in-out infinite alternate;
}

.aurora span:nth-child(4) {
  width: 46vmax;
  height: 46vmax;
  right: 4vmax;
  bottom: -22vmax;
  background: radial-gradient(circle at 50% 50%, rgba(0, 205, 255, 0.5), rgba(0, 205, 255, 0) 60%);
  animation: drift-a 28s ease-in-out infinite alternate-reverse;
}

@keyframes drift-a {
  to {
    transform: translate3d(9vmax, 7vmax, 0) scale(1.22);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-7vmax, 9vmax, 0) scale(1.16);
  }
}

@keyframes drift-c {
  to {
    transform: translate3d(6vmax, -8vmax, 0) scale(1.28);
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 18%, #000 0%, transparent 76%);
}

/* ---------- 顶部两行 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px 14px 12px;
  background: linear-gradient(180deg, rgba(38, 23, 31, 0.96), rgba(38, 23, 31, 0.66));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brandline {
  display: flex;
  justify-content: center;
  padding: 2px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 6px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: #fff;
}

.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  border-radius: 12px;
}

.brand-word {
  background: linear-gradient(94deg, #ffffff, #ffd0ea 38%, #ff9df5 62%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.menuline {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1160px;
  margin: 0 auto;
}

.pillnav {
  display: flex;
  flex: 1 1 auto;
  gap: 8px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}

.pillnav::-webkit-scrollbar {
  display: none;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffe9f5;
  font-size: 0.95rem;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.pill:hover {
  background: linear-gradient(100deg, rgba(255, 0, 128, 0.92), rgba(255, 0, 255, 0.86));
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(255, 0, 128, 0.95);
}

.pill-n {
  font-family: var(--script);
  font-size: 0.95rem;
  opacity: 0.8;
}

.searchbox {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 4px 3px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
}

.searchbox input {
  width: 100px;
  min-height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
}

.searchbox input:focus {
  outline: none;
}

.searchbox input::placeholder {
  color: #bda5b7;
}

.searchbox button {
  min-height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--pink), var(--fuchsia));
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.searchbox button:hover {
  filter: brightness(1.12);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 45vh;
  margin-bottom: clamp(22px, 4vw, 46px);
  border-radius: 0 0 46% 46% / 0 0 15% 15%;
  background: linear-gradient(160deg, rgba(255, 0, 128, 0.42), rgba(38, 23, 31, 0.24) 46%, rgba(255, 0, 255, 0.36));
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  filter: saturate(130%);
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 62%, rgba(38, 23, 31, 0.2), rgba(38, 23, 31, 0.9) 78%),
    linear-gradient(180deg, rgba(38, 23, 31, 0.4), rgba(38, 23, 31, 0.88));
}

.hero-inner {
  position: relative;
  text-align: center;
  padding: clamp(30px, 6vw, 58px) 20px;
}

.hero h1 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 5.4vw, 3.3rem);
  line-height: 1.28;
  letter-spacing: 0.02em;
  background: linear-gradient(96deg, #ffffff, #ffc9e8 34%, #ff9df5 62%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 4px 34px rgba(255, 0, 128, 0.35);
}

.lede {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 1.02rem;
  color: #ecd9e6;
}

/* ---------- 正文与侧栏 ---------- */
main {
  padding: 0 clamp(14px, 4vw, 28px) 44px;
}

.reader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
  max-width: 1160px;
  margin: 0 auto;
}

.prose {
  min-width: 0;
  padding: clamp(20px, 3.4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 34px 80px -46px rgba(255, 0, 128, 0.7);
}

.prose article {
  scroll-margin-top: 152px;
}

.prose article + article {
  margin-top: 2.2rem;
  padding-top: 2.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.prose small {
  display: block;
  margin-bottom: 0.35em;
  font-family: var(--serif);
  font-size: 0.76rem;
  letter-spacing: 0.34em;
  color: #ffb3e0;
}

.prose h2,
.prose h3 {
  margin: 0.15em 0 0.6em;
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.36;
  color: #fff;
}

.prose h2 {
  font-size: clamp(1.35rem, 2.7vw, 1.92rem);
}

.prose h3 {
  font-size: 1.16rem;
}

.prose p {
  margin: 0 0 1.05em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
}

.prose li {
  margin: 0.35em 0;
}

.prose a {
  color: #ff9ad6;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 154, 214, 0.45);
}

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

.prose img {
  display: block;
  margin: 1.2em 0;
  height: auto;
  border-radius: 18px;
}

.prose blockquote {
  margin: 1.2em 0;
  padding: 0.85em 1.15em;
  border-left: 3px solid var(--pink);
  border-radius: 0 18px 18px 0;
  background: rgba(255, 0, 128, 0.11);
}

.prose figure {
  margin: 1.2em 0;
}

.prose figcaption {
  margin-top: 0.5em;
  font-size: 0.86rem;
  color: var(--dim);
}

.prose code {
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.13);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.rail {
  position: sticky;
  top: 138px;
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.rail small {
  display: block;
  font-family: var(--serif);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: #ffb3e0;
}

.rail h2 {
  margin: 0.15em 0 0.9em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.16rem;
  color: #fff;
}

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

.rail-list li + li {
  margin-top: 2px;
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 14px;
  color: #f2e2ec;
  font-size: 0.94rem;
  text-decoration: none;
  transition: background 0.22s ease, transform 0.22s ease, color 0.22s ease;
}

.rail-list a:hover {
  background: linear-gradient(100deg, rgba(255, 0, 128, 0.88), rgba(255, 0, 255, 0.72));
  color: #fff;
  transform: translateX(3px);
}

.rail-n {
  font-family: var(--script);
  font-size: 0.9rem;
  color: #ff9ad6;
}

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

.rail-top {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  color: #e8d5e2;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.rail-top:hover {
  border-color: var(--pink);
  color: #fff;
}

/* ---------- 页脚单行 ---------- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 26px;
  padding: 26px clamp(14px, 4vw, 28px) 34px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(38, 23, 31, 0.55), rgba(18, 11, 15, 0.94));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.foot-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--serif);
  letter-spacing: 0.14em;
  color: #fff;
  text-decoration: none;
}

.foot-nav dl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  max-width: 660px;
  margin: 0;
}

.foot-nav dt {
  margin: 0;
}

.foot-nav dt a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 4px;
  color: #e4cede;
  font-size: 0.9rem;
  text-decoration: none;
}

.foot-nav dt a:hover {
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 0, 128, 0.95);
}

.foot-nav dd {
  margin: 0 6px 0 0;
  font-family: var(--script);
  font-size: 0.9rem;
  color: #ff9ad6;
}

.foot-copy {
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  color: #bfa7b8;
}

/* ---------- 滚动显现 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.3, 1);
}

/* ---------- 断点 ---------- */
@media (max-width: 960px) {
  .reader {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
  }
}

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

  .hero {
    border-radius: 0 0 30% 30% / 0 0 9% 9%;
  }

  .searchbox {
    padding-left: 10px;
  }

  .searchbox input {
    width: 62px;
  }

  .foot-copy {
    order: 3;
  }

  .foot-nav dl {
    gap: 0 6px;
  }
}

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

  .aurora span {
    animation: none;
  }

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

  .pill:hover,
  .rail-list a:hover {
    transform: none;
  }
}

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