@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Merriweather:wght@300;400;700&display=swap');

/* ── 变量 ── */
:root {
  --red: #ff0000;
  --pink: #ff1493;
  --dark: #261717;
  --dark2: #1a0f0f;
  --dark3: #320e0e;
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,20,147,0.2);
  --text: #f0e0e0;
  --text-dim: #c0a0a0;
  --link: #ff6ec7;
  --link-hover: #ff1493;
  --radius: 4px;
  --max-w: 1200px;
  --header-h: 88px;
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--dark2);
  color: var(--text);
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; transition: color .2s; }
a:hover { color: var(--link-hover); }
ol, ul { list-style: none; padding: 0; }
button { cursor: pointer; background: none; border: none; font: inherit; }
hr { border: none; border-top: 1px solid var(--glass-border); margin: .75em 0; }
time { font-size: .85em; color: var(--text-dim); font-family: 'Merriweather', serif; font-weight: 300; }

/* ── 极光背景 ── */
.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.aurora-layer {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  mix-blend-mode: screen;
}
.a1 {
  width: 70vw; height: 60vh;
  top: -20%; left: -15%;
  background: radial-gradient(ellipse at center, #ff0000 0%, transparent 70%);
  animation: auroraMove1 12s ease-in-out infinite alternate;
}
.a2 {
  width: 60vw; height: 70vh;
  top: 10%; right: -20%;
  background: radial-gradient(ellipse at center, #ff1493 0%, transparent 70%);
  animation: auroraMove2 10s ease-in-out infinite alternate;
}
.a3 {
  width: 80vw; height: 50vh;
  bottom: -10%; left: 10%;
  background: conic-gradient(from 180deg at 50% 50%, #ff0000, #ff1493, #8b0000, #ff0000);
  animation: auroraMove3 14s ease-in-out infinite alternate;
  opacity: .25;
}
@keyframes auroraMove1 {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes auroraMove2 {
  0% { transform: translate(0,0) scale(1.05); }
  100% { transform: translate(-6vw, 8vh) scale(1); }
}
@keyframes auroraMove3 {
  0% { transform: translate(0,0) rotate(0deg); }
  100% { transform: translate(4vw, -4vh) rotate(15deg); }
}
@media (prefers-reduced-motion: reduce) {
  .aurora-layer { animation: none; }
}

/* ── 层叠顺序 ── */
header, main, footer, .fullscreen-menu { position: relative; z-index: 1; }

/* ── 顶部导航 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(38,23,23,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px 8px;
  border-bottom: 1px solid rgba(255,20,147,.12);
}
.brand-link {
  font-family: 'Abril Fatface', serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--red);
  letter-spacing: .04em;
  text-shadow: 0 0 20px rgba(255,0,0,.6), 0 0 40px rgba(255,20,147,.3);
  transition: text-shadow .3s;
}
.brand-link:hover {
  color: var(--pink);
  text-shadow: 0 0 30px rgba(255,20,147,.9), 0 0 60px rgba(255,0,0,.4);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  gap: 16px;
}
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  min-height: 40px;
  transition: border-color .2s, background .2s;
}
.hamburger:hover { border-color: var(--pink); background: rgba(255,20,147,.1); }
.hb-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: background .2s;
}
.hamburger:hover .hb-bar { background: var(--pink); }
.inline-nav { display: none; }
.inline-nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
}
.inline-nav ol li a {
  display: block;
  padding: 8px 12px;
  font-size: .82em;
  color: var(--text-dim);
  border-radius: var(--radius);
  border: 1px solid transparent;
  min-height: 40px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  transition: color .2s, border-color .2s, background .2s;
}
.inline-nav ol li a:hover {
  color: var(--pink);
  border-color: var(--glass-border);
  background: var(--glass-bg);
}

/* ── 全屏菜单 ── */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(26,15,15,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s cubic-bezier(.4,0,.2,1);
}
.fullscreen-menu.open {
  opacity: 1;
  pointer-events: all;
}
.menu-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 1.8rem;
  color: var(--text-dim);
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  transition: color .2s, border-color .2s;
}
.menu-close:hover { color: var(--pink); border-color: var(--pink); }
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 600px;
  width: 90%;
  counter-reset: menu-counter;
}
.menu-list li {
  counter-increment: menu-counter;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .3s, transform .3s;
}
.fullscreen-menu.open .menu-list li {
  opacity: 1;
  transform: translateY(0);
}
.fullscreen-menu.open .menu-list li:nth-child(1) { transition-delay: .05s; }
.fullscreen-menu.open .menu-list li:nth-child(2) { transition-delay: .1s; }
.fullscreen-menu.open .menu-list li:nth-child(3) { transition-delay: .15s; }
.fullscreen-menu.open .menu-list li:nth-child(4) { transition-delay: .2s; }
.fullscreen-menu.open .menu-list li:nth-child(5) { transition-delay: .25s; }
.fullscreen-menu.open .menu-list li:nth-child(6) { transition-delay: .3s; }
.fullscreen-menu.open .menu-list li:nth-child(7) { transition-delay: .35s; }
.menu-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Merriweather', serif;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text);
  padding: 14px 20px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  background: var(--glass-bg);
  min-height: 52px;
  transition: color .2s, border-color .2s, background .2s;
}
.menu-list li a::before {
  content: counter(menu-counter, decimal-leading-zero);
  font-family: 'Abril Fatface', serif;
  font-size: .9em;
  color: var(--red);
  min-width: 2em;
  text-align: right;
}
.menu-list li a:hover {
  color: var(--pink);
  border-color: var(--pink);
  background: rgba(255,20,147,.08);
}

/* ── Hero ── */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
}
.hero-figure {
  text-align: center;
  max-width: 800px;
}
.hero-h1 {
  font-family: 'Abril Fatface', serif;
  font-size: clamp(2.2rem, 8vw, 5.5rem);
  line-height: 1.1;
  color: var(--red);
  text-shadow: 0 0 40px rgba(255,0,0,.7), 0 0 80px rgba(255,20,147,.4);
  letter-spacing: .02em;
  margin-bottom: .4em;
}
.hero-desc {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.8;
  display: block;
}

