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

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

:root {
  --green: #80ff00;
  --green2: #00ff00;
  --dark: #1f2617;
  --dark2: #161c0e;
  --dark3: #2a3520;
  --mid: #3a4a28;
  --light: #f0ffe0;
  --text: #e8ffcc;
  --muted: #8aad5a;
  --nav-w: 240px;
  --font-main: 'Outfit', 'Rubik', system-ui, sans-serif;
  --radius: 4px;
  --transition: 0.18s ease;
}

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

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

a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green2); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== 站点骨架 ===== */
.site-wrap {
  display: flex;
  min-height: 100vh;
}

/* ===== 左侧导航 ===== */
.left-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--dark2);
  border-right: 2px solid var(--green);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}

.nav-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--mid);
}

.brand-link {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--green);
  line-height: 1.3;
  display: block;
  letter-spacing: -0.02em;
}
.brand-link:hover { color: var(--green2); }

.nav-slogan {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.main-nav { padding: 12px 0; flex: 1; }

.main-nav dl { display: flex; flex-direction: column; gap: 2px; }

.main-nav dt { padding: 0; }

.main-nav dt a {
  display: block;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}

.main-nav dt a:hover {
  color: var(--green);
  border-left-color: var(--green);
  background: var(--dark3);
}

.nav-toggle {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  background: var(--green);
  color: var(--dark);
  border: none;
  padding: 10px 14px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius);
  min-height: 40px;
  min-width: 40px;
}

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

/* ===== 跑马灯 ===== */
.marquee-bar {
  background: var(--green);
  color: var(--dark);
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--dark);
}

.marquee-inner {
  display: inline-flex;
  gap: 48px;
  animation: marquee 22s linear infinite;
}

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

.marquee-inner span::before { content: '★ '; }

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== main / article 结构 ===== */
main { flex: 1; }

main > article {
  padding: 32px 24px;
  border-bottom: 1px solid var(--mid);
}

/* ===== 通用 aside ===== */
.page-aside {
  float: left;
  width: 200px;
  margin-right: 24px;
  background: var(--dark3);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  position: relative;
}

.page-aside h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--mid);
  padding-bottom: 6px;
}

.page-aside h3 > span { display: inline; }

.page-aside ul { display: flex; flex-direction: column; gap: 4px; }
.page-aside ul li a {
  font-size: 0.8rem;
  color: var(--text);
  display: block;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition);
}
.page-aside ul li a:hover { color: var(--green); }

.aside-parent, .aside-home {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid var(--mid);
  padding-top: 8px;
}
.aside-parent span, .aside-home span { color: var(--muted); }

/* ===== content-figure ===== */
.content-figure {
  overflow: hidden;
}

.content-figure h1,
.article-h1 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--green);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.page-date .sep { color: var(--mid); }

/* ===== 正文内容 ===== */
.page-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  max-width: 760px;
}

.page-content h2,
.article-content h2 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--green);
  margin: 28px 0 10px;
  border-left: 4px solid var(--green);
  padding-left: 10px;
}

.page-content h3,
.article-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--green2);
  margin: 20px 0 8px;
}

.page-content p,
.article-content p { margin-bottom: 14px; }

.page-content ul,
.page-content ol,
.article-content ul,
.article-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.page-content li,
.article-content li {
  list-style: disc;
  margin-bottom: 6px;
}
.page-content ol li,
.article-content ol li { list-style: decimal; }

.page-content a { color: var(--green); text-decoration: underline; }
.page-content a:hover { color: var(--green2); }

.page-content strong,
.article-content strong { color: var(--green); font-weight: 700; }

.page-content code,
.article-content code {
  background: var(--dark3);
  border: 1px solid var(--mid);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.88em;
  font-family: 'Courier New', monospace;
}

/* ===== 首页 Hero ===== */
.hero-section {
  min-height: 45vh;
  position: relative;
  overflow: hidden;
  background: var(--dark2);
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 40px 24px 32px !important;
}

.hero-aside {
  flex-shrink: 0;
  width: 180px;
  background: rgba(128,255,0,0.08);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 14px;
}

