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

/* ── 变量 ── */
:root {
  --c-bg: #001e3c;
  --c-primary: #99ffcc;
  --c-accent: #00ff41;
  --c-text: #c8f0de;
  --c-text-dim: #6aaf8a;
  --c-border: rgba(153,255,204,0.18);
  --c-card-bg: rgba(0,30,60,0.85);
  --c-nav-bg: rgba(0,10,24,0.97);
  --nav-w: 220px;
  --font-body: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 0px;
  --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: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover, a:focus { color: var(--c-accent); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── 无障碍 ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

/* ── 布局骨架 ── */
.layout-wrap {
  display: flex;
  min-height: 100vh;
}

/* ── 左侧固定导航 ── */
#sidenav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--c-nav-bg);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

#sidenav .nav-brand {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}

.brand-mark {
  font-size: 28px;
  color: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  animation: breathe 3.5s ease-in-out infinite;
}

#sidenav > ol {
  flex: 1;
  padding: 12px 0;
}

#sidenav > ol > li > a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-dim);
  border-left: 3px solid transparent;
  transition: all var(--transition);
  min-height: 44px;
  line-height: 1.3;
}

#sidenav > ol > li > a:hover,
#sidenav > ol > li > a:focus,
#sidenav > ol > li > a[aria-current="page"] {
  color: var(--c-primary);
  background: rgba(153,255,204,0.06);
  border-left-color: var(--c-accent);
  text-decoration: none;
}

.nav-icon {
  font-size: 16px;
  color: var(--c-accent);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-search {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--c-border);
}

.nav-search form {
  display: flex;
  gap: 4px;
}

.nav-search input {
  flex: 1;
  background: rgba(153,255,204,0.07);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 8px 10px;
  min-height: 40px;
  border-radius: 0;
  transition: border-color var(--transition);
}

.nav-search input::placeholder { color: var(--c-text-dim); }
.nav-search input:focus { border-color: var(--c-accent); outline: none; }

.nav-search button {
  background: rgba(0,255,65,0.12);
  border: 1px solid var(--c-border);
  color: var(--c-accent);
  font-size: 16px;
  padding: 8px 10px;
  min-height: 40px;
  min-width: 40px;
  transition: background var(--transition);
}

.nav-search button:hover { background: rgba(0,255,65,0.22); }

/* ── 页面主体 ── */
.page-body {
  margin-left: var(--nav-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── main 布局：正文 + aside ── */
main {
  display: flex;
  gap: 0;
  flex: 1;
  align-items: flex-start;
}

main > div {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--c-border);
}

main > div > article {
  padding: 32px 40px;
  border-bottom: 1px solid var(--c-border);
}

/* ── Aside 侧边栏 ── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 28px 20px;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
}

.sidebar h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-text-dim);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

.sidebar h3 > span { color: inherit; }

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 24px;
}

.sidebar-list > li > a {
  display: block;
  font-size: 13px;
  color: var(--c-text-dim);
  padding: 7px 10px;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  min-height: 40px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-list > li > a:hover { color: var(--c-primary); border-left-color: var(--c-accent); background: rgba(153,255,204,0.05); text-decoration: none; }

.sidebar-list > li > small {
  display: block;
  font-size: 12px;
  color: var(--c-text-dim);
  opacity: 0.7;
  padding: 0 10px 6px;
  line-height: 1.4;
}

.sidebar-back a {
  font-size: 13px;
  color: var(--c-text-dim);
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

/* ── Hero（首页）── */
.hero-section {
  display: flex;
  align-items: center;
  min-height: 45vh;
  padding: 0;
  border-bottom: 1px solid var(--c-border);
  overflow: hidden;
  position: relative;
}

.hero-text {
  flex: 1;
  padding: 48px 40px 48px 48px;
  z-index: 2;
}

.hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  border: 1px solid var(--c-accent);
  padding: 4px 12px;
  margin-bottom: 20px;
  animation: breathe-border 3s ease-in-out infinite;
}

.hero-text h1 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 15px;
  color: var(--c-text-dim);
  max-width: 420px;
  margin-bottom: 28px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,255,65,0.1);
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  min-height: 48px;
  transition: all var(--transition);
  letter-spacing: 0.05em;
}

.hero-cta:hover { background: rgba(0,255,65,0.22); text-decoration: none; color: var(--c-accent); }

.hero-media {
  width: 42%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  min-height: 45vh;
  position: relative;
}

.hero-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.hero-placeholder svg { width: 100%; max-width: 340px; height: auto; }

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

/* ── 正文区域 ── */
.content-section {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
}

.content-section h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--c-primary);
  margin: 2em 0 0.8em;
  padding-top: 0.5em;
  border-top: 1px solid var(--c-border);
}

.content-section h2 > span { color: inherit; }

.content-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-accent);
  margin: 1.6em 0 0.6em;
}

.content-section h3 > span { color: inherit; }

.content-section p { margin-bottom: 1em; }

.content-section ul, .content-section ol {
  padding-left: 1.5em;
  margin-bottom: 1em;
  list-style: disc;
}

