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

/* ========== CSS 自定义属性 ========== */
:root {
  --c-red: #ff0000;
  --c-purple: #8b00ff;
  --c-dark: #261717;
  --c-dark2: #1a0f0f;
  --c-dark3: #321f1f;
  --c-glass: rgba(255,255,255,0.08);
  --c-glass-border: rgba(255,255,255,0.15);
  --c-glass-hover: rgba(255,255,255,0.14);
  --c-text: #f0e8e8;
  --c-text-muted: rgba(240,232,232,0.65);
  --c-text-dim: rgba(240,232,232,0.4);
  --c-red-glow: rgba(255,0,0,0.35);
  --c-purple-glow: rgba(139,0,255,0.35);
  --c-red-soft: rgba(255,0,0,0.15);
  --c-purple-soft: rgba(139,0,255,0.15);
  --radius: 10px;
  --radius-lg: 18px;
  --blur: blur(16px);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.45), 0 1px 4px rgba(255,0,0,0.1);
  --shadow-glow-red: 0 0 20px rgba(255,0,0,0.5), 0 0 40px rgba(255,0,0,0.2);
  --shadow-glow-purple: 0 0 20px rgba(139,0,255,0.5);
  --font-main: 'Outfit', 'Work Sans', system-ui, sans-serif;
  --nav-h1: 56px;
  --nav-h2: 44px;
  --transition: 0.25s ease;
}

/* ========== 重置 & 基础 ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--c-dark2);
}

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

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, menu { list-style: none; }
button { cursor: pointer; font-family: inherit; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ========== 背景渐变层 ========== */
.site-wrapper {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(139,0,255,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255,0,0,0.15) 0%, transparent 55%),
    linear-gradient(160deg, #1a0f0f 0%, #261717 50%, #1a0b1a 100%);
}