.hero-aside h3 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--mid);
  padding-bottom: 6px;
}
.hero-aside h3 > span { display: inline; }

.hero-aside ul { display: flex; flex-direction: column; gap: 4px; }
.hero-aside ul li a {
  font-size: 0.78rem;
  color: var(--text);
  display: block;
  padding: 3px 0;
}
.hero-aside ul li a:hover { color: var(--green); }

.hero-figure {
  flex: 1;
  position: relative;
  min-height: 38vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-bg-num {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(8rem, 18vw, 16rem);
  color: rgba(128,255,0,0.06);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.05em;
  z-index: 0;
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-h1 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--green);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text);
  max-width: 520px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  background: var(--green);
  color: var(--dark);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  letter-spacing: 0.03em;
  transition: background var(--transition), transform var(--transition);
  min-height: 44px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.hero-cta:hover {
  background: var(--green2);
  color: var(--dark);
  transform: translateY(-2px);
}

.hero-media {
  position: absolute;
  right: 0;
  bottom: 0;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

/* ===== topic/div grid sections ===== */
.topic-section,
.articles-section,
.children-section,
.related-section,
.about-links-section {
  padding: 32px 24px !important;
}

.topic-section h2,
.articles-section h2,
.children-section h2,
.related-section h2,
.about-links-section h2,
.privacy-footer-section h2 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.topic-section h2 > span,
.articles-section h2 > span,
.children-section h2 > span,
.related-section h2 > span,
.about-links-section h2 > span,
.privacy-footer-section h2 > span { display: inline; }

.topic-section h2::before,
.articles-section h2::before,
.children-section h2::before,
.related-section h2::before,
.about-links-section h2::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background: var(--green);
  border-radius: 2px;
  flex-shrink: 0;
}

/* ===== 卡片通用 ===== */
.sticker-card {
  display: block;
  background: var(--dark3);
  border-radius: var(--radius);
  padding: 18px 16px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid transparent;
}

.sticker-card:hover {
  transform: translateY(-3px) rotate(-0.4deg);
  box-shadow: 0 8px 24px rgba(128,255,0,0.15);
  border-color: var(--green);
}

.sticker-card strong {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--green);
  margin-bottom: 6px;
  line-height: 1.3;
}

.sticker-card .card-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.sticker-card .card-date {
  display: block;
  font-size: 0.72rem;
  color: var(--mid);
  margin-top: 8px;
}

.card-num, .card-index {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: rgba(128,255,0,0.1);
  line-height: 1;
  user-select: none;
}

/* ===== 网格 ===== */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.articles-grid,
.children-grid,
.related-grid,
.about-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

/* ===== content article 布局 ===== */
.content-section {
  display: flex;
  gap: 24px;
}

.content-section .content-figure { flex: 1; min-width: 0; }
.content-section .content-aside { flex-shrink: 0; }

/* ===== div 专用 ===== */
.content-area--article main > article { max-width: 1100px; }

.article-section {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.article-aside {
  flex-shrink: 0;
  width: 200px;
  background: var(--dark3);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 16px;
  position: sticky;
  top: 20px;
}

.article-aside h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--mid);
  padding-bottom: 6px;
}
.article-aside h3 > span { display: inline; }

.article-aside ul { display: flex; flex-direction: column; gap: 4px; }
.article-aside ul li a {
  font-size: 0.8rem;
  color: var(--text);
  display: block;
  padding: 4px 0;
}
.article-aside ul li a:hover { color: var(--green); }

.article-figure { flex: 1; min-width: 0; }

.article-hero-wrap {
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 360px;
}

.article-hero-img {
  width: 100%;
  object-fit: cover;
}

.article-meta { margin-bottom: 20px; }

.article-content { max-width: 720px; }

/* ===== topic hero ===== */
.topic-hero-section {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  min-height: 30vh;
  background: var(--dark2);
  position: relative;
  overflow: hidden;
}

.topic-header-figure {
  flex: 1;
  position: relative;
}

