@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');

/* ===== 根变量 ===== */
:root {
  --c-green: #87ff71;
  --c-blue: #01cdfe;
  --c-dark: #192617;
  --c-dark2: #0f1a0e;
  --c-dark3: #1e3019;
  --c-purple: #b967ff;
  --c-pink: #ff71ce;
  --c-text: #d4f5c8;
  --c-text-muted: #7aab6e;
  --c-border: rgba(135, 255, 113, 0.18);
  --c-card: rgba(255,255,255,0.04);
  --nav-h: 64px;
  --radius: 10px;
  --font-main: 'Outfit', 'Work Sans', system-ui, sans-serif;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --glow-green: 0 0 12px rgba(135,255,113,0.55), 0 0 40px rgba(135,255,113,0.18);
  --glow-blue: 0 0 12px rgba(1,205,254,0.55), 0 0 40px rgba(1,205,254,0.18);
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background-color: var(--c-dark2);
  color: var(--c-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-green); }
ol, ul { list-style: none; }

/* ===== 扫描线全局叠加 ===== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.06) 2px,
    rgba(0,0,0,0.06) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ===== 网格背景 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(135,255,113,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135,255,113,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ===== 导航 ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(15,26,14,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
  padding: 0 24px;
}

.nav-left, .nav-right {
  flex: 1;
}
.nav-left ol { display: flex; gap: 4px; justify-content: flex-end; }
.nav-right ol { display: flex; gap: 4px; justify-content: flex-start; }

.site-nav ol li a {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-text-muted);
  letter-spacing: 0.03em;
  border-radius: 6px;
  white-space: nowrap;
  min-height: 40px;
  transition: color var(--transition), background var(--transition), text-shadow var(--transition);
}
.site-nav ol li a:hover {
  color: var(--c-green);
  background: rgba(135,255,113,0.08);
  text-shadow: var(--glow-green);
}

.nav-brand {
  flex-shrink: 0;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  padding: 0 28px;
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: text-shadow var(--transition);
}
.nav-brand:hover {
  color: var(--c-green);
  text-shadow: 0 0 24px rgba(135,255,113,0.9), 0 0 60px rgba(135,255,113,0.35);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.82rem;
  color: var(--c-text-muted);
  margin-bottom: 16px;
}
.breadcrumb li::after { content: '›'; margin-left: 8px; color: var(--c-border); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-green); }

/* ===== 页面包装 ===== */
.page-home, .page-topic, .page-article, .page-tag,
.page-about, .page-privacy, .page-default {
  position: relative;
  z-index: 1;
}

/* ===== HERO ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, #0f1a0e 0%, #192617 40%, #0a1a1f 100%);
}

.hero-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(1,205,254,0.03) 3px,
    rgba(1,205,254,0.03) 6px
  );
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(1,205,254,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1,205,254,0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(20deg);
  transform-origin: bottom;
  pointer-events: none;
  opacity: 0.6;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-dark2);
  background: linear-gradient(90deg, var(--c-green), var(--c-blue));
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #fff;
  text-shadow:
    0 0 20px rgba(135,255,113,0.5),
    0 0 60px rgba(1,205,254,0.25);
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-tags {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag-chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--c-blue);
  border: 1px solid rgba(1,205,254,0.4);
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  transition: background var(--transition), box-shadow var(--transition);
}
.tag-chip:hover {
  background: rgba(1,205,254,0.12);
  box-shadow: var(--glow-blue);
}

.hero-figure {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-figure .hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: hue-rotate(120deg) saturate(1.5);
}

/* ===== main 布局（含 aside 左侧） ===== */
.main-hero { position: relative; }

.main-body,
.topic-body-section,
.article-body-section,
.tag-body-section,
.about-body-section,
.privacy-body-section,
.default-body-section {
  display: flex;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.home-aside,
.topic-aside,
.article-aside,
.tag-aside,
.about-aside,
.privacy-aside,
.default-aside {
  width: 240px;
  flex-shrink: 0;
  padding: 28px 20px;
  border-right: 1px solid var(--c-border);
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  align-self: flex-start;
  max-height: calc(100vh - var(--nav-h) - 40px);
  overflow-y: auto;
}

.home-aside h2,
.topic-aside h2,
.article-aside h2,
.tag-aside h2,
.about-aside h2,
.privacy-aside h2,
.default-aside h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  margin-bottom: 4px;
}

.home-aside .subtitle,
.topic-aside .subtitle,
.article-aside .subtitle,
.tag-aside .subtitle,
.about-aside .subtitle,
.privacy-aside .subtitle,
.default-aside .subtitle {
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-bottom: 14px;
}