/* ========== 玻璃基础 ========== */
.glass-card {
  background: var(--c-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.glass-card:hover {
  background: var(--c-glass-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 16px rgba(139,0,255,0.2);
}

/* ========== 导航 ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,15,15,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-glass-border);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.brand-logo { width: 36px; height: 36px; border-radius: 8px; }
.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--c-red), var(--c-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}
.brand-desc {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  margin-left: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 0.25rem;
}
.main-nav menu {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
}
.main-nav menu li { position: relative; }
.main-nav menu li > a,
.main-nav menu li > details > summary > a,
.main-nav menu li > details > summary {
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  height: var(--nav-h2);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text);
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.main-nav menu li > a:hover,
.main-nav menu li > details > summary:hover {
  background: var(--c-glass);
  color: #fff;
}
.main-nav menu li details[open] > summary {
  background: var(--c-glass);
  color: var(--c-red);
}

/* 下拉菜单 */
.main-nav details {
  position: relative;
}
.main-nav details menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  flex-direction: column;
  background: rgba(26,15,15,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 16px rgba(139,0,255,0.15);
  padding: 0.4rem;
  z-index: 200;
}
.main-nav details[open] menu { display: flex; }
.main-nav details menu li a {
  display: block;
  padding: 0.6rem 1rem;
  height: auto;
  font-size: 0.875rem;
  border-radius: 6px;
  color: var(--c-text);
  transition: background var(--transition), color var(--transition);
}
.main-nav details menu li a:hover {
  background: var(--c-red-soft);
  color: #fff;
}

/* 右侧 CTA */
.nav-cta {
  margin-left: auto;
  padding: 0.5rem 1.2rem;
  height: 40px;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  min-height: 40px;
}

/* ========== 按钮 ========== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.8rem;
  min-height: 44px;
  background: linear-gradient(135deg, var(--c-red), #cc0000);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: none;
  letter-spacing: 0.02em;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-red);
}
.btn-glow {
  box-shadow: 0 0 14px rgba(255,0,0,0.4), 0 2px 8px rgba(0,0,0,0.3);
}
.btn-glow:hover {
  box-shadow: var(--shadow-glow-red);
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.8rem;
  min-height: 44px;
  background: transparent;
  color: var(--c-text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--c-glass-border);
  transition: background var(--transition), border-color var(--transition);
}
.btn-outline:hover {
  background: var(--c-glass);
  border-color: rgba(139,0,255,0.5);
}

/* ========== 首页 Hero ========== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,
    rgba(26,15,15,0.92) 0%,
    rgba(26,15,15,0.6) 40%,
    rgba(26,15,15,0.35) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 540px;
  padding: 2rem 3rem 2rem 1rem;
  text-align: right;
}
.hero-eyebrow {
  margin-bottom: 0.75rem;
}
.hero-eyebrow span {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--c-purple-soft);
  border: 1px solid rgba(139,0,255,0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(200,150,255,0.9);
  letter-spacing: 0.04em;
}
.hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 30%, rgba(255,100,100,0.9) 70%, rgba(180,80,255,0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-lead {
  font-size: 1rem;
  color: var(--c-text-muted);
  margin-bottom: 1.8rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* 弧形底边 */
.hero-arc {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  z-index: 3;
  height: 70px;
  background: var(--c-dark2);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* ========== 页面内 Hero（非首页） ========== */
.page-hero {
  position: relative;
  padding: 4rem 2rem 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 80% at 50% 110%, rgba(139,0,255,0.25) 0%, transparent 65%),
    radial-gradient(ellipse 50% 50% at 80% -10%, rgba(255,0,0,0.15) 0%, transparent 55%);
}
.page-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.page-title {
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}
.page-lead {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 640px;
  line-height: 1.6;
}
.page-date {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--c-text-dim);
}
.tag-label {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  background: var(--c-purple-soft);
  border: 1px solid rgba(139,0,255,0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  color: rgba(180,120,255,0.9);
  margin-bottom: 0.5rem;
}

/* ========== 面包屑 ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--c-text-dim);
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--c-text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--c-red); }

/* ========== 主体布局 ========== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

.content-section {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* 侧边栏在左 */
.sidebar {
  flex: 0 0 220px;
  position: sticky;
  top: 110px;
  order: -1;
}
.sidebar-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-text-dim);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  margin-top: 1.2rem;
}
.sidebar-title:first-child { margin-top: 0; }
.sidebar-links { display: flex; flex-direction: column; gap: 0.2rem; }
.sidebar-links li a {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
  color: var(--c-text-muted);
  transition: background var(--transition), color var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.sidebar-links li a:hover {
  background: var(--c-glass);
  color: #fff;
}
.sidebar-stats { display: flex; flex-direction: column; gap: 0.5rem; }
.sidebar-stats li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem;
  background: var(--c-glass);
  border-radius: 6px;
  border: 1px solid var(--c-glass-border);
  font-size: 0.82rem;
}
.sidebar-stats li strong { color: var(--c-red); font-weight: 700; }
.sidebar-stats li span { color: var(--c-text-muted); }

.main-content { flex: 1; min-width: 0; }

/* ========== 正文排版 ========== */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
}
.prose h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 2rem 0 0.8rem;
  color: #fff;
}
.prose h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.6rem;
  color: rgba(255,255,255,0.9);
}
.prose p { margin-bottom: 1rem; }
.prose a {
  color: rgba(200,100,255,0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--c-red); }
