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

/* ============================================================
   CSS 变量 / 基础 Reset
   ============================================================ */
:root {
  --c-green: #00ff80;
  --c-blue:  #0000ff;
  --c-black: #000000;
  --c-white: #ffffff;
  --c-dark:  #0a0a0a;
  --c-dark2: #111111;
  --c-border: #00ff80;
  --c-text:  #e8e8e8;
  --c-muted: #888888;
  --sidebar-w: 260px;
  --aside-w: 220px;
  --gap: 0px;
  --font-title: 'Cinzel', Georgia, serif;
  --font-body:  'Josefin Sans', system-ui, sans-serif;
  --font-mono:  'Courier New', Courier, monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background: var(--c-dark);
  color: var(--c-text);
  min-height: 100vh;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-green); text-decoration: none; transition: none; }
a:hover { color: var(--c-white); text-decoration: underline; }
ul, ol, menu { list-style: none; }
button { cursor: pointer; font-family: inherit; }

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

/* 左侧导航 */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--c-black);
  border-right: 3px solid var(--c-green);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 100;
}

/* 主内容列 */
.main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* main + aside 横排 */
.main-col > main {
  flex: 1;
  min-width: 0;
}

/* 使 main 与 aside 并排 */
.main-col > main,
.main-col > .sidebar-right {
  display: block;
}

.main-col {
  display: grid;
  grid-template-columns: 1fr var(--aside-w);
  grid-template-rows: auto auto 1fr auto;
  grid-template-areas:
    "ticker  ticker"
    "breadcrumb breadcrumb"
    "main    aside"
    "footer  footer";
}

.ticker-bar          { grid-area: ticker; }
.breadcrumb          { grid-area: breadcrumb; }
.main-col > main     { grid-area: main; }
.sidebar-right       { grid-area: aside; }
.site-footer         { grid-area: footer; }

/* 首页无 breadcrumb，hero 单独 */
.page-home .main-col {
  grid-template-areas:
    "ticker  ticker"
    "hero    hero"
    "main    aside"
    "footer  footer";
}
.hero-banner { grid-area: hero; }

/* ============================================================
   公告条
   ============================================================ */
.ticker-bar {
  background: var(--c-green);
  color: var(--c-black);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 20px;
  border-bottom: 2px solid var(--c-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   侧边导航 (details > summary + menu > li > a)
   ============================================================ */
.sidebar-nav {
  width: 100%;
  height: 100%;
}

.sidebar-nav summary.nav-brand {
  display: flex;
  align-items: center;
  padding: 24px 16px 20px;
  cursor: pointer;
  list-style: none;
  border-bottom: 2px solid var(--c-green);
  user-select: none;
}

.sidebar-nav summary.nav-brand::-webkit-details-marker { display: none; }

.brand-text {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-green);
  line-height: 1.3;
  letter-spacing: 0.05em;
  word-break: break-all;
}

.sidebar-nav menu {
  padding: 12px 0;
}

.sidebar-nav menu li a {
  display: block;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  border-left: 3px solid transparent;
  transition: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sidebar-nav menu li a:hover,
.sidebar-nav menu li.active a {
  color: var(--c-green);
  border-left-color: var(--c-green);
  background: rgba(0,255,128,0.07);
  text-decoration: none;
}

/* ============================================================
   面包屑
   ============================================================ */
.breadcrumb {
  padding: 10px 24px;
  font-size: 13px;
  color: var(--c-muted);
  border-bottom: 1px solid #222;
  background: var(--c-dark2);
}

.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-green); }
.breadcrumb span { color: var(--c-green); margin: 0 4px; }

/* ============================================================
   Hero（首页）
   ============================================================ */
.hero-banner {
  position: relative;
  min-height: 45vh;
  background: var(--c-black);
  border-bottom: 4px solid var(--c-green);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,255,128,0.12) 0%, rgba(0,0,255,0.18) 100%);
  pointer-events: none;
}

.hero-slash {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--c-green);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 40px 32px 60px;
  max-width: 700px;
}

