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

/* ===== 基础变量 ===== */
:root {
  --c-primary: #6514ff;
  --c-accent: #bf00ff;
  --c-dark: #1c1726;
  --c-dark2: #251e33;
  --c-dark3: #2e2540;
  --c-light: #f0ebff;
  --c-text: #e8e0ff;
  --c-muted: #9b8fc0;
  --c-white: #ffffff;
  --nav-w: 240px;
  --gap: 48px;
  --radius: 10px;
  --trans: 200ms ease;
  --font-head: 'Space Grotesk', 'DM Sans', system-ui, sans-serif;
  --font-body: 'DM Sans', 'Space Grotesk', system-ui, sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-dark);
  color: var(--c-text);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, menu { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ===== 动画背景图案 ===== */
@keyframes patternMove {
  0% { background-position: 0 0; }
  100% { background-position: 60px 60px; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes stagger {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.3; }
}

/* ===== 页面外壳 ===== */
.page-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ===== 左侧导航 details/summary 结构 ===== */
.sidenav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-dark2);
  border-right: 1px solid rgba(101,20,255,0.3);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* details 默认展开 (桌面) */
.sidenav[open],
.sidenav {
  display: flex;
}

.sidenav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(101,20,255,0.2);
  list-style: none;
  user-select: none;
}
.sidenav-toggle::-webkit-details-marker { display: none; }

.nav-brand {
  display: flex;
  align-items: center;
}
.logo-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--c-primary);
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius);
  letter-spacing: 1px;
}
.site-logo-img {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
}

.hamburger-icon {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger-icon span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: var(--trans);
}

/* 导航菜单 */
.sidenav-menu {
  padding: 16px 0;
  flex: 1;
}
.sidenav-menu li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  font-size: 14px;
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--c-muted);
  border-left: 3px solid transparent;
  transition: color var(--trans), background var(--trans), border-color var(--trans);
  min-height: 44px;
  line-height: 1.4;
}
.sidenav-menu li a:hover,
.sidenav-menu li a[aria-current="page"] {
  color: var(--c-white);
  background: rgba(101,20,255,0.15);
  border-left-color: var(--c-primary);
}

/* 搜索框 (导航内) */
.sidenav::after {
  content: '';
  display: none;
}

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

/* 内容+侧边栏水平布局 */
.main-content > main,
.main-content > .wrap {
  flex: 1;
}

/* aside 在右侧 */
.main-content {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}
.main-content > main {
  flex: 1 1 0;
  min-width: 0;
}
.main-content > .cat-hero,
.main-content > .tag-hero,
.main-content > .about-hero,
.main-content > .article-hero-wrap,
.main-content > .hero-section {
  flex: 0 0 100%;
  width: 100%;
}

/* 把 main 和 aside 放同一行 */
.main-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
}
.main-content > .hero-section,
.main-content > .cat-hero,
.main-content > .tag-hero,
.main-content > .about-hero,
.main-content > .article-hero-wrap {
  grid-column: 1 / -1;
}
.main-content > main {
  grid-column: 1;
  min-width: 0;
}
.main-content > aside {
  grid-column: 2;
  grid-row: 2;
}
.main-content > footer {
  grid-column: 1 / -1;
}

/* ===== wrap / main 内容约束 ===== */
main > .wrap {
  padding: var(--gap) 40px;
  max-width: 860px;
}

/* ===== Hero 区 (首页) ===== */
.hero-section {
  position: relative;
  height: 70vh;
  min-height: 480px;
  overflow: hidden;
  background: var(--c-dark);
}
.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-dark) 30%, rgba(101,20,255,0.4) 70%, rgba(191,0,255,0.3) 100%);
}
.hero-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 58px,
    rgba(101,20,255,0.08) 58px,
    rgba(101,20,255,0.08) 60px
  ), repeating-linear-gradient(
    90deg,
    transparent,
    transparent 58px,
    rgba(191,0,255,0.06) 58px,
    rgba(191,0,255,0.06) 60px
  );
  animation: patternMove 4s linear infinite;
}
.hero-bg-text {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(80px, 18vw, 200px);
  color: transparent;
  -webkit-text-stroke: 2px rgba(101,20,255,0.25);
  letter-spacing: -4px;
  user-select: none;
  pointer-events: none;
  animation: pulse 3s ease-in-out infinite;
}
.hero-copy {
  position: relative;
  z-index: 2;
  text-align: right;
  padding: 0 60px 0 0;
  max-width: 600px;
  animation: fadeUp 0.6s ease both;
}
.hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.hero-copy h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  color: var(--c-white);
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 17px;
  color: var(--c-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}