.prose ul, .prose ol { margin: 0.8rem 0 1rem 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { font-weight: 600; color: #fff; }
.prose blockquote {
  border-left: 3px solid var(--c-purple);
  padding-left: 1rem;
  margin: 1.2rem 0;
  color: var(--c-text-muted);
  font-style: italic;
}

/* ========== 文章头部 ========== */
.article-hero-wrap {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  max-height: 380px;
}
.article-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-header {
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.article-title {
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.83rem;
  color: var(--c-text-dim);
}
.pub-date, .mod-date { color: var(--c-text-dim); }
.tag-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  background: var(--c-purple-soft);
  border: 1px solid rgba(139,0,255,0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  color: rgba(180,130,255,0.9);
  transition: background var(--transition);
  min-height: 28px;
  line-height: 1.4;
}
.tag-badge:hover { background: rgba(139,0,255,0.3); }

.back-to-topic { margin-top: 2rem; }

/* ========== 章节标题 ========== */
.section-heading {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-heading span {
  position: relative;
}
.section-heading span::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--c-red), var(--c-purple));
  border-radius: 2px;
}

/* ========== 卡片网格 ========== */
.topics-section,
.articles-section,
.children-section,
.related-section,
.about-links-section { margin-top: 3rem; }

.topic-grid,
.child-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.topic-card,
.child-card,
.art-card,
.rel-card {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.topic-card h3,
.child-card h3,
.art-card h3,
.rel-card h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}
.topic-card h3 a,
.child-card h3 a,
.art-card h3 a,
.rel-card h3 a {
  color: #fff;
  transition: color var(--transition);
}
.topic-card h3 a:hover,
.child-card h3 a:hover,
.art-card h3 a:hover,
.rel-card h3 a:hover { color: var(--c-red); }
.topic-card p,
.child-card p,
.art-card p,
.rel-card p {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  flex: 1;
}
.card-meta {
  font-size: 0.78rem;
  color: var(--c-text-dim);
}
.card-read-more {
  font-size: 0.82rem;
  color: rgba(200,130,255,0.8);
  margin-top: 0.4rem;
  transition: color var(--transition);
}
.card-read-more:hover { color: var(--c-red); }

.sub-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.4rem;
}
.sub-links li a {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--transition);
}
.sub-links li a::before { content: '·'; color: var(--c-red); }
.sub-links li a:hover { color: #fff; }

/* ========== 标签列表 ========== */
.tag-list { flex-direction: row; flex-wrap: wrap; }
.tag-list li { width: auto; }
.tag-list .tag-badge { min-height: 32px; display: flex; align-items: center; }

/* ========== 页脚 ========== */
.site-footer {
  border-top: 1px solid var(--c-glass-border);
  background: rgba(15, 8, 8, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-cta {
  text-align: center;
  padding: 3rem 2rem;
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 1px solid var(--c-glass-border);
  background: linear-gradient(135deg, rgba(139,0,255,0.12), rgba(255,0,0,0.08));
}
.footer-cta-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-top: 0.5rem;
  max-width: 320px;
  line-height: 1.6;
}
.footer-tags {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.footer-tags span {
  font-size: 0.75rem;
  color: var(--c-text-dim);
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
}

.footer-nav h3 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-text-dim);
  margin-bottom: 0.75rem;
}
.footer-nav ul { display: flex; flex-direction: column; gap: 0.2rem; }
.footer-nav ul li a {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  display: block;
  padding: 0.3rem 0;
  transition: color var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.footer-nav ul li a:hover { color: var(--c-red); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.copyright { font-size: 0.82rem; color: var(--c-text-dim); }
.footer-bottom nav { display: flex; gap: 1.2rem; }
.footer-bottom nav a {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.footer-bottom nav a:hover { color: var(--c-red); }

/* ========== 隐私页面 ========== */
.privacy-footer-note {
  margin-top: 2rem;
  padding: 1.5rem;
}
.privacy-body .prose { max-width: 100%; }

/* ========== 动效：Scroll Reveal ========== */
.reveal-section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-section.is-visible {
  opacity: 1;
  transform: none;
}
.stagger-list > li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.stagger-list.is-visible > li { opacity: 1; transform: none; }
.stagger-list.is-visible > li:nth-child(1) { transition-delay: 0.05s; }
.stagger-list.is-visible > li:nth-child(2) { transition-delay: 0.1s; }
.stagger-list.is-visible > li:nth-child(3) { transition-delay: 0.15s; }
.stagger-list.is-visible > li:nth-child(4) { transition-delay: 0.2s; }
.stagger-list.is-visible > li:nth-child(5) { transition-delay: 0.25s; }
.stagger-list.is-visible > li:nth-child(6) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal-section,
  .stagger-list > li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .brand-row { padding: 0.6rem 1rem; }
  .brand-desc { display: none; }
  .main-nav { padding: 0 0.5rem; overflow-x: auto; gap: 0.1rem; }
  .main-nav menu { gap: 0; }
  .main-nav menu li > a,
  .main-nav menu li > details > summary {
    padding: 0 0.55rem;
    font-size: 0.8rem;
    height: 40px;
  }
  .nav-cta { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

  .hero-section { align-items: flex-end; justify-content: center; }
  .hero-content { text-align: center; padding: 1.5rem 1.2rem; max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-title { font-size: 1.6rem; }

  .page-hero { padding: 2.5rem 1.2rem 3.5rem; }

  main { padding: 1.5rem 1rem 2rem; }
  .content-section { flex-direction: column; }
  .sidebar { position: static; flex: none; width: 100%; order: 0; }

  .topic-grid,
  .child-grid,
  .article-list { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .footer-cta { padding: 2rem 1.2rem; }
  .footer-cta-title { font-size: 1.1rem; }
}

@media (max-width: 480px) {
  .brand-name { font-size: 1rem; }
  .hero-title { font-size: 1.4rem; }
  .article-header { padding: 1rem; }
  .topic-card, .child-card, .art-card { padding: 1rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .topic-grid,
  .child-grid { grid-template-columns: repeat(2, 1fr); }
  .sidebar { flex: 0 0 180px; }
}
