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

/* ── 基础变量 ── */
:root {
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-dark: #001e3c;
  --c-dark2: #002a52;
  --c-dark3: #003366;
  --c-text: #c8ffe8;
  --c-muted: #7ab898;
  --c-surface: rgba(0,30,60,0.85);
  --c-card: rgba(0,42,82,0.9);
  --nav-w: 220px;
  --radius: 4px;
  --shadow-card: 0 4px 24px rgba(0,255,65,0.10), 0 1px 4px rgba(0,0,0,0.4);
  --font-head: 'Bebas Neue', 'Arial Black', sans-serif;
  --font-body: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

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

/* ── 有机背景动效 ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(0,255,65,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 70%, rgba(153,255,204,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(0,30,60,1) 0%, #000d1a 100%);
  z-index: -1;
  animation: bgBreath 8s ease-in-out infinite alternate;
}
@keyframes bgBreath {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

/* ── 竖向左侧导航 ── */
.sidenav {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--nav-w);
  background: rgba(0,15,35,0.96);
  border-right: 1px solid rgba(0,255,65,0.15);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  backdrop-filter: blur(8px);
}
.sidenav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 1rem;
  border-bottom: 1px solid rgba(0,255,65,0.1);
  min-height: 70px;
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: contain;
}
.brand-mark-text {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--c-accent);
  line-height: 1;
  text-shadow: 0 0 12px rgba(0,255,65,0.6);
}
.sidenav nav { flex: 1; padding: 0.5rem 0; }
.sidenav nav ul { display: flex; flex-direction: column; gap: 0; }
.sidenav nav ul li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-muted);
  letter-spacing: 0.03em;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  min-height: 44px;
  word-break: break-all;
}
.sidenav nav ul li a:hover,
.sidenav nav ul li a.active {
  color: var(--c-primary);
  border-left-color: var(--c-accent);
  background: rgba(0,255,65,0.05);
}
.nav-icon {
  flex-shrink: 0;
  color: var(--c-accent);
  font-size: 0.7rem;
  opacity: 0.7;
}
.nav-label { line-height: 1.3; }

/* ── 主内容区 ── */
.page-wrap {
  margin-left: var(--nav-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* ── Hero ── */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  grid-template-areas: "fig text";
  min-height: 45vh;
  align-items: center;
  gap: 0;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid rgba(0,255,65,0.1);
}
.hero-figure {
  grid-area: fig;
  height: 45vh;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #001229 0%, #002040 100%);
}
.hero-figure .hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.8) saturate(1.2);
}
.hero-placeholder {
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, rgba(0,255,65,0.12) 0%, transparent 70%),
    linear-gradient(135deg, #001229 0%, #002a52 100%);
  animation: heroBreath 5s ease-in-out infinite alternate;
}
@keyframes heroBreath {
  from { opacity: 0.7; }
  to { opacity: 1; }
}
.hero-text {
  grid-area: text;
  padding: 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
.hero-text h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 1.05;
  color: var(--c-primary);
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(153,255,204,0.3);
}
.hero-desc {
  font-size: 1rem;
  color: var(--c-muted);
  max-width: 380px;
  line-height: 1.6;
}

/* ── 按钮 ── */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-primary) 100%);
  color: var(--c-dark) !important;
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  min-height: 44px;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(0,255,65,0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,255,65,0.4);
}

/* ── 眉题标签 ── */
.eyebrow-label, .card-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-accent);
  opacity: 0.85;
  margin-bottom: 0.3rem;
}

/* ── div 通用 ── */
div { padding: 3rem 2.5rem; }
.content-section { max-width: 900px; }
.topics-section, .articles-section, .children-section,
.more-articles-section, .related-section, .about-nav-section { }