.hero-btn {
  display: inline-block;
  padding: 14px 32px;
  background: var(--c-primary);
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius);
  border-bottom: 4px solid rgba(0,0,0,0.3);
  transition: background var(--trans), transform var(--trans);
  min-height: 44px;
}
.hero-btn:hover {
  background: var(--c-accent);
  transform: translateY(-2px);
}

/* ===== 分类卡片网格 ===== */
.cat-section {
  margin-bottom: var(--gap);
}
.cat-section h2,
.articles-section h2,
.child-list-section h2 {
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 6px;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 28px;
}
.cat-card {
  background: var(--c-dark2);
  border-radius: var(--radius);
  border: 1px solid rgba(101,20,255,0.2);
  border-bottom: 4px solid var(--c-primary);
  padding: 28px 24px 24px;
  position: relative;
  overflow: hidden;
  transition: transform var(--trans), border-bottom-color var(--trans), box-shadow var(--trans);
  animation: fadeUp 0.5s ease both;
  animation-delay: calc(var(--card-index, 0) * 80ms);
}
.cat-card:hover {
  transform: translateY(-4px);
  border-bottom-color: var(--c-accent);
  box-shadow: 0 12px 40px rgba(101,20,255,0.3);
}
.card-num {
  display: block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--c-primary);
  margin-bottom: 10px;
}
.cat-card h3 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 8px;
  line-height: 1.3;
}
.cat-card h3 a { color: inherit; }
.cat-card p {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  letter-spacing: 0.5px;
  transition: color var(--trans);
}
.card-link:hover { color: var(--c-white); }

/* ===== 文章列表 ===== */
.articles-section {
  margin-bottom: var(--gap);
}
.article-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.article-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(101,20,255,0.15);
  animation: stagger 0.4s ease both;
}
.article-item:last-child { border-bottom: none; }
.art-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  background: rgba(101,20,255,0.2);
  color: var(--c-accent);
  padding: 3px 8px;
  border-radius: 4px;
}
.article-item a {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--c-text);
  transition: color var(--trans);
}
.article-item a:hover { color: var(--c-accent); }
.article-item time {
  font-size: 13px;
  color: var(--c-muted);
  flex-shrink: 0;
}