.home-aside ul li a,
.topic-aside ul li a,
.article-aside ul li a,
.tag-aside ul li a,
.about-aside ul li a,
.privacy-aside ul li a,
.default-aside ul li a {
  display: flex;
  align-items: center;
  padding: 9px 0;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  border-bottom: 1px solid rgba(135,255,113,0.06);
  min-height: 40px;
  transition: color var(--transition), padding-left var(--transition);
}
.home-aside ul li a:hover,
.topic-aside ul li a:hover,
.article-aside ul li a:hover,
.tag-aside ul li a:hover,
.about-aside ul li a:hover,
.privacy-aside ul li a:hover,
.default-aside ul li a:hover {
  color: var(--c-green);
  padding-left: 6px;
}

/* aside 分块 */
.aside-block { margin-bottom: 28px; }
.aside-block:last-child { margin-bottom: 0; }

/* ===== 主内容区 ===== */
.main-content-area,
.topic-main,
.article-main,
.tag-main,
.about-main,
.privacy-main,
.default-main {
  flex: 1;
  min-width: 0;
  padding-left: 40px;
}

/* ===== article 通用 ===== */
.topics-section,
.recent-section,
.children-section,
.tag-articles-section {
  margin-top: 48px;
}

/* ===== h2 + subtitle ===== */
h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  text-shadow: var(--glow-green);
}
p.subtitle, p.subhead, p.desc, p.lead {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ===== 话题头部 ===== */
.topic-header-section,
.tag-header-section,
.about-header-section,
.privacy-header-section,
.article-intro-section,
.default-header-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.topic-eyebrow, .tag-eyebrow, .about-eyebrow, .privacy-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-blue);
  text-shadow: var(--glow-blue);
  margin-bottom: 10px;
}

.topic-header-section h1,
.tag-header-section h1,
.about-header-section h1,
.privacy-header-section h1,
.article-intro-section h1,
.default-header-section h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 20px rgba(135,255,113,0.3);
  margin-bottom: 10px;
  line-height: 1.2;
}

.topic-header-section p.subtitle,
.tag-header-section p.subtitle,
.about-header-section p.subtitle,
.privacy-header-section p.subtitle {
  font-size: 1rem;
  color: var(--c-text-muted);
  margin-bottom: 20px;
}

/* ===== 卡片网格 ===== */
.topics-grid,
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.topic-card,
.article-card {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1px solid var(--c-border);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.topic-card:hover,
.article-card:hover {
  transform: translateY(-3px);
  border-color: rgba(135,255,113,0.4);
  box-shadow: 0 8px 32px rgba(135,255,113,0.12);
}
.topic-card a,
.article-card a {
  color: inherit;
  display: block;
}
.topic-card h3,
.article-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-green);
  margin-bottom: 8px;
  line-height: 1.4;
}
.topic-card p,
.article-card p {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}
.article-card time {
  font-size: 0.75rem;
  color: var(--c-blue);
}

/* ===== 子页列表（ul > li > div 结构） ===== */
.child-list,
.tag-articles-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.child-article,
.tag-article-card {
  background: var(--c-card);
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--c-border);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.child-article:hover,
.tag-article-card:hover {
  border-color: rgba(1,205,254,0.4);
  box-shadow: 0 4px 24px rgba(1,205,254,0.1);
}
.child-article h3,
.tag-article-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.child-article h3 a,
.tag-article-card h3 a {
  color: var(--c-blue);
}
.child-article h3 a:hover,
.tag-article-card h3 a:hover {
  color: var(--c-green);
}
.child-article p,
.tag-article-card p {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-bottom: 6px;
}
.child-article time,
.tag-article-card time {
  font-size: 0.75rem;
  color: var(--c-blue);
}

/* ===== 文章详情 ===== */
.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 10px 0 20px;
}
.article-meta time {
  font-size: 0.8rem;
  color: var(--c-blue);
}
.article-hero-figure {
  margin: 20px 0 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
}
.article-hero-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  filter: saturate(1.2);
}

/* ===== figure 容器 ===== */
.topic-content-figure,
.article-content-figure,
.tag-content-figure,
.about-content-figure,
.privacy-content-figure,
.default-content-figure {
  display: block;
  margin: 0 0 32px;
}