/* ── 内容区通用布局 ── */
.content-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
}
.page-content-area {
  grid-template-areas: "main aside";
}
.content-main {
  grid-area: main;
  min-width: 0;
}
.content-aside {
  grid-area: aside;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

/* ── 侧边栏 ── */
.aside-title {
  font-family: 'Abril Fatface', serif;
  font-size: 1.1rem;
  color: var(--pink);
  letter-spacing: .05em;
  margin-bottom: .4em;
}
.aside-nav li { margin-bottom: 8px; }
.aside-nav li a {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--text-dim);
  font-size: .88em;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: color .2s, border-color .2s, background .2s;
}
.aside-nav li a:hover {
  color: var(--pink);
  border-color: var(--pink);
  background: rgba(255,20,147,.06);
}
.aside-back { margin-top: 16px; }
.aside-sub {
  font-size: .9rem;
  color: var(--text-dim);
  margin-top: 20px;
  margin-bottom: 8px;
  font-weight: 700;
}
.aside-note {
  margin-top: 20px;
  padding: 12px 14px;
  font-size: .82em;
  color: var(--text-dim);
  line-height: 1.5;
}
.aside-site-links { margin-top: 24px; }

/* ── 玻璃卡片 ── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.glass-card:hover {
  border-color: var(--pink);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255,20,147,.2);
}

/* ── 首页分类区 ── */
.topics-section, .recent-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px;
}
.section-heading {
  font-family: 'Abril Fatface', serif;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--red);
  text-shadow: 0 0 20px rgba(255,0,0,.5);
  margin-bottom: .3em;
}
.topic-card h3 { font-family: 'Abril Fatface', serif; font-size: 1.25rem; margin-bottom: .5em; }
.topic-card h3 a { color: var(--text); }
.topic-card h3 a:hover { color: var(--pink); }
.topic-card p { color: var(--text-dim); font-size: .9em; margin-bottom: 12px; }
.card-children { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.card-child-link {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: .8em;
  color: var(--text-dim);
  transition: color .2s, border-color .2s;
}
.card-child-link:hover { color: var(--pink); border-color: var(--pink); }

.topics-section { display: block; }
.topics-section .topic-card {
  margin-bottom: 16px;
  display: block;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.article-card h4 { font-size: 1rem; margin-bottom: .4em; }
.article-card h4 a { color: var(--text); }
.article-card h4 a:hover { color: var(--pink); }
.article-card p { font-size: .85em; color: var(--text-dim); margin-top: 8px; }
.art-date { display: block; margin-bottom: 6px; }
.mod-date { margin-left: 12px; }

/* ── 栏目页 ── */
.topic-hero, .about-intro-section, .privacy-head-section, .article-head-section {
  padding: 60px 24px 40px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.topic-hero-fig h1, .about-intro-fig h1, .privacy-head-fig h1, .article-head-fig .article-meta-block h1 {
  font-family: 'Abril Fatface', serif;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  color: var(--red);
  text-shadow: 0 0 24px rgba(255,0,0,.5);
  margin-bottom: .3em;
}
.topic-hero-fig figcaption, .about-intro-fig figcaption, .privacy-head-fig figcaption {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 680px;
}

.children-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 60px;
}
.child-article { margin-bottom: 0; }
.child-article h3 { font-size: 1.1rem; margin-bottom: .4em; }
.child-article h3 a { color: var(--text); }
.child-article h3 a:hover { color: var(--pink); }
.child-article p { font-size: .88em; color: var(--text-dim); margin-top: 6px; }
.read-more-link { display: inline-block; margin-top: 10px; font-size: .85em; color: var(--pink); }
.read-more-link:hover { color: var(--red); }

.children-section > .child-article {
  margin-bottom: 16px;
}

/* stagger 动效 */
.stagger-item {
  opacity: 0;
  transform: translateY(16px);
  animation: staggerIn .5s ease forwards;
  animation-delay: calc(var(--stagger, 0) * .08s);
}
@keyframes staggerIn {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .stagger-item { animation: none; opacity: 1; transform: none; }
}
.empty-tip { color: var(--text-dim); font-style: italic; }

/* ── 文章页 ── */
.article-head-fig { position: relative; }
.hero-img { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.breadcrumb-link {
  display: inline-block;
  margin-bottom: 12px;
  font-size: .85em;
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
}
.breadcrumb-link:hover { color: var(--pink); border-color: var(--pink); }
.article-dates { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 4px; }

/* ── 正文散文 ── */
.prose { color: var(--text); }
.prose h2 { font-family: 'Abril Fatface', serif; font-size: 1.6rem; color: var(--pink); margin: 1.5em 0 .3em; }
.prose h3 { font-family: 'Merriweather', serif; font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 1.2em 0 .3em; }
.prose p { margin-bottom: 1em; }
.prose a { color: var(--link); border-bottom: 1px solid rgba(255,110,199,.3); }
.prose a:hover { color: var(--link-hover); border-color: var(--pink); }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1em; }
.prose li { margin-bottom: .4em; }
.prose strong { color: var(--red); }
.prose blockquote { border-left: 3px solid var(--pink); padding-left: 1em; color: var(--text-dim); font-style: italic; margin: 1em 0; }
.prose hr { border-color: var(--glass-border); }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .9em; }
.prose th { background: rgba(255,20,147,.12); padding: 8px 12px; border: 1px solid var(--glass-border); color: var(--pink); text-align: left; }
.prose td { padding: 8px 12px; border: 1px solid var(--glass-border); color: var(--text-dim); }

/* ── 按钮 ── */
.btn-secondary {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: .85em;
  transition: color .2s, border-color .2s, background .2s;
  min-height: 40px;
  line-height: 1.4;
}
.btn-secondary:hover {
  color: var(--pink);
  border-color: var(--pink);
  background: rgba(255,20,147,.08);
}

/* ── 页脚 ── */
.site-footer {
  background: var(--dark2);
  border-top: 1px solid var(--glass-border);
  padding: 48px 24px 24px;
  margin-top: 60px;
}
.footer-brand {
  font-family: 'Abril Fatface', serif;
  font-size: clamp(2rem, 8vw, 5rem);
  color: var(--dark3);
  text-shadow: 0 0 60px rgba(255,0,0,.2);
  text-align: center;
  line-height: 1;
  margin-bottom: 32px;
  letter-spacing: .02em;
  -webkit-text-stroke: 1px rgba(255,20,147,.3);
}
.footer-dls {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  max-width: var(--max-w);
  margin: 0 auto 32px;
}
.footer-dls dl { min-width: 120px; }
.footer-dls dt {
  font-family: 'Abril Fatface', serif;
  font-size: .9rem;
  color: var(--red);
  letter-spacing: .1em;
  margin-bottom: 10px;
}
.footer-dls dd { margin-bottom: 6px; }
.footer-dls dd a { font-size: .85em; color: var(--text-dim); }
.footer-dls dd a:hover { color: var(--pink); }
.footer-copy {
  text-align: center;
  color: var(--text-dim);
  font-size: .8em;
  border-top: 1px solid rgba(255,20,147,.1);
  padding-top: 16px;
}

/* ── 响应式 ── */
@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
    grid-template-areas: "main" "aside";
  }
  .content-aside {
    position: static;
  }
  .articles-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .content-section { padding: 24px 16px; }
  .topics-section, .recent-section, .children-section { padding: 24px 16px; }
  .topic-hero, .about-intro-section, .privacy-head-section, .article-head-section { padding: 32px 16px 20px; }
  .articles-grid { grid-template-columns: 1fr; }
  .hero-section { min-height: 70vh; padding: 60px 16px; }
  .footer-dls { gap: 24px; }
  .footer-brand { font-size: clamp(1.8rem, 10vw, 3rem); }
  .site-header { position: sticky; }
  .inline-nav { display: none !important; }
  .menu-list li a { font-size: 1rem; padding: 12px 16px; }
}
@media (min-width: 900px) {
  .inline-nav { display: block; }
  .topics-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .topics-section .section-heading,
  .topics-section hr {
    grid-column: 1 / -1;
  }
}