.topic-bg-label {
  position: absolute;
  right: 0;
  top: 0;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(5rem, 12vw, 10rem);
  color: rgba(128,255,0,0.05);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.04em;
}

.topic-header-figure h1 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--green);
  line-height: 1.2;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.topic-intro {
  font-size: 1rem;
  color: var(--muted);
  max-width: 600px;
  position: relative;
  z-index: 1;
  margin-top: 8px;
}

/* ===== about ===== */
.about-section { display: flex; gap: 24px; align-items: flex-start; }
.about-figure { flex: 1; position: relative; }

.about-badge, .privacy-badge {
  display: inline-block;
  background: var(--green);
  color: var(--dark);
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 14px;
}

.about-figure h1,
.privacy-figure h1 {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--green);
  margin-bottom: 12px;
  line-height: 1.2;
}

/* ===== about links ===== */
.about-link-card { }
.about-link-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

/* ===== privacy ===== */
.privacy-section { display: flex; gap: 24px; align-items: flex-start; }
.privacy-figure { flex: 1; }

.privacy-content { max-width: 740px; }

.privacy-footer-section { }
.privacy-links { padding: 16px; background: var(--dark3); border-radius: var(--radius); border: 1px solid var(--mid); display: inline-block; }
.privacy-links ul { display: flex; gap: 20px; }
.privacy-links ul li a { font-size: 0.9rem; color: var(--green); }
.privacy-links ul li a:hover { color: var(--green2); }

.privacy-footer-section figure {
  margin-top: 0;
}

/* ===== footer ===== */
footer {
  background: var(--dark2);
  border-top: 2px solid var(--green);
  padding: 28px 24px 16px;
}

footer address {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 500;
}

footer > ul {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

footer > ul li a {
  font-size: 0.82rem;
  color: var(--text);
  padding: 6px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
}
footer > ul li a:hover { color: var(--green); }

footer nav { margin-bottom: 16px; }

footer nav dl {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

footer nav dt { }
footer nav dt a {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 4px 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
footer nav dt a:hover { color: var(--green); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--mid);
  padding-top: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-brand {
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--green);
  letter-spacing: -0.03em;
  line-height: 1;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
}

/* ===== 动效 hover micro ===== */
@media (prefers-reduced-motion: no-preference) {
  .sticker-card {
    transition: transform 0.2s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease, border-color 0.2s ease;
  }

  .hero-cta {
    transition: background 0.18s ease, transform 0.2s cubic-bezier(.34,1.56,.64,1);
  }

  .main-nav dt a {
    transition: color 0.15s ease, border-left-color 0.15s ease, background 0.15s ease;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  :root { --nav-w: 0px; }

  .left-nav {
    transform: translateX(-240px);
    width: 240px;
  }

  .left-nav.open {
    transform: translateX(0);
  }

  .nav-toggle { display: flex; align-items: center; justify-content: center; }

  .content-area { margin-left: 0; padding-top: 56px; }

  .article-section { flex-direction: column; }
  .article-aside { width: 100%; position: static; }

  .about-section,
  .privacy-section { flex-direction: column; }

  .topic-hero-section { flex-direction: column; }

  .content-section { flex-direction: column; }

  .page-aside { float: none; width: 100%; margin-right: 0; margin-bottom: 16px; }

  .hero-section { flex-direction: column; min-height: auto; }
  .hero-aside { width: 100%; }
  .hero-figure { min-height: auto; }
  .hero-bg-num { font-size: clamp(4rem, 20vw, 8rem); opacity: 1; }
}

@media (max-width: 600px) {
  main > article { padding: 20px 14px !important; }
  .topic-grid,
  .articles-grid,
  .children-grid,
  .related-grid,
  .about-links-grid {
    grid-template-columns: 1fr;
  }
  .footer-brand { font-size: 1.2rem; }
  .privacy-links ul { flex-direction: column; gap: 8px; }
  footer > ul { gap: 10px; }
  .hero-h1 { font-size: 1.8rem; }
}

/* ===== overlay quando nav è aperta ===== */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}
.nav-overlay.active { display: block; }
