@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 {
  --c-black: #000000;
  --c-dark: #121212;
  --c-surface: #1a1a1a;
  --c-border: #2a2a2a;
  --c-text: #e0e0e0;
  --c-text-dim: #888888;
  --c-accent: #c8ff00;
  --c-accent2: #00cfff;
  --c-accent3: #ff4fd8;
  --c-white: #ffffff;
  --font-mono: 'Space Mono', 'Courier New', Courier, monospace;
  --nav-h: 56px;
  --radius: 4px;
  --max-w: 960px;
  --transition: 0.2s ease;
  color-scheme: dark;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background: var(--c-black);
  color: var(--c-text);
}

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

/* ========================
   顶部固定导航条
======================== */
.top-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: var(--c-dark);
  border-top: 1px solid var(--c-border);
  z-index: 900;
  display: flex;
  align-items: center;
}

.top-bar-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-brand {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-accent);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-shadow: 0 0 10px rgba(200, 255, 0, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-brand:hover {
  text-shadow: 0 0 16px rgba(200, 255, 0, 0.8);
}

/* 汉堡按钮 */
.burger {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 40px;
  min-width: 40px;
  justify-content: center;
  align-items: center;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-text);
  transition: transform var(--transition), opacity var(--transition);
}

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

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* 搜索框 */
.top-search {
  flex: 0 0 auto;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-form input {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 10px;
  width: 120px;
  min-height: 40px;
  outline: none;
  transition: border-color var(--transition);
}

.search-form input:focus {
  border-color: var(--c-accent);
}

.search-form button {
  background: var(--c-accent);
  border: none;
  border-radius: var(--radius);
  color: var(--c-black);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 10px;
  cursor: pointer;
  min-height: 40px;
  min-width: 40px;
  transition: background var(--transition);
}

.search-form button:hover {
  background: var(--c-accent2);
}

/* ========================
   全屏遮罩菜单
======================== */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.77, 0, 0.175, 1);
  padding: 40px 24px 80px;
}

.fullscreen-menu.is-open {
  transform: translateY(0);
}

.menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-text);
  font-size: 1.2rem;
  padding: 8px 14px;
  cursor: pointer;
  min-height: 40px;
  min-width: 40px;
  font-family: var(--font-mono);
  transition: color var(--transition), border-color var(--transition);
}

.menu-close:hover {
  color: var(--c-accent);
  border-color: var(--c-accent);
}

.fullscreen-menu nav dl {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 600px;
}

.fullscreen-menu nav dl dt {
  border-bottom: 1px solid var(--c-border);
}

.fullscreen-menu nav dl dt a {
  display: block;
  padding: 14px 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-text);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color var(--transition);
}

.fullscreen-menu nav dl dt a:hover {
  color: var(--c-accent);
  text-shadow: 0 0 10px rgba(200, 255, 0, 0.5);
}

/* ========================
   Hero — 首页
======================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: calc(var(--nav-h) + 40px);
  overflow: hidden;
  background: var(--c-black);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.25);
}

.hero-slash {
  position: absolute;
  bottom: calc(var(--nav-h) + 100px);
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(170deg, transparent 49%, var(--c-accent) 49.1%, var(--c-accent) 50%, transparent 50.1%);
  opacity: 0.12;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px 48px;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  text-shadow: 0 0 10px rgba(200, 255, 0, 0.5);
}

.hero h1 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 3rem);
  line-height: 1.2;
  color: var(--c-white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1rem;
  color: var(--c-text-dim);
  max-width: 600px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-black);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background var(--transition), box-shadow var(--transition);
  min-height: 44px;
}

.btn-primary:hover {
  background: var(--c-accent2);
  box-shadow: 0 0 20px rgba(0, 207, 255, 0.4);
}

/* ========================
   页面 Hero（非首页）
======================== */
.page-hero {
  position: relative;
  padding: 80px 24px 60px;
  background: var(--c-dark);
  overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}

