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

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

:root {
  --bg: #0A0A0A;
  --cyan: #00FFCC;
  --red: #FF3B3B;
  --fg: #E8E8E8;
  --fg-dim: #999;
  --border: #222;
  --border-bright: #00FFCC;
  --card-bg: #111;
  --aside-bg: #0D0D0D;
  --font: 'Space Mono', 'Courier New', monospace;
  --nav-h: 56px;
  --announce-h: 32px;
  --transition: 160ms ease;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: #fff;
  opacity: 0.85;
}

ul, ol, dl {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== 公告条 ===== */
.announce-bar {
  background: var(--red);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 0 1rem;
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 200;
}

/* ===== 顶部导航 ===== */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand:hover {
  color: #fff;
  opacity: 1;
}

/* ===== 汉堡按钮 ===== */
.burger {
  background: none;
  border: 2px solid var(--cyan);
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border-radius: 0;
  transition: border-color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.burger:hover {
  background: var(--cyan);
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cyan);
  transition: background var(--transition);
}

.burger:hover span {
  background: var(--bg);
}

/* ===== 全屏遮罩菜单 ===== */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.fullscreen-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  transition: background var(--transition), color var(--transition);
}

.menu-close:hover {
  background: var(--red);
  color: #fff;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 600px;
  padding: 2rem 1.5rem;
}

.menu-nav a {
  display: block;
  width: 100%;
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.03em;
  transition: color var(--transition), padding-left var(--transition);
}

.menu-nav a:first-child {
  border-top: 1px solid var(--border);
}

.menu-nav a:hover {
  color: var(--cyan);
  padding-left: 2.5rem;
  opacity: 1;
}

/* ===== 锚点条 ===== */
.anchor-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 90;
  background: #111;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 1rem;
  gap: 0;
}

.anchor-bar::-webkit-scrollbar {
  display: none;
}

.anchor-bar a {
  display: block;
  color: var(--fg-dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 0.75rem 1rem;
  border-right: 1px solid var(--border);
  transition: color var(--transition), background var(--transition);
}

.anchor-bar a:hover {
  color: var(--cyan);
  background: rgba(0,255,204,0.06);
  opacity: 1;
}

/* ===== Hero 首页 ===== */
.hero-section {
  min-height: 70vh;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "aside figure"
    "content content";
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  gap: 2rem;
  position: relative;
}

.hero-aside {
  grid-area: aside;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
}

.hero-figure {
  grid-area: figure;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-content {
  grid-area: content;
  text-align: right;
}

.hero-content h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1rem;
  color: var(--fg-dim);
  max-width: 600px;
  margin-left: auto;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.hero-icon {
  font-size: 6rem;
  color: var(--cyan);
  line-height: 1;
  font-weight: 700;
  opacity: 0.15;
}

.hero-badge {
  display: inline-block;
  background: var(--cyan);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.6rem;
  text-transform: uppercase;
  border-radius: 0;
}

.hero-badge.accent2 {
  background: var(--red);
  color: #fff;
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-block;
  background: var(--cyan);
  color: var(--bg);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  text-transform: uppercase;
  min-height: 48px;
  align-items: center;
}

.btn-primary:hover {
  background: #fff;
  color: var(--bg);
  opacity: 1;
}

/* ===== 正文主区域布局 ===== */
.content-section,
.article-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}

/* ===== 侧边栏（左侧）===== */
.content-aside,
.content-aside ~ aside {
  position: sticky;
  top: calc(var(--nav-h) + 40px);
  background: var(--aside-bg);
  border-left: 3px solid var(--cyan);
  padding: 1.5rem;
}

.content-aside h3 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.content-aside h3 span {
  display: inline;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}

.aside-links li {
  border-bottom: 1px solid var(--border);
}

.aside-links a {
  display: block;
  font-size: 0.8rem;
  color: var(--fg-dim);
  padding: 0.6rem 0;
  transition: color var(--transition), padding-left var(--transition);
}

.aside-links a:hover {
  color: var(--cyan);
  padding-left: 0.5rem;
  opacity: 1;
}

.aside-dl dt {
  border-bottom: 1px solid var(--border);
}

.aside-dl dt a {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--fg);
  padding: 0.5rem 0 0.2rem;
  transition: color var(--transition);
}

.aside-dl dt a:hover {
  color: var(--cyan);
  opacity: 1;
}

.aside-dl dd {
  font-size: 0.72rem;
  color: var(--fg-dim);
  padding-bottom: 0.5rem;
  line-height: 1.5;
}

/* ===== 正文内容 ===== */
.content-main,
.article-body {
  min-width: 0;
}

.article-meta-fig {
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
}

.article-meta-fig figcaption h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.article-meta-fig figcaption .article-lead {
  font-size: 1rem;
  color: var(--fg-dim);
  line-height: 1.75;
}

.meta-dates {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pub-date,
.mod-date {
  font-size: 0.75rem;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

.pub-date::before {
  content: '发布：';
  color: var(--cyan);
}

.mod-date::before {
  content: '更新：';
  color: var(--red);
}

/* page.content 区域样式 */
.page-content h2,
.article-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--cyan);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.page-content h3,
.article-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 2rem 0 0.75rem;
}

.page-content p,
.article-content p {
  margin-bottom: 1.25rem;
  line-height: 1.85;
  color: var(--fg);
}

.page-content ul,
.article-content ul,
.page-content ol,
.article-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style: disc;
}