/* ===== 正文排版 ===== */
.page-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
  max-width: 72ch;
}
.page-content h2 { margin-top: 2em; margin-bottom: 0.4em; }
.page-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-blue);
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  text-shadow: var(--glow-blue);
}
.page-content p { margin-bottom: 1.1em; }
.page-content ul, .page-content ol {
  padding-left: 1.4em;
  margin-bottom: 1.1em;
}
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li { margin-bottom: 0.4em; }
.page-content a { color: var(--c-blue); border-bottom: 1px solid rgba(1,205,254,0.3); }
.page-content a:hover { color: var(--c-green); border-color: rgba(135,255,113,0.5); }
.page-content strong { color: var(--c-green); font-weight: 600; }
.page-content code {
  font-family: 'Courier New', monospace;
  background: rgba(135,255,113,0.1);
  color: var(--c-green);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.page-content blockquote {
  border-left: 3px solid var(--c-blue);
  padding: 10px 16px;
  margin: 1.2em 0;
  background: rgba(1,205,254,0.05);
  border-radius: 0 6px 6px 0;
  color: var(--c-text-muted);
}

/* ===== 文章内 aside 标签 ===== */
.article-tags-aside,
.tag-links-aside,
.about-extra-aside,
.privacy-links-aside,
.default-extra-aside {
  margin-top: 32px;
  padding: 22px 20px;
  background: var(--c-card);
  border-radius: var(--radius);
  border: 1px solid var(--c-border);
}
.article-tags-aside h2,
.tag-links-aside h2,
.about-extra-aside h2,
.privacy-links-aside h2,
.default-extra-aside h2 {
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.article-tags-aside ul li,
.tag-links-aside ul li,
.about-extra-aside ul li,
.privacy-links-aside ul li,
.default-extra-aside ul li {
  border-bottom: 1px solid var(--c-border);
}
.article-tags-aside ul li a,
.tag-links-aside ul li a,
.about-extra-aside ul li a,
.privacy-links-aside ul li a,
.default-extra-aside ul li a {
  display: block;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.article-tags-aside ul li a:hover,
.tag-links-aside ul li a:hover,
.about-extra-aside ul li a:hover,
.privacy-links-aside ul li a:hover,
.default-extra-aside ul li a:hover {
  color: var(--c-green);
}

/* ===== article content 包裹 ===== */
.article-content-section,
.topic-content-section,
.tag-content-section,
.about-content-section,
.privacy-content-section,
.default-content-section {
  display: block;
}

/* ===== 日期 ===== */
.date-pub, .date-mod {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.date-pub::before { content: '📅 '; }

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--c-border);
  background: var(--c-dark2);
  margin-top: 40px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-col h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-green);
  text-shadow: var(--glow-green);
  margin-bottom: 14px;
}

.footer-brand {
  font-style: normal;
  color: var(--c-text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.footer-brand strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-green);
  margin-bottom: 8px;
}

.footer-col ul li a {
  display: flex;
  align-items: center;
  padding: 5px 0;
  font-size: 0.85rem;
  color: var(--c-text-muted);
  min-height: 32px;
  transition: color var(--transition), padding-left var(--transition);
}
.footer-col ul li a:hover {
  color: var(--c-green);
  padding-left: 4px;
}

.footer-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px;
  border-top: 1px solid var(--c-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bar span {
  font-size: 0.8rem;
  color: var(--c-text-muted);
}
.footer-bar ul {
  display: flex;
  gap: 16px;
}
.footer-bar ul li a {
  font-size: 0.8rem;
  color: var(--c-text-muted);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.footer-bar ul li a:hover { color: var(--c-green); }

/* ===== Reveal 动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ===== 霓虹发光按钮装饰 ===== */
.neon-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: box-shadow var(--transition), transform var(--transition);
  min-height: 44px;
}
.neon-btn-green {
  background: linear-gradient(90deg, var(--c-green), #4aff28);
  color: var(--c-dark2);
}
.neon-btn-green:hover {
  box-shadow: var(--glow-green);
  transform: translateY(-2px);
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .home-aside,
  .topic-aside,
  .article-aside,
  .tag-aside,
  .about-aside,
  .privacy-aside,
  .default-aside {
    width: 200px;
  }
  .main-content-area,
  .topic-main,
  .article-main,
  .tag-main,
  .about-main,
  .privacy-main,
  .default-main {
    padding-left: 28px;
  }
}

@media (max-width: 768px) {
  .site-nav {
    padding: 0 12px;
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
  }
  .nav-brand {
    order: -1;
    width: 100%;
    justify-content: center;
    padding: 12px 0 4px;
    font-size: 1rem;
  }
  .nav-left, .nav-right {
    flex: 1;
  }
  .nav-left ol, .nav-right ol {
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }
  .site-nav ol li a {
    font-size: 0.75rem;
    padding: 8px 9px;
    min-height: 40px;
  }

  .main-body,
  .topic-body-section,
  .article-body-section,
  .tag-body-section,
  .about-body-section,
  .privacy-body-section,
  .default-body-section {
    flex-direction: column;
    padding: 28px 16px 60px;
  }

  .home-aside,
  .topic-aside,
  .article-aside,
  .tag-aside,
  .about-aside,
  .privacy-aside,
  .default-aside {
    width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--c-border);
    padding: 20px 0;
    overflow: visible;
  }

  .main-content-area,
  .topic-main,
  .article-main,
  .tag-main,
  .about-main,
  .privacy-main,
  .default-main {
    padding-left: 0;
    padding-top: 24px;
  }

  .topics-grid, .articles-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 32px 16px 24px;
  }

  .footer-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .hero-section {
    min-height: 70vh;
    padding: 60px 16px 40px;
  }

  .topic-header-section,
  .tag-header-section,
  .about-header-section,
  .privacy-header-section,
  .article-intro-section,
  .default-header-section {
    padding: 32px 16px 0;
  }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .breadcrumb { flex-wrap: wrap; }
  .hero-tags { gap: 8px; }
  .article-meta { gap: 10px; }
}