.page-hero-slash {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(175deg, var(--c-dark) 49%, var(--c-black) 49.1%);
  pointer-events: none;
}

.page-hero--guide {
  background: linear-gradient(135deg, var(--c-dark) 60%, #0d1a0d 100%);
}
.page-hero--feature {
  background: linear-gradient(135deg, var(--c-dark) 60%, #0a1220 100%);
}
.page-hero--faq {
  background: linear-gradient(135deg, var(--c-dark) 60%, #1a0d1a 100%);
}
.page-hero--about,
.page-hero--privacy,
.page-hero--default {
  background: var(--c-dark);
}

.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.page-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(200, 255, 0, 0.4);
}

.page-hero h1 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  line-height: 1.25;
  color: var(--c-white);
  margin-bottom: 16px;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

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

/* ========================
   内容布局（有侧边栏）
======================== */
.content-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  gap: 32px;
  padding-bottom: calc(var(--nav-h) + 60px);
}

main {
  flex: 1 1 0;
  min-width: 0;
}

/* 正文容器 — 四层直接嵌套 main>div.wrap>section>article */
.wrap {
  padding: 40px 0 0;
}

.content-section {
  /* section 直接子 */
}

.article-body,
.faq-body,
.about-body,
.privacy-body,
.page-content {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-text);
}

.article-body h2,
.faq-body h2,
.about-body h2,
.privacy-body h2,
.page-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-white);
  margin: 36px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

.article-body h3,
.faq-body h3,
.about-body h3,
.privacy-body h3,
.page-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-accent2);
  margin: 28px 0 10px;
}

.article-body p,
.faq-body p,
.about-body p,
.privacy-body p,
.page-content p {
  margin-bottom: 16px;
}

.article-body a,
.faq-body a,
.about-body a,
.privacy-body a,
.page-content a {
  color: var(--c-accent2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover,
.faq-body a:hover,
.about-body a:hover,
.privacy-body a:hover,
.page-content a:hover {
  color: var(--c-accent);
  text-shadow: 0 0 8px rgba(200, 255, 0, 0.4);
}

.article-body ul,
.article-body ol,
.faq-body ul,
.faq-body ol,
.about-body ul,
.privacy-body ul,
.page-content ul,
.page-content ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.article-body li,
.faq-body li,
.about-body li,
.privacy-body li,
.page-content li {
  margin-bottom: 6px;
}

.article-hero {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--c-border);
}

.article-hero-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================
   侧边栏 aside
======================== */
.sidebar-aside {
  flex: 0 0 220px;
  padding-top: 40px;
}

.aside-inner {
  background: var(--c-dark);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 16px;
  position: sticky;
  top: 20px;
}

.aside-inner h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.aside-sub-title {
  margin-top: 20px !important;
}

.aside-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-links li a {
  display: block;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--c-text-dim);
  text-decoration: none;
  border-radius: var(--radius);
  line-height: 1.4;
  transition: color var(--transition), background var(--transition);
}

.aside-links li a:hover,
.aside-links li a.active {
  color: var(--c-white);
  background: var(--c-surface);
}

.aside-links li a[aria-current="page"] {
  color: var(--c-accent);
}

/* 首页 global aside */
.global-aside {
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 0 16px;
}

.global-aside .aside-inner {
  position: static;
}

/* ========================
   首页 cards zone
======================== */
.cards-zone {
  background: var(--c-dark);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 48px 16px;
  margin-bottom: 0;
}

.cards-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.cards-block {}

.block-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}

.card-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card-list li article {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-bottom: 3px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 20px 16px;
  transition: border-color var(--transition), transform var(--transition);
}

.card-list li article:hover {
  border-bottom-color: var(--c-accent2);
  transform: translateY(-2px);
}