.hero-h1 {
  font-family: var(--font-title);
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 700;
  color: var(--c-green);
  line-height: 1.2;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero-sub {
  font-size: 15px;
  color: var(--c-text);
  margin-bottom: 24px;
  font-weight: 300;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  background: var(--c-green);
  color: var(--c-black);
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 32px;
  border: 3px solid var(--c-black);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: none;
  min-height: 44px;
}

.hero-cta:hover {
  background: var(--c-black);
  color: var(--c-green);
  border-color: var(--c-green);
  text-decoration: none;
}

/* ============================================================
   main > article > div
   ============================================================ */
main {
  padding: 0;
  background: var(--c-dark);
}

main > article {
  padding: 0;
}

main > article > div {
  padding: 28px 28px 20px;
  border-bottom: 1px solid #1a1a1a;
}

/* ============================================================
   标题
   ============================================================ */
h1.page-h1 {
  font-family: var(--font-title);
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
  color: var(--c-green);
  line-height: 1.2;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

h2 {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

h3 {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

hr {
  border: none;
  border-top: 2px solid var(--c-green);
  margin: 10px 0 18px;
}

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

.page-content p  { margin-bottom: 14px; }
.page-content h2 { margin-top: 24px; margin-bottom: 8px; }
.page-content h3 { margin-top: 18px; margin-bottom: 6px; }
.page-content ul, .page-content ol { padding-left: 20px; margin-bottom: 14px; list-style: disc; }
.page-content a  { color: var(--c-green); text-decoration: underline; }
.page-content strong { color: var(--c-white); font-weight: 700; }

/* ============================================================
   分类网格（首页）
   ============================================================ */
.cats-section { background: var(--c-dark2); }

.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.cat-block {
  background: rgba(0,255,128,0.03);
  border: 2px solid #222;
  padding: 18px 16px;
  border-radius: 4px;
  transition: none;
}

.cat-block:hover {
  border-color: var(--c-green);
  background: rgba(0,255,128,0.07);
}

.cat-block h3 {
  font-size: 13px;
  margin-bottom: 6px;
}

.cat-block h3 a {
  color: var(--c-green);
}

.cat-block p {
  font-size: 13px;
  color: var(--c-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.cat-children {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cat-children li a {
  font-size: 12px;
  color: var(--c-muted);
  border: 1px solid #333;
  padding: 2px 8px;
  border-radius: 2px;
}

.cat-children li a:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  text-decoration: none;
}

/* ============================================================
   标签区（首页）
   ============================================================ */
.tags-section { background: var(--c-dark); }

.tags-wrap { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.tag-pill {
  display: inline-block;
  background: var(--c-blue);
  color: var(--c-white);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border: 2px solid var(--c-blue);
  letter-spacing: 0.05em;
  min-height: 32px;
}

.tag-pill:hover {
  background: var(--c-green);
  color: var(--c-black);
  border-color: var(--c-green);
  text-decoration: none;
}

/* ============================================================
   子页列表 (dl > dt > a + dd)
   ============================================================ */
.entry-list {
  margin-top: 8px;
}

.entry-list dt {
  margin-top: 12px;
  margin-bottom: 2px;
}

.entry-list dt a {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 600;
  color: var(--c-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
  padding: 4px 0;
  min-height: 40px;
  line-height: 1.4;
}

.entry-list dt a:hover {
  color: var(--c-white);
  text-decoration: underline;
}

.entry-list dd {
  font-size: 13px;
  color: var(--c-muted);
  padding-left: 0;
  border-left: 3px solid #222;
  padding-left: 10px;
  margin-bottom: 6px;
  line-height: 1.5;
}

.entry-list dd time {
  color: var(--c-blue);
  font-family: var(--font-mono);
  font-size: 11px;
  margin-left: 8px;
}

/* ============================================================
   Entry 详情
   ============================================================ */
.entry-hero-section { background: var(--c-dark2); }

.entry-hero-img {
  margin-bottom: 16px;
  border: 2px solid var(--c-green);
  max-width: 600px;
}

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

.entry-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  margin-bottom: 4px;
}

.entry-meta time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-muted);
  border: 1px solid #333;
  padding: 3px 8px;
}

/* ============================================================
   右侧 aside
   ============================================================ */
.sidebar-right {
  background: var(--c-dark2);
  border-left: 2px solid #1a1a1a;
  padding: 24px 16px;
  min-width: 0;
}

.sidebar-right h3 {
  font-size: 12px;
  margin-bottom: 6px;
}

.aside-links {
  margin-top: 6px;
}

.aside-links li {
  border-bottom: 1px solid #1e1e1e;
}

.aside-links li a {
  display: block;
  padding: 9px 0;
  font-size: 13px;
  color: var(--c-text);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.aside-links li a:hover {
  color: var(--c-green);
  text-decoration: none;
}

.aside-links li a.active {
  color: var(--c-green);
  font-weight: 700;
}

.aside-more {
  margin-top: 16px;
}

.aside-more a {
  font-size: 12px;
  color: var(--c-muted);
  text-decoration: underline;
}

.back-cat {
  margin-top: 20px;
}

.btn-back {
  display: inline-block;
  background: transparent;
  color: var(--c-green);
  border: 2px solid var(--c-green);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  min-height: 40px;
  display: flex;
  align-items: center;
}

.btn-back:hover {
  background: var(--c-green);
  color: var(--c-black);
  text-decoration: none;
}

/* ============================================================
   About 专属
   ============================================================ */
.about-hero { background: var(--c-dark2); }

.about-brand-block {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 20px;
  border: 2px solid var(--c-green);
  background: rgba(0,255,128,0.03);
  border-radius: 4px;
}

.about-logo {
  max-height: 80px;
  width: auto;
}

.about-brand-text {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.06em;
}

.about-desc {
  font-size: 14px;
  color: var(--c-muted);
  line-height: 1.6;
  flex: 1;
  min-width: 200px;
}

/* ============================================================
   Legal / Privacy
   ============================================================ */
.prose-legal {
  max-width: 680px;
}

.prose-legal h2 {
  margin-top: 28px;
  margin-bottom: 6px;
  font-size: 16px;
}

.prose-legal p { margin-bottom: 12px; }

/* ============================================================
   页脚 (footer 三列 dl)
   ============================================================ */
.site-footer {
  background: var(--c-black);
  border-top: 3px solid var(--c-green);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid #1a1a1a;
}

.footer-cols dl {
  padding: 20px 20px 16px;
  border-right: 1px solid #1a1a1a;
}

.footer-cols dl:last-child { border-right: none; }

.footer-cols dt {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.footer-cols dd {
  margin-bottom: 6px;
}

.footer-cols dd a {
  font-size: 13px;
  color: var(--c-muted);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}

.footer-cols dd a:hover {
  color: var(--c-green);
  text-decoration: none;
}

.footer-bar {
  text-align: center;
  padding: 14px 20px;
  font-size: 12px;
  color: var(--c-muted);
  font-family: var(--font-mono);
}

/* ============================================================
   Parallax / Micro-interaction (prefers-reduced-motion)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .cat-block {
    transform: translateY(0);
    transition: transform 0.1s, border-color 0.1s, background 0.1s;
  }
  .cat-block:hover { transform: translateY(-2px); }

  .hero-cta {
    transition: background 0.08s, color 0.08s, border-color 0.08s;
  }

  .sidebar-nav menu li a {
    transition: color 0.08s, border-left-color 0.08s, background 0.08s;
  }

  .entry-list dt a {
    transition: color 0.08s;
  }
}

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

/* ============================================================
   响应式 — 平板 (≤900px)
   ============================================================ */
@media (max-width: 900px) {
  .main-col {
    grid-template-columns: 1fr;
    grid-template-areas:
      "ticker"
      "hero"
      "breadcrumb"
      "main"
      "aside"
      "footer";
  }

  .sidebar-right {
    border-left: none;
    border-top: 2px solid #1a1a1a;
    padding: 16px 20px;
  }

  .cats-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

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

  .footer-cols dl:nth-child(2) { border-right: none; }
  .footer-cols dl:nth-child(3) {
    grid-column: 1 / -1;
    border-right: none;
    border-top: 1px solid #1a1a1a;
  }
}

/* ============================================================
   响应式 — 手机 (≤640px)
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --sidebar-w: 0px;
  }

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

  .sidebar {
    width: 100%;
    min-width: 0;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 3px solid var(--c-green);
  }

  .sidebar-nav {
    width: 100%;
  }

  .sidebar-nav summary.nav-brand {
    padding: 14px 16px;
  }

  .sidebar-nav[open] menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-nav menu li a {
    font-size: 12px;
    padding: 10px 12px;
    min-height: 44px;
  }

  .hero-banner {
    min-height: 40vh;
  }

  .hero-inner {
    padding: 28px 16px 48px;
  }

  .hero-h1 {
    font-size: 20px;
  }

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

  .page-h1 {
    font-size: 20px;
  }

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

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

  .footer-cols dl {
    border-right: none;
    border-bottom: 1px solid #1a1a1a;
  }

  .entry-list dt a {
    font-size: 14px;
  }

  .ticker-bar {
    font-size: 12px;
    padding: 8px 12px;
  }

  .breadcrumb {
    padding: 8px 14px;
  }

  .sidebar-right {
    padding: 16px 14px;
  }
}

/* ============================================================
   滚动条美化
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--c-dark); }
::-webkit-scrollbar-thumb { background: var(--c-green); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--c-white); }

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