/* ── prose 正文 ── */
.prose-wrap {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  max-width: 780px;
}
.prose-wrap h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--c-primary);
  margin: 2rem 0 0.8rem;
  letter-spacing: 0.06em;
}
.prose-wrap h3 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--c-primary);
  margin: 1.5rem 0 0.6rem;
}
.prose-wrap p { margin-bottom: 1rem; }
.prose-wrap ul, .prose-wrap ol {
  margin: 0.8rem 0 1rem 1.5rem;
  list-style: disc;
}
.prose-wrap li { margin-bottom: 0.4rem; }
.prose-wrap a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose-wrap strong { color: var(--c-primary); font-weight: 700; }
.prose-wrap table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; }
.prose-wrap th { background: rgba(0,255,65,0.08); color: var(--c-accent); padding: 0.6rem 0.8rem; border: 1px solid rgba(0,255,65,0.15); font-family: var(--font-head); }
.prose-wrap td { padding: 0.5rem 0.8rem; border: 1px solid rgba(0,255,65,0.08); }

/* ── 卡片网格 ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--c-card);
  border: 1px solid rgba(0,255,65,0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  overflow: hidden;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,255,65,0.18), 0 2px 8px rgba(0,0,0,0.5);
  border-color: rgba(0,255,65,0.3);
}
.card-link {
  display: block;
  height: 100%;
  color: inherit;
}
.card-body {
  padding: 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.card-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--c-primary);
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.card-desc {
  font-size: 0.88rem;
  color: var(--c-muted);
  line-height: 1.5;
  flex: 1;
}
.card-date {
  font-size: 0.78rem;
  color: var(--c-muted);
  opacity: 0.7;
}
.card-cta {
  font-size: 0.82rem;
  color: var(--c-accent);
  font-weight: 600;
  margin-top: 0.4rem;
}

/* ── h2 通用 ── */
div > h2, .children-section > h2, .more-articles-section > h2 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: var(--c-primary);
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

/* ── 页面标题区 ── */
.page-header-section, .about-header-section, .privacy-header-section,
.article-header-section {
  padding: 3rem 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,255,65,0.08);
}
.page-header-section h1, .about-header-section h1,
.privacy-header-section h1, .article-header-section h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--c-primary);
  letter-spacing: 0.05em;
  line-height: 1.05;
  margin: 0.5rem 0 0.8rem;
  text-shadow: 0 0 16px rgba(153,255,204,0.2);
}
.page-desc, .about-lead, .article-lead {
  font-size: 1.05rem;
  color: var(--c-muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ── 面包屑 ── */
.breadcrumb-aside, .article-meta-aside { margin-bottom: 0.8rem; }
.breadcrumb-nav, .breadcrumb-aside nav {
  font-size: 0.82rem;
  color: var(--c-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  min-height: 44px;
  align-items: center;
}
.breadcrumb-nav a, .breadcrumb-aside nav a { color: var(--c-accent); }
.article-date, .article-date-mod {
  display: block;
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-top: 0.4rem;
}

/* ── Article 布局 ── */
.article-body-section {
  padding: 2.5rem 2.5rem;
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-areas:
    "deco deco"
    "sidebar content";
  gap: 1.5rem 2rem;
}
.article-deco { grid-area: deco; }
.article-sidebar { grid-area: sidebar; }
.article-content { grid-area: content; }

.sidebar-inner {
  position: sticky;
  top: 1.5rem;
  background: rgba(0,20,50,0.7);
  border: 1px solid rgba(0,255,65,0.1);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
}
.sidebar-links { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; }
.sidebar-links li a {
  font-size: 0.85rem;
  color: var(--c-muted);
  padding: 0.3rem 0;
  display: block;
  transition: color var(--transition);
  min-height: 32px;
  display: flex;
  align-items: center;
}
.sidebar-links li a:hover { color: var(--c-primary); }
.article-hero-wrap { margin-bottom: 1rem; }
.article-hero-wrap .hero-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ── Topic children ── */
.children-section {
  padding: 2.5rem;
}
.children-section > section + section { margin-top: 1.2rem; }
.children-section section.card {
  max-width: 760px;
}

/* ── Related ── */
.related-aside, .about-links-aside, .privacy-aside {
  margin-top: 1rem;
}
.related-list { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.5rem; }
.related-list li a {
  display: inline-block;
  padding: 0.45rem 1rem;
  background: rgba(0,255,65,0.07);
  border: 1px solid rgba(0,255,65,0.15);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--c-primary);
  transition: all var(--transition);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.related-list li a:hover {
  background: rgba(0,255,65,0.15);
  border-color: var(--c-accent);
}

/* ── About ── */
.about-topic-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.8rem; }
.about-topic-list li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.95rem;
  color: var(--c-primary);
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0,255,65,0.07);
  transition: color var(--transition);
}
.about-topic-list li a:hover { color: var(--c-accent); }
.about-blob, .privacy-deco, .header-blob { overflow: visible; }
.about-blob svg, .privacy-deco svg, .header-blob svg {
  width: 100%; max-width: 300px;
  position: absolute; right: 2rem; top: 0;
  opacity: 0.4;
  pointer-events: none;
}
.about-intro-aside { position: relative; z-index: 1; }

