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

:root {
  --red: #ff0000;
  --mag: #ff1493;
  --ink: #261717;
  --paper: #2c1a1a;
  --text: #f7ecec;
  --dim: #c9b0b0;
  --r: 4px;
  --rail: 212px;
}

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

html {
  background: var(--ink);
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: 40px;
  font-family: 'Quicksand', 'Caveat', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: transparent;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: -25vmax;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 22% 18%, rgba(255, 0, 0, 0.55), transparent 68%),
    radial-gradient(closest-side at 78% 26%, rgba(255, 20, 147, 0.5), transparent 66%),
    radial-gradient(closest-side at 48% 88%, rgba(255, 0, 60, 0.32), transparent 70%),
    conic-gradient(from 30deg at 50% 50%, #3a1220, #55111f, #2b1226, #3a1220);
  filter: blur(56px) saturate(1.25);
  opacity: 0.72;
  animation: aurora 11s ease-in-out infinite alternate;
}

@keyframes aurora {
  0% {
    transform: scale(1) rotate(0deg);
  }
  100% {
    transform: scale(1.16) rotate(11deg);
  }
}

@keyframes tickerslide {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 200% 0;
  }
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

a {
  color: inherit;
}

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

/* 顶部细条 */
.ticker {
  position: fixed;
  inset: 0 0 auto 0;
  height: 40px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-left: 16px;
  font-size: 16px;
  color: #ffe8f1;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.9), rgba(255, 20, 147, 0.9), rgba(255, 0, 0, 0.9));
  background-size: 200% 100%;
  animation: tickerslide 12s linear infinite;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset;
}

.ticker-word {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.to-top {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  font-size: 16px;
  text-decoration: none;
  color: #fff;
  transition: background 0.25s ease;
}

.to-top:hover,
.to-top:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

/* 左侧固定竖排 */
.rail {
  position: fixed;
  top: 40px;
  left: 0;
  bottom: 0;
  width: var(--rail);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 18px;
  background: linear-gradient(180deg, rgba(38, 23, 23, 0.88), rgba(38, 23, 23, 0.5));
  backdrop-filter: blur(14px);
  border-right: 1px solid rgba(255, 20, 147, 0.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 4px;
  font-family: 'Caveat', 'Quicksand', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: #fff;
  text-decoration: none;
}

.brand-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--mag));
  box-shadow: 0 0 14px rgba(255, 20, 147, 0.85);
}

.rail nav {
  min-width: 0;
}

.rail nav p {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rail nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
  color: #f0dcdc;
  text-decoration: none;
  border-radius: var(--r);
  transition: color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.rail nav a:hover,
.rail nav a:focus-visible {
  color: #fff;
  padding-left: 16px;
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.45), rgba(255, 20, 147, 0.12));
}

/* 主栅格：main 直接挂 div 与 aside */
main {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
}

.hero {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  place-items: center;
  height: 45vh;
  min-height: 320px;
  max-height: 460px;
  overflow: hidden;
  background: linear-gradient(150deg, #6b0f18, #2a1119 58%, #43102f);
  border-radius: 0 0 var(--r) var(--r);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.02);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(38, 23, 23, 0.3), rgba(38, 23, 23, 0.88)),
    radial-gradient(62% 68% at 50% 42%, rgba(255, 20, 147, 0.4), transparent 72%);
}

