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

/* ============================================================
   CSS 变量 & 重置
   ============================================================ */
:root {
  --c-red: #ff0000;
  --c-pink: #ff1493;
  --c-dark: #261717;
  --c-dark2: #1a0f0f;
  --c-dark3: #0d0808;
  --c-glass: rgba(38, 23, 23, 0.55);
  --c-glass-border: rgba(255, 20, 147, 0.25);
  --c-text: #f5e6e6;
  --c-text-dim: #c9a0a0;
  --c-text-muted: #8a5c5c;
  --c-link: #ff6eb0;
  --c-link-hover: #ff1493;
  --sidebar-w: 240px;
  --font-body: 'Rubik', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-head: 'Outfit', 'PingFang SC', 'Hiragino Sans GB', system-ui, sans-serif;
  --radius-card: 4px;
  --radius-btn: 4px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 17px;
}

body {
  font-family: var(--font-body);
  background: var(--c-dark3);
  color: var(--c-text);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-link-hover); }
a:focus-visible { outline: 2px solid var(--c-pink); outline-offset: 3px; border-radius: 2px; }

/* ============================================================
   极光背景
   ============================================================ */
.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: 0.35;
  mix-blend-mode: screen;
}

.aurora-layer--1 {
  width: 80vw;
  height: 60vh;
  top: -20vh;
  left: -20vw;
  background: radial-gradient(ellipse at center, #ff0000 0%, #ff1493 40%, transparent 70%);
  animation: aurora-drift-1 10s ease-in-out infinite alternate;
}

.aurora-layer--2 {
  width: 70vw;
  height: 70vh;
  bottom: -30vh;
  right: -10vw;
  background: radial-gradient(ellipse at center, #ff1493 0%, #ff0000 35%, transparent 65%);
  animation: aurora-drift-2 12s ease-in-out infinite alternate;
}

.aurora-layer--3 {
  width: 60vw;
  height: 50vh;
  top: 30vh;
  left: 20vw;
  background: conic-gradient(from 180deg at 50% 50%, #ff000033 0%, #ff149366 30%, #ff000011 60%, transparent 100%);
  background-size: 200% 200%;
  animation: aurora-drift-3 9s ease-in-out infinite alternate;
  opacity: 0.2;
  mix-blend-mode: overlay;
}

@keyframes aurora-drift-1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(8vw, 6vh) scale(1.1); }
}
@keyframes aurora-drift-2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6vw, -8vh) scale(1.08); }
}
@keyframes aurora-drift-3 {
  from { transform: translate(0, 0) rotate(0deg); }
  to   { transform: translate(-4vw, 4vh) rotate(15deg); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-layer { animation: none; }
}

/* ============================================================
   布局外壳
   ============================================================ */
.layout-shell {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
}

/* ============================================================
   侧边导航
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(13, 8, 8, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid var(--c-glass-border);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 12px;
  border-bottom: 1px solid rgba(255,20,147,0.15);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--c-text);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  min-height: 40px;
}
.brand-mark:hover { color: var(--c-pink); }

.brand-icon { border-radius: 6px; }
.brand-icon-text {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--c-red), var(--c-pink));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.sidebar-announce {
  padding: 7px 14px;
  background: linear-gradient(90deg, rgba(255,0,0,0.18) 0%, rgba(255,20,147,0.12) 100%);
  border-bottom: 1px solid rgba(255,20,147,0.12);
  font-size: 0.72rem;
  color: var(--c-text-dim);
  letter-spacing: 0.03em;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 0 20px;
  gap: 2px;
}

.nav-a {
  display: block;
  padding: 11px 18px;
  font-size: 0.84rem;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--c-text-dim);
  border-left: 3px solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.nav-a:hover {
  color: var(--c-text);
  background: rgba(255,20,147,0.1);
  border-left-color: var(--c-pink);
}
.nav-a--active {
  color: var(--c-pink);
  background: rgba(255,20,147,0.12);
  border-left-color: var(--c-red);
  font-weight: 600;
}

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-btn);
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   主内容区
   ============================================================ */
.page-body {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.page-wrap {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 32px 56px;
}

/* ============================================================
   Hero（首页）
   ============================================================ */
.hero--home {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: flex-end;
  padding: 0 0 48px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255,0,0,0.18) 0%, rgba(255,20,147,0.10) 50%, transparent 100%);
}