.card-list li article h3 {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.card-list li article h3 a {
  color: var(--c-white);
  text-decoration: none;
  transition: color var(--transition);
}

.card-list li article h3 a:hover {
  color: var(--c-accent);
  text-shadow: 0 0 8px rgba(200, 255, 0, 0.4);
}

.card-list li article p {
  font-size: 0.8rem;
  color: var(--c-text-dim);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 首页正文内容区 */
.page-home main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 16px 32px;
}

.page-home .content-section {
  /* override layout for home */
}

.page-home .wrap {
  padding: 0;
}

/* 首页没有侧边栏的 content-layout 覆盖 */
.page-home .content-layout {
  display: block;
  padding: 0;
}

/* ========================
   页脚
======================== */
.site-footer {
  background: var(--c-dark);
  border-top: 1px solid var(--c-border);
  padding: 48px 24px calc(var(--nav-h) + 48px);
}

.footer-brand-block {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--c-border);
}

.footer-bigname {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2rem, 8vw, 5rem);
  letter-spacing: -0.02em;
  color: var(--c-white);
  line-height: 1;
  text-shadow: 0 0 40px rgba(200, 255, 0, 0.15);
}

.footer-cols {
  max-width: var(--max-w);
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--c-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.footer-col p {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  line-height: 1.7;
}

.footer-col a {
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--c-accent);
}

.footer-col nav dl {
  list-style: none;
}

.footer-col nav dl dt {
  margin-bottom: 4px;
}

.footer-col nav dl dt a {
  display: block;
  padding: 3px 0;
  font-size: 0.8rem;
  color: var(--c-text-dim);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col nav dl dt a:hover {
  color: var(--c-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--c-text-dim);
  letter-spacing: 0.03em;
}

/* ========================
   标题装饰 span
======================== */
h2 > span,
h3 > span {
  display: inline;
}

.article-body h2 > span,
.faq-body h2 > span,
.about-body h2 > span,
.privacy-body h2 > span,
.page-content h2 > span {
  border-left: 3px solid var(--c-accent);
  padding-left: 10px;
}

.aside-inner h3 > span {
  color: var(--c-accent);
}

/* ========================
   Parallax / 动效
======================== */
@media (prefers-reduced-motion: no-preference) {
  .card-list li {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.4s ease forwards;
  }

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

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .fullscreen-menu nav dl dt {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .fullscreen-menu.is-open dl dt {
    opacity: 1;
    transform: translateX(0);
  }

  .fullscreen-menu.is-open dl dt:nth-child(1) { transition-delay: 0.05s; }
  .fullscreen-menu.is-open dl dt:nth-child(2) { transition-delay: 0.10s; }
  .fullscreen-menu.is-open dl dt:nth-child(3) { transition-delay: 0.15s; }
  .fullscreen-menu.is-open dl dt:nth-child(4) { transition-delay: 0.20s; }
  .fullscreen-menu.is-open dl dt:nth-child(5) { transition-delay: 0.25s; }
  .fullscreen-menu.is-open dl dt:nth-child(6) { transition-delay: 0.30s; }
  .fullscreen-menu.is-open dl dt:nth-child(7) { transition-delay: 0.35s; }
}

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

/* ========================
   Focus 可见
======================== */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
}

/* ========================
   响应式
======================== */
@media (max-width: 768px) {
  .content-layout {
    flex-direction: column;
    gap: 0;
  }

  .sidebar-aside {
    flex: none;
    width: 100%;
    padding-top: 0;
    padding-bottom: 0;
    border-top: 1px solid var(--c-border);
    margin-top: 24px;
  }

  .aside-inner {
    position: static;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .search-form input {
    width: 80px;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 40px 20px 40px;
  }
}

@media (min-width: 769px) {
  .search-form input {
    width: 180px;
  }

  .cards-inner {
    gap: 56px;
  }
}

@media (min-width: 1024px) {
  .content-layout {
    padding: 0 24px;
    max-width: 1200px;
  }

  .sidebar-aside {
    flex: 0 0 240px;
  }
}

/* ========================
   滚动条
======================== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--c-black);
}
::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--c-accent);
}

/* ========================
   选中色
======================== */
::selection {
  background: var(--c-accent);
  color: var(--c-black);
}