.hero-in {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 0 22px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 15px;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.hero h1 {
  font-size: clamp(28px, 5.2vw, 52px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 3px 28px rgba(255, 0, 80, 0.5);
}

.hero-desc {
  margin: 14px auto 0;
  max-width: 34em;
  font-size: 16px;
  line-height: 1.7;
  color: #f7dfe7;
}

/* 正文 */
.prose {
  min-width: 0;
  padding: 34px clamp(18px, 3.4vw, 44px) 56px;
}

.prose > article {
  scroll-margin-top: 60px;
  margin: 0 0 18px;
  padding: clamp(20px, 3vw, 32px);
  background: rgba(44, 26, 26, 0.74);
  border-radius: var(--r);
  transition: transform 0.35s ease, background 0.35s ease;
}

.prose > article:hover {
  transform: translateY(-2px);
  background: rgba(60, 33, 35, 0.86);
}

.prose h2 {
  font-size: clamp(21px, 3.2vw, 29px);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  margin: 0 0 8px;
}

.prose h3 {
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.4;
  margin: 24px 0 8px;
  color: #ffe2ed;
}

.prose p {
  margin: 0 0 14px;
  color: #f4e7e7;
}

.prose ul,
.prose ol {
  margin: 0 0 16px;
  padding-left: 1.25em;
}

.prose li {
  margin: 6px 0;
}

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

.prose a {
  color: #ff86bd;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 134, 189, 0.55);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.prose a:hover,
.prose a:focus-visible {
  color: #fff;
  border-bottom-color: #fff;
}

.prose strong {
  color: #fff;
}

.prose blockquote {
  margin: 0 0 16px;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--mag);
  color: #f0d8e2;
}

.prose img {
  border-radius: var(--r);
  margin: 8px 0 14px;
}

hr {
  height: 2px;
  max-width: 260px;
  margin: 0 0 20px;
  border: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--mag) 58%, rgba(255, 20, 147, 0));
}

/* 右侧栏 */
.side {
  position: sticky;
  top: 60px;
  align-self: start;
  padding: 34px 24px 56px 0;
}

.side h2 {
  font-size: 20px;
  line-height: 1.4;
  color: #fff;
}

.side-list {
  list-style: none;
  display: grid;
  gap: 4px;
  margin: 18px 0 0;
  padding: 0;
}

.side-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1.5;
  color: #eddcdc;
  text-decoration: none;
  border-radius: var(--r);
  background: rgba(44, 26, 26, 0.7);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.side-list a:hover,
.side-list a:focus-visible {
  color: #fff;
  transform: translateX(-3px);
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.55), rgba(255, 20, 147, 0.3));
}

/* 页脚 */
.foot {
  position: relative;
  z-index: 1;
  margin-left: var(--rail);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px clamp(18px, 3.4vw, 44px) 30px;
  font-size: 16px;
  color: var(--dim);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.foot address {
  display: flex;
  align-items: center;
  gap: 12px;
  font-style: normal;
}

.foot-brand {
  font-family: 'Caveat', 'Quicksand', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 21px;
  color: #ffd6e6;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  color: #eddcdc;
  text-decoration: none;
  border-radius: var(--r);
  transition: background 0.2s ease, color 0.2s ease;
}

.foot-links a:hover,
.foot-links a:focus-visible {
  color: #fff;
  background: rgba(255, 20, 147, 0.25);
}

a:focus-visible,
.brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* 滚动显现 */
.rv .prose > article,
.rv .side {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.rv .prose > article.in,
.rv .side.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .rail {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 20, 147, 0.2);
    overflow: hidden;
  }

  .brand {
    font-size: 22px;
    padding: 8px 2px;
    flex: none;
  }

  .rail nav {
    flex: 1;
    min-width: 0;
  }

  .rail nav p {
    flex-direction: row;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .rail nav p::-webkit-scrollbar {
    display: none;
  }

  .rail nav a {
    white-space: nowrap;
    padding: 10px;
  }

  .rail nav a:hover,
  .rail nav a:focus-visible {
    padding-left: 10px;
  }

  main {
    grid-template-columns: 1fr;
    margin-left: 0;
  }

  .prose {
    padding: 24px 18px 40px;
  }

  .side {
    position: static;
    padding: 0 18px 44px;
  }

  .side h2 {
    margin-top: 0;
  }

  .foot {
    margin-left: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 270px;
    height: 45vh;
  }

  .hero-desc {
    font-size: 16px;
  }
}

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

  body::before,
  .ticker {
    animation: none;
  }

  .rv .prose > article,
  .rv .side {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .prose > article:hover,
  .side-list a:hover {
    transform: none;
  }
}

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