/* ===== 正文 prose ===== */
.prose {
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-text);
}
.prose h2 {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 700;
  color: var(--c-white);
  margin: 2.4em 0 0.6em;
  padding-left: 14px;
  border-left: 4px solid var(--c-primary);
}
.prose h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-white);
  margin: 1.8em 0 0.5em;
}
.prose p { margin-bottom: 1.2em; }
.prose a {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--trans);
}
.prose a:hover { color: var(--c-white); }
.prose ul, .prose ol {
  padding-left: 1.6em;
  margin-bottom: 1.2em;
}
.prose li { margin-bottom: 0.5em; }
.prose strong { color: var(--c-white); font-weight: 700; }
.prose blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(191,0,255,0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose code {
  background: rgba(101,20,255,0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.prose img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}

/* ===== subtitle (h2 + p.subtitle) ===== */
.subtitle {
  font-size: 15px;
  color: var(--c-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ===== 日期 ===== */
.pub-date, .mod-date {
  display: inline-block;
  font-size: 13px;
  color: var(--c-muted);
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}
.mod-date { margin-left: 12px; }

/* ===== 侧边栏 ===== */
.sidebar {
  width: 280px;
  padding: 40px 20px 40px 0;
  flex-shrink: 0;
}
.sidebar-block {
  background: var(--c-dark2);
  border-radius: var(--radius);
  border: 1px solid rgba(101,20,255,0.2);
  border-bottom: 4px solid var(--c-primary);
  padding: 22px 20px 18px;
  margin-bottom: 20px;
}
.sidebar-block h2 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 4px;
}
.sidebar-block .subtitle {
  font-size: 13px;
  margin-bottom: 14px;
}
.sidebar-links li { margin-bottom: 6px; }
.sidebar-links a {
  display: block;
  font-size: 14px;
  color: var(--c-muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color var(--trans), background var(--trans);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.sidebar-links a:hover {
  color: var(--c-white);
  background: rgba(101,20,255,0.15);
}

/* ===== 标签云 ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-pill {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(101,20,255,0.18);
  border: 1px solid rgba(101,20,255,0.35);
  color: var(--c-light);
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  transition: background var(--trans), color var(--trans);
  min-height: 32px;
  line-height: 1.4;
}
.tag-pill:hover, .tag-pill.active {
  background: var(--c-primary);
  color: var(--c-white);
  border-color: var(--c-primary);
}

/* ===== 使用步骤 ===== */
.use-steps {
  padding-left: 1.4em;
  counter-reset: step;
}
.use-steps li {
  font-size: 14px;
  color: var(--c-muted);
  margin-bottom: 8px;
  counter-increment: step;
  line-height: 1.5;
}

/* ===== 分类页 Hero ===== */
.cat-hero {
  position: relative;
  padding: 60px 48px 48px;
  background: linear-gradient(135deg, var(--c-dark2) 0%, rgba(101,20,255,0.2) 100%);
  border-bottom: 1px solid rgba(101,20,255,0.2);
  overflow: hidden;
}
.cat-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.cat-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-accent);
  background: rgba(191,0,255,0.15);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.cat-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 10px;
  line-height: 1.15;
}
.cat-desc {
  font-size: 16px;
  color: var(--c-muted);
  max-width: 500px;
}
.cat-hero-deco {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: clamp(60px, 12vw, 120px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px rgba(101,20,255,0.2);
  user-select: none;
  pointer-events: none;
}

/* ===== 子页 table ===== */
.child-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid rgba(101,20,255,0.2);
  margin-top: 20px;
}
.child-table {
  min-width: 600px;
}
.child-table thead {
  background: rgba(101,20,255,0.2);
}
.child-table th {
  padding: 14px 16px;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-accent);
  text-align: left;
  letter-spacing: 0.5px;
}
.child-table tbody tr {
  border-top: 1px solid rgba(101,20,255,0.1);
  transition: background var(--trans);
  animation: fadeUp 0.4s ease both;
}
.child-table tbody tr:hover {
  background: rgba(101,20,255,0.08);
}
.child-table td {
  padding: 14px 16px;
  font-size: 15px;
  vertical-align: top;
}
.td-num {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary);
  width: 50px;
}
.td-title a {
  color: var(--c-text);
  font-weight: 500;
  transition: color var(--trans);
}
.td-title a:hover { color: var(--c-accent); }
.td-desc { color: var(--c-muted); font-size: 14px; }
.td-date { color: var(--c-muted); font-size: 13px; white-space: nowrap; }
.child-thumb { width: 60px; height: 40px; object-fit: cover; border-radius: 6px; margin-top: 6px; }

/* ===== 文章页 ===== */
.article-hero-wrap {
  position: relative;
  height: 300px;
  overflow: hidden;
}
.article-hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, var(--c-dark) 100%);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.breadcrumb-link {
  font-size: 13px;
  color: var(--c-muted);
  transition: color var(--trans);
}
.breadcrumb-link:hover { color: var(--c-accent); }
.breadcrumb-sep {
  color: var(--c-muted);
  font-size: 13px;
}
.article-lead {
  font-size: 18px;
  color: var(--c-muted);
  margin-bottom: 28px;
  line-height: 1.6;
  font-style: italic;
}
.article-footer-tags {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(101,20,255,0.15);
}
.parent-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  background: rgba(191,0,255,0.1);
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background var(--trans);
  min-height: 32px;
  line-height: 1.5;
}
.parent-link:hover { background: rgba(191,0,255,0.2); }

/* ===== 标签页 ===== */
.tag-hero {
  padding: 56px 48px 40px;
  background: linear-gradient(135deg, var(--c-dark2), rgba(191,0,255,0.15));
  border-bottom: 1px solid rgba(191,0,255,0.2);
}
.tag-label-hero {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.tag-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 8px;
}
.tag-hero p {
  font-size: 16px;
  color: var(--c-muted);
}
.tag-child-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.tag-child-card {
  background: var(--c-dark2);
  border-radius: var(--radius);
  border: 1px solid rgba(101,20,255,0.2);
  border-bottom: 4px solid var(--c-accent);
  padding: 22px 20px 18px;
  animation: fadeUp 0.5s ease both;
  animation-delay: calc(var(--card-index, 0) * 60ms);
  transition: transform var(--trans);
}
.tag-child-card:hover { transform: translateY(-3px); }
.tag-child-card .card-num {
  color: var(--c-accent);
}
.tag-child-card h3 {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 8px;
  line-height: 1.35;
}
.tag-child-card h3 a { color: inherit; }
.tag-child-card h3 a:hover { color: var(--c-accent); }
.tag-child-card p { font-size: 14px; color: var(--c-muted); margin-bottom: 10px; }
.tag-child-card time { font-size: 12px; color: var(--c-muted); }