.content-section ol { list-style: decimal; }

.content-section li { margin-bottom: 0.4em; }

.content-section a { border-bottom: 1px solid rgba(0,255,65,0.35); }
.content-section a:hover { border-bottom-color: var(--c-accent); }

.content-section blockquote {
  border-left: 3px solid var(--c-accent);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: rgba(153,255,204,0.04);
  font-style: italic;
  color: var(--c-text-dim);
}

.content-section code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(153,255,204,0.08);
  padding: 2px 6px;
  border-radius: 2px;
  color: var(--c-accent);
}

.content-section pre {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0,0,0,0.4);
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--c-border);
}

/* ── 子页列表（首页）── */
.home-children, .faq-grid-section {
  padding: 32px 40px;
}

.home-children h2, .faq-grid-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  text-transform: uppercase;
  font-size: 12px;
}

.home-children h2 > span, .faq-grid-section h2 > span { color: inherit; }

.child-list, .faq-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.child-list > li {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-border);
  transition: border-color var(--transition);
  animation: stagger-in 0.4s ease both;
}

.child-list > li:nth-child(1) { animation-delay: 0.05s; }
.child-list > li:nth-child(2) { animation-delay: 0.10s; }
.child-list > li:nth-child(3) { animation-delay: 0.15s; }
.child-list > li:nth-child(4) { animation-delay: 0.20s; }
.child-list > li:nth-child(5) { animation-delay: 0.25s; }

.child-list > li:hover { border-color: var(--c-accent); }

.child-list > li > a {
  padding: 14px 18px 4px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-primary);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.child-list > li > small {
  display: block;
  padding: 2px 18px 12px;
  font-size: 13px;
  color: var(--c-text-dim);
  line-height: 1.5;
}

/* ── FAQ 网格 ── */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.faq-card {
  border: 1px solid var(--c-border);
  transition: border-color var(--transition), background var(--transition);
  animation: stagger-in 0.4s ease both;
}

.faq-card:nth-child(1) { animation-delay: 0.05s; }
.faq-card:nth-child(2) { animation-delay: 0.10s; }
.faq-card:nth-child(3) { animation-delay: 0.15s; }
.faq-card:nth-child(4) { animation-delay: 0.20s; }
.faq-card:nth-child(5) { animation-delay: 0.25s; }

.faq-card:hover { border-color: var(--c-accent); background: rgba(153,255,204,0.04); }

.faq-card > a {
  display: flex;
  flex-direction: column;
  padding: 18px 20px 14px;
  gap: 6px;
  min-height: 80px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-primary);
  line-height: 1.4;
}

.faq-card > a > small {
  font-size: 12px;
  color: var(--c-text-dim);
  line-height: 1.5;
}

/* ── 页眉区域（各页型）── */
.faq-header, .article-header, .about-header, .privacy-header {
  padding: 40px 40px 28px 48px;
  border-bottom: 1px solid var(--c-border);
  position: relative;
}

.faq-header::before, .article-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent), transparent);
}

.faq-eyebrow, .article-eyebrow, .about-eyebrow, .privacy-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--c-accent);
  margin-bottom: 12px;
  text-transform: uppercase;
}

.faq-header h1, .article-header h1, .about-header h1, .privacy-header h1 {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.3;
  margin-bottom: 12px;
}

.faq-meta, .article-meta, .privacy-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.page-date, .page-date-mod {
  font-size: 12px;
  color: var(--c-text-dim);
  font-family: var(--font-mono);
}

/* ── 文章 hero ── */
.article-hero {
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
  position: relative;
}

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

.article-hero--placeholder {
  background: linear-gradient(135deg, rgba(0,255,65,0.05) 0%, rgba(0,30,60,1) 60%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cell-pattern {
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0,255,65,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(153,255,204,0.06) 0%, transparent 40%),
    radial-gradient(circle at 60% 80%, rgba(0,255,65,0.05) 0%, transparent 35%);
  animation: breathe 4s ease-in-out infinite;
}

/* ── 文章额外区域 ── */
.article-footer-section { padding: 24px 40px; }

.article-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.article-tags > a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--c-text-dim);
  border: 1px solid var(--c-border);
  padding: 6px 14px;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: all var(--transition);
}

.article-tags > a:hover { border-color: var(--c-accent); color: var(--c-accent); text-decoration: none; }

/* ── FAQ 页码 ── */
.faq-nav-section { padding: 20px 40px; }

.page-pagination > ol {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.page-pagination > ol > li > a {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--c-text-dim);
  border: 1px solid var(--c-border);
  padding: 10px 18px;
  min-height: 44px;
  transition: all var(--transition);
}

.page-pagination > ol > li > a:hover { border-color: var(--c-accent); color: var(--c-primary); text-decoration: none; }