/* ── Privacy ── */
.privacy-body-section {
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  grid-template-areas:
    "deco deco"
    "aside content";
  gap: 1.5rem 2rem;
}
.privacy-body-section .section-deco { grid-area: deco; }
.privacy-body-section .privacy-aside { grid-area: aside; }
.privacy-body-section .privacy-prose { grid-area: content; }
.privacy-aside { padding-top: 0.5rem; }

/* ── SVG decorations ── */
.blob-divider, .blob-header, .blob-about, .cell-svg {
  width: 100%; max-height: 80px; display: block;
}
.section-deco { margin-bottom: 1rem; }
.article-deco .cell-svg { max-width: 80px; max-height: 80px; float: right; margin-left: 1rem; opacity: 0.4; }

/* ── 页脚 ── */
footer {
  padding: 1.5rem 2.5rem;
  border-top: 1px solid rgba(0,255,65,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: rgba(0,10,28,0.9);
}
.footer-copy {
  font-size: 0.85rem;
  color: var(--c-muted);
}
.footer-copy a { color: var(--c-accent); }
footer small {
  font-size: 0.75rem;
  color: var(--c-muted);
  opacity: 0.65;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── 响应式 ── */
@media (max-width: 900px) {
  :root { --nav-w: 180px; }
  .hero-text { padding: 1.5rem 1.5rem; }
  .hero-text h1 { font-size: 1.8rem; }
  .article-body-section {
    grid-template-columns: 1fr;
    grid-template-areas: "deco" "content" "sidebar";
  }
  .sidebar-inner { position: static; }
  .privacy-body-section {
    grid-template-columns: 1fr;
    grid-template-areas: "deco" "content" "aside";
  }
}

@media (max-width: 700px) {
  :root { --nav-w: 0px; }
  .sidenav {
    position: fixed;
    left: -260px;
    width: 260px;
    transition: left 0.3s ease;
    z-index: 200;
  }
  .sidenav.open { left: 0; }
  .page-wrap { margin-left: 0; }

  .mobile-nav-toggle {
    display: flex;
  }

  .hero-section {
    grid-template-columns: 1fr;
    grid-template-areas: "fig" "text";
    min-height: auto;
  }
  .hero-figure { height: 40vw; min-height: 160px; }
  .hero-text { padding: 1.5rem 1rem; }

  div { padding: 2rem 1rem; }
  .page-header-section, .about-header-section, .privacy-header-section, .article-header-section {
    padding: 2rem 1rem 1.5rem;
  }
  .children-section { padding: 1.5rem 1rem; }
  footer { padding: 1.2rem 1rem; flex-direction: column; align-items: flex-start; }
  .cards-grid { grid-template-columns: 1fr; }
}

/* ── 移动端导航按钮 ── */
.mobile-nav-toggle {
  display: none;
  position: fixed;
  top: 0.8rem; left: 0.8rem;
  z-index: 300;
  background: var(--c-dark2);
  border: 1px solid rgba(0,255,65,0.25);
  border-radius: var(--radius);
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}
.mobile-nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--c-accent);
  border-radius: 1px;
  transition: all 0.25s;
}
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
}
.mobile-overlay.active { display: block; }

@media (max-width: 700px) {
  .mobile-nav-toggle { display: flex; }
}