.page-content ol,
.article-content ol {
  list-style: decimal;
}

.page-content li,
.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.page-content a,
.article-content a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-content strong,
.article-content strong {
  color: #fff;
  font-weight: 700;
}

.page-content code,
.article-content code {
  background: #1a1a1a;
  color: var(--cyan);
  padding: 0.15em 0.4em;
  font-family: var(--font);
  font-size: 0.88em;
  border: 1px solid var(--border);
}

.page-content pre,
.article-content pre {
  background: #111;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.page-content blockquote,
.article-content blockquote {
  border-left: 3px solid var(--red);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255,59,59,0.06);
  color: var(--fg-dim);
}

.page-content table,
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.page-content th,
.article-content th {
  background: #1a1a1a;
  color: var(--cyan);
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 2px solid var(--cyan);
  font-weight: 700;
}

.page-content td,
.article-content td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.page-content tr:hover td,
.article-content tr:hover td {
  background: rgba(0,255,204,0.04);
}

/* ===== 卡片列表 ===== */
.cards-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
}

.cards-section h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--fg-dim);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.cards-section h2 span {
  display: inline;
}

.card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
}

.card-list dt {
  padding: 1.25rem 1.25rem 0.25rem;
  border-top: 3px solid var(--cyan);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--card-bg);
}

.card-list dt:nth-child(4n+1) {
  border-top-color: var(--cyan);
}

.card-list dt:nth-child(4n+3) {
  border-top-color: var(--red);
}

.card-list dt a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: block;
  transition: color var(--transition);
}

.card-list dt a:hover {
  color: var(--cyan);
  opacity: 1;
}

.card-list dd {
  padding: 0 1.25rem 1.25rem;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
}

.card-list dd .card-date {
  display: block;
  font-size: 0.7rem;
  color: var(--fg-dim);
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.card-list dd p {
  font-size: 0.83rem;
  color: var(--fg-dim);
  line-height: 1.6;
}

/* ===== cards-aside 内的卡片适配 ===== */
.cards-aside {
  width: 100%;
}

/* ===== 相关区块 ===== */
.related-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  border-top: 1px solid var(--border);
}

.related-aside {
  width: 100%;
}

.related-aside h2 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--fg-dim);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.related-aside h2 span {
  display: inline;
}

/* ===== Hero 变体（FAQ / Feature / About / Privacy）===== */
.faq-hero-section,
.feature-hero-section,
.about-hero-section,
.privacy-header-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 1.5rem 2rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.faq-hero-fig,
.feature-hero-fig,
.about-hero-fig,
.privacy-fig {
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-hero-aside,
.feature-hero-aside,
.about-hero-aside,
.privacy-aside {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-hero-content h1,
.feature-hero-content h1,
.about-hero-content h1,
.privacy-header-content h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.faq-hero-content p,
.feature-hero-content p,
.about-hero-content p,
.privacy-header-content p {
  color: var(--fg-dim);
  font-size: 0.95rem;
  line-height: 1.75;
}

.small-icon {
  font-size: 3rem;
  opacity: 0.6;
}

/* ===== 页脚 ===== */
footer {
  border-top: 2px solid var(--border);
  margin-top: 4rem;
}

.footer-cta {
  background: #111;
  padding: 3rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.footer-cta-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg-dim);
  margin-bottom: 1.5rem;
  letter-spacing: 0.08em;
}

.footer-nav-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.footer-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0 2rem;
}

.footer-dl dt {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
}

.footer-dl dt:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.footer-dl dt a {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--fg);
  transition: color var(--transition);
}

.footer-dl dt a:hover {
  color: var(--cyan);
  opacity: 1;
}

.footer-dl dd {
  font-size: 0.75rem;
  color: var(--fg-dim);
  line-height: 1.5;
  padding-bottom: 0.5rem;
}

.footer-copy {
  background: #050505;
  padding: 1rem 1.5rem;
  text-align: center;
}

.footer-copy p {
  font-size: 0.75rem;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
}

.footer-copy a {
  color: var(--fg-dim);
  transition: color var(--transition);
}

.footer-copy a:hover {
  color: var(--cyan);
  opacity: 1;
}

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .fullscreen-menu {
    transition: none;
  }
  .menu-nav a {
    transition: none;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-section,
  .article-section {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    order: 2;
  }

  .content-main,
  .article-body {
    order: 1;
  }

  .hero-section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "aside"
      "figure"
      "content";
    min-height: auto;
    padding-top: 2.5rem;
  }

  .hero-content {
    text-align: left;
  }

  .hero-desc {
    margin-left: 0;
  }

  .hero-figure {
    justify-content: flex-start;
  }

  .faq-hero-section,
  .feature-hero-section,
  .about-hero-section,
  .privacy-header-section {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

@media (max-width: 600px) {
  .card-list {
    grid-template-columns: 1fr;
  }

  .footer-dl {
    grid-template-columns: 1fr;
  }

  .anchor-bar a {
    font-size: 0.7rem;
    padding: 0.6rem 0.75rem;
  }

  .cards-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .content-section,
  .article-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .faq-hero-section,
  .feature-hero-section,
  .about-hero-section,
  .privacy-header-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-nav-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .site-nav {
    padding: 0 1rem;
  }

  .announce-bar {
    font-size: 0.7rem;
    padding: 0 0.75rem;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }
}