/* ===== 关于页 ===== */
.about-hero {
  position: relative;
  padding: 70px 48px 56px;
  background: linear-gradient(135deg, var(--c-dark2) 0%, rgba(101,20,255,0.25) 100%);
  overflow: hidden;
  border-bottom: 1px solid rgba(101,20,255,0.2);
}
.about-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700;
  color: var(--c-white);
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
}
.about-tagline {
  font-size: 17px;
  color: var(--c-muted);
  position: relative;
  z-index: 2;
  max-width: 480px;
}
.about-hero-deco {
  position: absolute;
  right: 30px;
  bottom: -10px;
  font-family: var(--font-head);
  font-size: clamp(80px, 16vw, 160px);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 2px rgba(101,20,255,0.18);
  user-select: none;
  pointer-events: none;
}
.about-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.about-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  background: var(--c-primary);
  color: var(--c-white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius);
  border-bottom: 4px solid rgba(0,0,0,0.25);
  min-height: 44px;
  transition: background var(--trans), transform var(--trans);
}
.about-link-btn:hover {
  background: var(--c-accent);
  transform: translateY(-2px);
}
.about-link-btn.secondary {
  background: rgba(101,20,255,0.25);
  border-bottom-color: rgba(101,20,255,0.4);
}
.about-link-btn.secondary:hover { background: rgba(101,20,255,0.4); }

/* ===== 隐私页 ===== */
.privacy-header {
  margin-bottom: 28px;
}
.privacy-header h1 {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 10px;
}
.privacy-back {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ===== content-section (首页正文) ===== */
.content-section {
  margin-bottom: var(--gap);
  padding: 32px;
  background: var(--c-dark2);
  border-radius: var(--radius);
  border-left: 4px solid var(--c-primary);
}

/* ===== 页脚 ===== */
footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 40px;
  background: var(--c-dark2);
  border-top: 1px solid rgba(101,20,255,0.2);
}
.footer-brand {
  flex: 0 0 auto;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-white);
  display: block;
  margin-bottom: 4px;
}
.footer-brand p {
  font-size: 13px;
  color: var(--c-muted);
  max-width: 280px;
  line-height: 1.5;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  flex: 1;
  justify-content: center;
}
.footer-nav a {
  font-size: 13px;
  color: var(--c-muted);
  transition: color var(--trans);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
}
.footer-nav a:hover { color: var(--c-accent); }
.footer-copy {
  flex: 0 0 100%;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid rgba(101,20,255,0.1);
}
.footer-copy p {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.6;
}

/* ===== 滚动揭示动画 ===== */
@media (prefers-reduced-motion: no-preference) {
  .cat-card, .article-item, .tag-child-card, .child-table tbody tr {
    animation-play-state: running;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 响应式断点 ===== */
@media (max-width: 1100px) {
  .main-content {
    grid-template-columns: 1fr 240px;
  }
  .sidebar { width: 240px; }
  main > .wrap { padding: 40px 28px; }
}

@media (max-width: 860px) {
  :root { --nav-w: 0px; }

  .main-content {
    grid-template-columns: 1fr;
    margin-left: 0;
  }
  .main-content > aside {
    grid-column: 1;
    grid-row: auto;
  }

  .page-shell { flex-direction: column; }

  /* 侧边导航：收起时只显示 summary，展开时显示菜单 */
  .sidenav {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid rgba(101,20,255,0.3);
  }
  .sidenav:not([open]) .sidenav-menu {
    display: none;
  }
  .sidenav[open] .sidenav-menu {
    display: block;
  }
  .hamburger-icon { display: flex; }

  .main-content {
    margin-left: 0;
  }

  .sidebar {
    width: 100%;
    padding: 20px 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
  }

  main > .wrap { padding: 28px 20px; }

  .hero-copy { padding: 0 20px; text-align: left; }
  .hero-inner { justify-content: flex-start; padding: 0 20px; }
  .hero-bg-text { font-size: 60px; opacity: 0.15; }

  .cat-hero { padding: 40px 20px 32px; }
  .cat-hero-deco { display: none; }
  .about-hero { padding: 48px 20px 36px; }
  .about-hero-deco { display: none; }
  .tag-hero { padding: 40px 20px 28px; }

  footer {
    padding: 24px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-nav { justify-content: flex-start; }

  .child-table th, .child-table td { padding: 10px 12px; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
  .tag-child-grid { grid-template-columns: 1fr; }
  .hero-section { height: auto; min-height: 360px; }
  .hero-inner { padding: 48px 20px; align-items: flex-end; }
  .hero-copy { max-width: 100%; }
  .about-links, .privacy-back { flex-direction: column; }
  main > .wrap { max-width: 100%; }
  .sidenav-menu li a { padding: 14px 20px; }
}
