/* ============================================================
   操空姐 — OLED Art Deco Dark Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Didact+Gothic&family=Poiret+One&display=swap');

/* ---------- CSS 变量 ---------- */
:root {
  --bg: #000000;
  --bg-card: #121212;
  --bg-aside: #0a0a0a;
  --text: #e8e8e8;
  --text-dim: #999;
  --text-muted: #666;
  --accent: #c9a84c;
  --accent-glow: rgba(201,168,76,0.18);
  --accent-dim: #7a6230;
  --neon-blue: #4fc3f7;
  --neon-purple: #ce93d8;
  --border: #2a2a2a;
  --border-accent: #c9a84c;
  --radius-card: 28px;
  --font-deco: 'Poiret One', 'Didact Gothic', 'Georgia', serif;
  --font-body: 'Didact Gothic', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --nav-w: 240px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; line-height: 1.6; color-scheme: dark; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; text-shadow: 0 0 10px var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
ul, ol, dl, dd, dt { margin: 0; padding: 0; list-style: none; }

/* ---------- 点阵底纹 ---------- */
.hero-dot-bg,
.topic-banner-dot {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(201,168,76,0.12) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

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

/* ---------- 侧边导航 ---------- */
.sidenav {
  width: var(--nav-w);
  min-height: 100vh;
  background: var(--bg-aside);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0 0 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 100;
}

.sidenav-brand {
  font-family: var(--font-deco);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding: 1.6rem 1.4rem 1.2rem;
  display: block;
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 12px var(--accent-glow);
  transition: text-shadow var(--transition);
}
.sidenav-brand:hover { color: #fff; text-shadow: 0 0 18px var(--accent); }

.sidenav-menu {
  padding: 0.8rem 0;
}
.sidenav-group-label {
  font-family: var(--font-deco);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  padding: 0.9rem 1.4rem 0.4rem;
  text-transform: uppercase;
}
.sidenav-menu dd {
  display: block;
}
.sidenav-menu dd a {
  display: block;
  padding: 0.65rem 1.4rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-left: 3px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.4;
}
.sidenav-menu dd a:hover,
.sidenav-menu dd a[aria-current="page"] {
  color: var(--accent);
  background: rgba(201,168,76,0.07);
  border-left-color: var(--accent);
  text-shadow: none;
}
.sidenav-menu dd a[aria-current="page"] { font-weight: 600; }

/* ---------- 页面主体 ---------- */
.page-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Hero (首页) ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(160deg, #000 60%, #0d0a00 100%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 760px;
  width: 100%;
  padding: 3rem 2rem;
  flex-direction: column;
  text-align: center;
}
.hero-deco {
  flex-shrink: 0;
}
.hero-deco img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}
.hero-text { flex: 1; }
.hero-eyebrow {
  font-family: var(--font-deco);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.hero-h1 {
  font-family: var(--font-deco);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: 0.06em;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 0 30px rgba(201,168,76,0.25);
  margin-bottom: 1rem;
}
.hero-lead {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 1.6rem;
}
.hero-cta {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: var(--accent);
  color: #000;
  font-family: var(--font-deco);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  border-radius: 4px;
  font-weight: 700;
  transition: background var(--transition), box-shadow var(--transition);
  min-height: 44px;
  line-height: 1.6;
}
.hero-cta:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 20px var(--accent);
  text-shadow: none;
}

/* ---------- Topic Banner ---------- */
.topic-banner {
  position: relative;
  min-height: 200px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #060606 60%, #0f0a00 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.topic-banner-inner {
  position: relative;
  z-index: 1;
  padding: 2rem 2.5rem 1.8rem;
  width: 100%;
}
.topic-h1 {
  font-family: var(--font-deco);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.05em;
  color: #fff;
  margin: 0.5rem 0 0.6rem;
}
.topic-lead {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 640px;
  line-height: 1.7;
}
.topic-date {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.breadcrumb a { color: var(--accent-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span[aria-hidden] { margin: 0 0.3em; color: var(--text-muted); }

/* ---------- 正文容器 ---------- */
.content-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 2rem 2rem;
  width: 100%;
}
.content-wrap--narrow {
  max-width: 680px;
}

/* ---------- Prose ---------- */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}
.prose h2 {
  font-family: var(--font-deco);
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin: 2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.prose h3 {
  font-family: var(--font-deco);
  font-size: 1.1rem;
  color: #ddd;
  margin: 1.5rem 0 0.5rem;
}
.prose p { margin-bottom: 1.2rem; }
.prose ul, .prose ol {
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--neon-blue); }
.prose a:hover { color: #fff; text-shadow: 0 0 8px var(--neon-blue); }
.prose strong { color: #fff; font-weight: 700; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.6rem 1.2rem;
  margin: 1.2rem 0;
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
  color: var(--text-dim);
  font-style: italic;
}
.prose code {
  background: #1a1a1a;
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--neon-purple);
}
.prose pre {
  background: #111;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
  overflow-x: auto;
  margin-bottom: 1.2rem;
}
.prose pre code { background: none; padding: 0; color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.2rem; }
.prose th {
  background: var(--bg-card);
  color: var(--accent);
  font-family: var(--font-deco);
  letter-spacing: 0.06em;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  text-align: left;
}
.prose td {
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.prose tr:nth-child(even) td { background: #0d0d0d; }

.prose--legal h2 { color: #ddd; }

/* ---------- 卡片 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.4rem;
  padding: 0 2rem 2rem;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--accent);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-bottom-color var(--transition);
  animation: staggerIn 0.4s ease both;
  animation-delay: calc(var(--stagger, 0) * 0.07s);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(201,168,76,0.12);
  border-bottom-color: #fff;
}
.card-media img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.card-body {
  padding: 1.2rem 1.4rem 1.4rem;
}
.card-title {
  display: block;
  font-family: var(--font-deco);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}
.card-title:hover { color: var(--accent); text-shadow: none; }
.card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-date {
  font-size: 0.78rem;
  color: var(--accent-dim);
  letter-spacing: 0.05em;
}

/* ---------- 子页列表 (topic) ---------- */
.item-list {
  padding: 0 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-top: 1px solid var(--border);
}
.item-dt {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border);
  animation: staggerIn 0.35s ease both;
  animation-delay: calc(var(--stagger, 0) * 0.06s);
  transition: background var(--transition);
}
.item-dt:hover { background: rgba(201,168,76,0.04); }
.item-thumb-wrap { flex-shrink: 0; }
.item-thumb-wrap img {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.item-info { flex: 1; min-width: 0; }
.item-link {
  display: block;
  font-family: var(--font-deco);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}
.item-link:hover { color: var(--accent); text-shadow: none; }
.item-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.4rem;
}
.item-date {
  font-size: 0.78rem;
  color: var(--accent-dim);
}

/* ---------- 章节标题 ---------- */
.section-topics,
.section-articles,
.section-children,
.section-related {
  padding: 2rem 0 0;
}
.section-heading {
  font-family: var(--font-deco);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 0 2rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.4rem;
}

/* ---------- Article Header ---------- */
.article-header {
  background: linear-gradient(160deg, #060606, #000);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.article-header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 2rem 1.5rem;
}
.article-h1 {
  font-family: var(--font-deco);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.25;
  margin: 0.5rem 0 0.8rem;
}
.article-meta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.article-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.article-date--mod { color: var(--accent-dim); }
.article-hero-wrap { margin-top: 1rem; }
.article-hero-img {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.article-footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.5rem 2rem 2rem;
}
.article-back {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.article-back a { color: var(--accent); }

/* ---------- About ---------- */
.about-header {
  padding: 3rem 2rem 1.5rem;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.about-deco-line {
  width: 48px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.2rem;
  box-shadow: 0 0 10px var(--accent-glow);
}
.about-h1 {
  font-family: var(--font-deco);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 0.7rem;
}
.about-lead {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 0.8rem;
}
.about-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.about-links {
  max-width: 820px;
  margin: 0 auto;
  padding: 1rem 2rem 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.about-link-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.6rem;
  background: var(--accent);
  color: #000;
  font-family: var(--font-deco);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  border-radius: 4px;
  font-weight: 700;
  transition: background var(--transition), box-shadow var(--transition);
}
.about-link-btn:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 16px var(--accent);
  text-shadow: none;
}
.about-link-btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.about-link-btn--ghost:hover {
  background: var(--accent);
  color: #000;
}

/* ---------- Privacy ---------- */
.privacy-header {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 2rem 1.2rem;
}
.privacy-tag {
  font-family: var(--font-deco);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  color: var(--neon-purple);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.privacy-h1 {
  font-family: var(--font-deco);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 0.5rem;
}
.privacy-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.privacy-footer-links {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.5rem 2rem 2.5rem;
  display: flex;
  gap: 1.5rem;
}
.privacy-link {
  font-size: 0.9rem;
  color: var(--accent-dim);
  padding: 0.5rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.privacy-link:hover { color: var(--accent); }

/* ---------- 页脚 ---------- */
.site-footer {
  background: #090909;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.5rem 2rem 1.5rem;
}
.footer-col-title {
  font-family: var(--font-deco);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}
.footer-col-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.footer-nav { display: flex; flex-direction: column; gap: 0; }
.footer-nav dt { display: block; }
.footer-nav dt a {
  display: block;
  font-size: 0.87rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.footer-nav dt a:hover { color: var(--accent); text-shadow: none; }
.footer-bottom {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.2rem 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.footer-notice {
  color: #444;
  font-size: 0.76rem;
  margin-top: 0.3rem;
}

/* ---------- Animations ---------- */
@keyframes staggerIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .hero-dot-bg, .topic-banner-dot { display: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  :root { --nav-w: 200px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 680px) {
  :root { --nav-w: 100%; }

  .layout-wrap { flex-direction: column; }

  .sidenav {
    width: 100%;
    height: auto;
    min-height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
  }
  .sidenav-brand { padding: 1rem 1.2rem; font-size: 1rem; }
  .sidenav-menu { display: flex; flex-wrap: wrap; padding: 0.4rem 0.6rem; gap: 0; }
  .sidenav-group-label { display: none; }
  .sidenav-menu dd { flex: 0 0 auto; }
  .sidenav-menu dd a {
    padding: 0.5rem 0.9rem;
    font-size: 0.82rem;
    min-height: 40px;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .sidenav-menu dd a:hover,
  .sidenav-menu dd a[aria-current="page"] {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
    background: rgba(201,168,76,0.07);
  }

  .hero { min-height: 70vh; }
  .hero-inner { padding: 2rem 1.2rem; gap: 1.2rem; }
  .hero-h1 { font-size: 1.8rem; }

  .topic-banner-inner { padding: 1.5rem 1.2rem 1.2rem; }
  .topic-h1 { font-size: 1.5rem; }

  .footer-cols { grid-template-columns: 1fr; gap: 1.2rem; padding: 1.5rem 1.2rem 1rem; }

  .card-grid { grid-template-columns: 1fr; padding: 0 1.2rem 1.5rem; }
  .section-heading { padding: 0 1.2rem 0.8rem; }
  .content-wrap { padding: 1.5rem 1.2rem 1.5rem; }
  .article-header-inner { padding: 1.5rem 1.2rem 1rem; }
  .article-footer { padding: 0.5rem 1.2rem 1.5rem; }
  .about-header { padding: 1.8rem 1.2rem 1rem; }
  .about-links { padding: 0.5rem 1.2rem 1.8rem; }
  .privacy-header { padding: 1.8rem 1.2rem 1rem; }
  .privacy-footer-links { padding: 0.5rem 1.2rem 1.8rem; }
  .item-list { padding: 0 1.2rem 1.5rem; }
  .footer-bottom { padding: 1rem 1.2rem; }
}

@media (max-width: 400px) {
  .hero-h1 { font-size: 1.5rem; }
  .sidenav-menu dd a { padding: 0.45rem 0.6rem; font-size: 0.78rem; }
}
