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

:root {
  --red: #ff0000;
  --pink: #ff1493;
  --ink: #261717;
  --bg: #1b1010;
  --panel: #241616;
  --panel-2: #2c1a1a;
  --txt: #f7ecec;
  --dim: #d8bec2;
  --line: rgba(255, 255, 255, 0.14);
  --r: 10px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: 'Figtree', 'Noto Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- 极光底色 ---- */
.aurora {
  position: fixed;
  inset: -25% -25%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  filter: saturate(1.25) blur(34px);
  mix-blend-mode: screen;
  background:
    radial-gradient(38% 42% at 18% 22%, rgba(255, 0, 0, 0.5), transparent 64%),
    radial-gradient(42% 46% at 76% 16%, rgba(255, 20, 147, 0.45), transparent 66%),
    conic-gradient(from 210deg at 58% 62%, rgba(255, 0, 0, 0.32), rgba(255, 20, 147, 0.3), rgba(96, 6, 52, 0.3), rgba(255, 0, 0, 0.32));
  background-size: 180% 180%;
  animation: drift 11s ease-in-out infinite alternate;
}

@keyframes drift {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 62%;
  }
}

/* ---- 页头 ---- */
.masthead {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 10px;
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--pink));
  color: #fff;
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--dim);
}

/* ---- 粘性锚点条 ---- */
.anchors {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 20px;
  background: rgba(27, 16, 16, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

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

.chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--txt);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.35s ease, color 0.35s ease;
}

.chip:hover,
.chip:focus-visible {
  background: linear-gradient(100deg, var(--red), var(--pink));
  color: #fff;
}

/* ---- 首屏 ---- */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: 45vh;
  padding: 58px 20px 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.2) contrast(1.04);
  transform: scale(1.02);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(27, 16, 16, 0.94) 6%, rgba(27, 16, 16, 0.34) 56%, rgba(27, 16, 16, 0.92));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  text-align: right;
}

.hero h1 {
  margin: 0;
  font-size: clamp(29px, 6vw, 52px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.01em;
  background: linear-gradient(96deg, #ffffff 8%, #ffd7e7 46%, var(--pink) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 14px 0 0;
  color: var(--dim);
  font-size: 16.5px;
}

.slant {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: 12px;
  background: linear-gradient(90deg, var(--red), var(--pink), var(--red));
  clip-path: polygon(0 62%, 100% 0, 100% 100%, 0 100%);
}

/* ---- 主体骨架 ---- */
main {
  position: relative;
  z-index: 1;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 30px;
  align-items: start;
}

.wrap > div {
  min-width: 0;
}

article {
  overflow-wrap: break-word;
}

article div {
  background: var(--panel);
  border-radius: var(--r);
  padding: 22px 22px 26px;
  margin: 0 0 18px;
  transition: transform 0.3s ease, background 0.3s ease;
}

article div:hover {
  background: var(--panel-2);
  transform: translateY(-2px);
}

article div:last-child {
  margin-bottom: 0;
}

article [id] {
  scroll-margin-top: 78px;
}

article h2 {
  margin: 0 0 8px;
  font-size: clamp(23px, 3.4vw, 30px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.01em;
}

article h3 {
  margin: 22px 0 8px;
  font-size: 20px;
  font-weight: 600;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 0 0 16px;
}

article h2 + hr,
article h3 + hr,
aside h2 + hr {
  height: 3px;
  width: 58px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--pink));
  margin: 0 0 16px;
}

article p {
  margin: 0 0 14px;
}

article ul,
article ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

article li {
  margin: 6px 0;
}

article strong {
  color: #fff;
}

article a {
  color: #ff9cc1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

article a:hover {
  color: #fff;
}

article blockquote {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: var(--r);
  background: rgba(255, 20, 147, 0.12);
}

article blockquote p:last-child {
  margin-bottom: 0;
}

/* ---- 侧栏 ---- */
aside.rail {
  position: sticky;
  top: 74px;
  background: var(--panel);
  border-radius: var(--r);
  padding: 18px 16px 16px;
}

aside h2 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

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

.rail-list li {
  counter-increment: rail;
}

.rail-list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--dim);
  font-size: 16px;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.rail-list li a::before {
  content: counter(rail, decimal-leading-zero);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--pink);
}

.rail-list li a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

/* ---- 页脚 ---- */
footer {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  padding: 26px 20px 22px;
  background: #1d1212;
  border-top: 1px solid var(--line);
}

.fnav {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

footer dl {
  margin: 0;
}

footer dd {
  margin: 0;
}

footer dt a,
footer dd a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  text-decoration: none;
  color: var(--dim);
  font-size: 16px;
  transition: color 0.3s ease;
}

footer dt a {
  color: #fff;
  font-weight: 600;
}

footer dt a::before {
  content: '';
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--pink));
}

footer a:hover {
  color: var(--pink);
}

.fbase {
  max-width: 1120px;
  margin: 16px auto 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--dim);
  font-size: 16px;
}

.fbase p {
  margin: 0;
}

/* ---- 断点 ---- */
@media (max-width: 960px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding: 30px 20px 46px;
  }

  aside.rail {
    position: static;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16.5px;
  }

  .hero {
    min-height: 46vh;
    padding: 44px 16px 40px;
  }

  .wrap {
    padding: 26px 16px 42px;
  }

  article div {
    padding: 18px 16px 22px;
  }

  .fnav {
    gap: 8px;
  }

  footer dt a,
  footer dd a,
  .rail-list li a {
    font-size: 16px;
  }
}

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

  .aurora,
  .hero-img,
  article div {
    animation: none;
    transition: none;
  }
}

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