.hero--home::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom right, transparent 49%, var(--c-dark3) 51%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 32px 0;
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-pink);
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: var(--font-head);
}

.hero-h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  color: #fff;
  margin-bottom: 14px;
  background: linear-gradient(100deg, #fff 30%, var(--c-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  font-size: 1rem;
  color: var(--c-text-dim);
  max-width: 540px;
  margin-bottom: 24px;
  line-height: 1.7;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  text-decoration: none;
}
.btn--primary {
  background: linear-gradient(135deg, var(--c-red) 0%, var(--c-pink) 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,20,147,0.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,20,147,0.5);
  filter: brightness(1.08);
  color: #fff;
}

/* ============================================================
   文章 / Prose
   ============================================================ */
.prose {
  width: 100%;
}

.prose-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,20,147,0.2);
}

.prose-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-pink);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-family: var(--font-head);
}

.prose-h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.25;
  color: #fff;
  margin-bottom: 12px;
}

.prose-lead {
  font-size: 1rem;
  color: var(--c-text-dim);
  line-height: 1.7;
  margin-top: 8px;
}

.prose-meta {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}
.prose-meta time { color: var(--c-text-muted); }

/* 正文排版 */
.prose-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
}

.prose-body h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  margin: 2em 0 0.6em;
  padding-top: 0.5em;
  border-top: 1px solid rgba(255,20,147,0.15);
}
.prose-body h2 > small {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-pink);
  text-transform: uppercase;
  margin-bottom: 4px;
  font-family: var(--font-head);
}

.prose-body h3 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c-text);
  margin: 1.6em 0 0.5em;
}

.prose-body p { margin: 0 0 1.1em; }

.prose-body strong { color: #fff; font-weight: 600; }

.prose-body em { color: var(--c-pink); font-style: normal; font-weight: 500; }

.prose-body a { color: var(--c-link); border-bottom: 1px solid rgba(255,110,176,0.3); }
.prose-body a:hover { color: var(--c-link-hover); border-bottom-color: var(--c-pink); }

.prose-body ul, .prose-body ol {
  margin: 0.6em 0 1em 1.4em;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
}
.prose-body ul li::marker { color: var(--c-pink); }
.prose-body ol li::marker { color: var(--c-red); font-weight: 600; }

.prose-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.9rem;
}
.prose-body table th {
  background: rgba(255,20,147,0.15);
  color: var(--c-pink);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 2px solid rgba(255,20,147,0.3);
}
.prose-body table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(255,20,147,0.1);
  vertical-align: top;
}
.prose-body table tr:hover td { background: rgba(255,20,147,0.05); }

.prose-body blockquote {
  border-left: 3px solid var(--c-pink);
  margin: 1.2em 0;
  padding: 12px 18px;
  background: rgba(255,20,147,0.07);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  color: var(--c-text-dim);
  font-style: italic;
}

.prose-body time {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  font-style: normal;
}

/* ============================================================
   区块标题 / section-block
   ============================================================ */
.section-block {
  margin-top: 52px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,20,147,0.15);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-pink);
  text-transform: uppercase;
  margin-bottom: 6px;
  font-family: var(--font-head);
}

.section-h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 24px;
}

/* ============================================================
   卡片网格（首页）
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.card {
  position: relative;
  border-radius: var(--radius-card);
  border: 1px solid var(--c-glass-border);
  background: var(--c-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,0,0,0.06) 0%, rgba(255,20,147,0.04) 100%);
  pointer-events: none;
  border-radius: inherit;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255,20,147,0.22);
  border-color: rgba(255,20,147,0.45);
}

.card-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.card-link:hover { color: inherit; }

.card-eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--c-pink);
  text-transform: uppercase;
  font-family: var(--font-head);
}

.card-title {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  line-height: 1.5;
  flex: 1;
}

.card-date {
  font-size: 0.74rem;
  color: var(--c-text-muted);
}
.card-date time { color: inherit; }

/* ============================================================
   相关列表
   ============================================================ */
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  counter-reset: related-counter;
}