/* ── About 导航列表 ── */
.about-links-section { padding: 28px 40px; }
.about-links-section h2 { font-size: 1rem; font-weight: 600; color: var(--c-text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; font-size: 12px; }
.about-links-section h2 > span { color: inherit; }

.about-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-nav-list > li {
  border: 1px solid var(--c-border);
  transition: border-color var(--transition);
  animation: stagger-in 0.35s ease both;
}

.about-nav-list > li:nth-child(1) { animation-delay: 0.05s; }
.about-nav-list > li:nth-child(2) { animation-delay: 0.10s; }
.about-nav-list > li:nth-child(3) { animation-delay: 0.15s; }
.about-nav-list > li:nth-child(4) { animation-delay: 0.20s; }
.about-nav-list > li:nth-child(5) { animation-delay: 0.25s; }
.about-nav-list > li:nth-child(6) { animation-delay: 0.30s; }
.about-nav-list > li:nth-child(7) { animation-delay: 0.35s; }

.about-nav-list > li:hover { border-color: var(--c-accent); }

.about-nav-list > li > a {
  display: flex;
  align-items: center;
  padding: 12px 18px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-primary);
  min-height: 44px;
}

.about-nav-list > li > small {
  display: block;
  padding: 2px 18px 10px;
  font-size: 12px;
  color: var(--c-text-dim);
}

/* ── Privacy ── */
.privacy-links-section { padding: 28px 40px; }
.privacy-links-section h2 { font-size: 12px; font-weight: 600; color: var(--c-text-dim); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 16px; }
.privacy-links-section h2 > span { color: inherit; }

.privacy-links-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.privacy-links-list > li {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-border);
  transition: border-color var(--transition);
}

.privacy-links-list > li:hover { border-color: var(--c-accent); }

.privacy-links-list > li > a {
  padding: 12px 18px 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-primary);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.privacy-links-list > li > small {
  display: block;
  padding: 2px 18px 10px;
  font-size: 12px;
  color: var(--c-text-dim);
}

/* ── 页脚 ── */
footer {
  border-top: 1px solid var(--c-border);
  padding: 20px 48px;
  text-align: center;
  background: rgba(0,0,0,0.2);
}

footer > p {
  font-size: 13px;
  color: var(--c-text-dim);
  margin-bottom: 6px;
}

footer > p > a { color: var(--c-text-dim); }
footer > p > a:hover { color: var(--c-primary); }

footer > small {
  font-size: 12px;
  color: rgba(106,175,138,0.6);
  display: block;
}

/* ── 有机背景装饰 ── */
.layout-wrap::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 70% 30%, rgba(0,255,65,0.03) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 30% 70%, rgba(153,255,204,0.025) 0%, transparent 60%);
  animation: breathe-bg 6s ease-in-out infinite;
}

/* ── 动效 ── */
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.85; }
}

@keyframes breathe-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,65,0); }
  50% { box-shadow: 0 0 12px 2px rgba(0,255,65,0.18); }
}

@keyframes breathe-bg {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes stagger-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── 移动端适配 ── */
@media (max-width: 768px) {
  :root { --nav-w: 0px; }

  #sidenav {
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--c-border);
    z-index: 200;
    overflow-x: auto;
    overflow-y: hidden;
  }

  #sidenav .nav-brand { display: none; }

  #sidenav > ol {
    display: flex;
    flex-direction: row;
    flex: 1;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
  }

  #sidenav > ol > li > a {
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
    min-height: 56px;
    font-size: 11px;
    border-left: none;
    border-top: 3px solid transparent;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  #sidenav > ol > li > a[aria-current="page"],
  #sidenav > ol > li > a:hover {
    border-left-color: transparent;
    border-top-color: var(--c-accent);
  }

  .nav-label { display: none; }
  .nav-icon { font-size: 20px; }

  .nav-search { display: none; }

  .page-body {
    margin-left: 0;
    padding-bottom: 72px;
  }

  main {
    flex-direction: column;
  }

  main > div {
    border-right: none;
  }

  main > div > article {
    padding: 20px 16px;
  }

  .sidebar {
    width: 100%;
    position: static;
    max-height: none;
    padding: 20px 16px;
    border-top: 1px solid var(--c-border);
  }

  .hero-section {
    flex-direction: column;
    min-height: auto;
  }

  .hero-text {
    padding: 28px 16px 20px;
    order: 2;
  }

  .hero-media {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    order: 1;
  }

  .hero-text h1 { font-size: 1.4rem; }

  .faq-header, .article-header, .about-header, .privacy-header {
    padding: 24px 16px 20px;
  }

  .home-children, .faq-grid-section {
    padding: 20px 16px;
  }

  .faq-grid { grid-template-columns: 1fr; }

  .article-footer-section { padding: 16px; }
  .faq-nav-section { padding: 16px; }
  .about-links-section { padding: 20px 16px; }
  .privacy-links-section { padding: 20px 16px; }

  footer { padding: 16px; }

  .page-pagination > ol { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.2rem; }
  .content-section { font-size: 16px; }
}

/* ── 超宽屏限制 ── */
@media (min-width: 1400px) {
  .page-body { max-width: calc(1400px - var(--nav-w)); }
}