.related-list li {
  counter-increment: related-counter;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: rgba(38,23,23,0.4);
  border: 1px solid rgba(255,20,147,0.12);
  border-radius: var(--radius-card);
  position: relative;
  transition: background var(--transition), border-color var(--transition);
}
.related-list li::before {
  content: counter(related-counter, decimal-leading-zero);
  position: absolute;
  right: 16px;
  top: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,20,147,0.35);
  font-family: var(--font-head);
  letter-spacing: 0.05em;
}
.related-list li:hover {
  background: rgba(255,20,147,0.08);
  border-color: rgba(255,20,147,0.28);
}
.related-list li a {
  font-weight: 600;
  font-size: 0.93rem;
  color: var(--c-text);
  line-height: 1.4;
}
.related-list li a:hover { color: var(--c-pink); }
.related-list li small {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* About nav list */
.about-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  counter-reset: about-counter;
}
.about-nav-list li {
  counter-increment: about-counter;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border: 1px solid rgba(255,20,147,0.12);
  border-radius: var(--radius-card);
  background: rgba(38,23,23,0.35);
  transition: background var(--transition);
}
.about-nav-list li:hover { background: rgba(255,20,147,0.07); }
.about-nav-list li a { font-weight: 600; font-size: 0.9rem; color: var(--c-text); }
.about-nav-list li a:hover { color: var(--c-pink); }
.about-nav-list li small { font-size: 0.76rem; color: var(--c-text-muted); }

.about-links {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,20,147,0.15);
}

/* ============================================================
   文章 Hero 图
   ============================================================ */
.article-hero-wrap {
  position: relative;
  width: 100%;
  max-height: 360px;
  overflow: hidden;
}
.article-hero-img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}
.article-hero-clip {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--c-dark3));
  pointer-events: none;
}

/* ============================================================
   Privacy 链接
   ============================================================ */
.privacy-footer-links {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,20,147,0.12);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.privacy-footer-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-link);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  background: rgba(13,8,8,0.92);
  border-top: 1px solid rgba(255,20,147,0.2);
  padding: 40px 32px 24px;
  margin-left: 0;
}

.footer-brand-row {
  margin-bottom: 28px;
  overflow: hidden;
}

.footer-bigname {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  background: linear-gradient(100deg, var(--c-red) 0%, var(--c-pink) 60%, rgba(255,255,255,0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
  display: block;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 32px;
  margin-bottom: 28px;
}

.footer-dl dt {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--c-pink);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,20,147,0.18);
}

.footer-dl dd {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  margin: 0 0 6px;
  line-height: 1.5;
}
.footer-dl dd a {
  color: var(--c-text-dim);
  transition: color var(--transition);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
.footer-dl dd a:hover { color: var(--c-pink); }

.footer-bottom {
  border-top: 1px solid rgba(255,20,147,0.12);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  font-size: 0.74rem;
  color: var(--c-text-muted);
  text-align: center;
}

/* ============================================================
   Home prose
   ============================================================ */
.home-prose .prose-body,
.home-prose .prose-header {
  display: none;
}
.home-prose {
  /* 首页的 page.content 不单独显示，嵌在 prose 区块里 */
}
/* 重新显示 home prose body */
.home-prose > .prose-header,
.home-prose > .prose-body { display: block; }

/* ============================================================
   响应式：移动端
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
  }

  .sidebar {
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 200;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: flex;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 210;
    background: rgba(13,8,8,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,20,147,0.3);
    border-radius: var(--radius-btn);
  }

  .page-body {
    margin-left: 0;
  }

  .page-wrap {
    padding: 52px 18px 40px;
  }

  .hero-inner {
    padding: 72px 18px 0;
  }

  .hero--home {
    min-height: 45vh;
  }

  .hero-h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-footer {
    padding: 32px 18px 20px;
  }

  .footer-bigname {
    font-size: clamp(1.8rem, 10vw, 3rem);
  }

  .related-list li::before {
    display: none;
  }

  .sidebar-announce {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  html { font-size: 16px; }

  .prose-h1 { font-size: 1.4rem; }

  .hero-h1 { font-size: 1.5rem; }

  .card-link { padding: 14px 16px; }

  .prose-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 覆盖层（移动端导航打开时） */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 190;
  backdrop-filter: blur(2px);
}
.nav-overlay.is-active { display: block; }
