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

/* ===== CSS 自定义属性 ===== */
:root {
  --c-dark: #1A1A2E;
  --c-accent: #E94560;
  --c-light: #F5F5F5;
  --c-dark2: #16213E;
  --c-dark3: #0F3460;
  --c-accent2: #c73652;
  --c-text: #F5F5F5;
  --c-text-muted: rgba(245,245,245,0.6);
  --c-text-dim: rgba(245,245,245,0.4);
  --c-border: rgba(245,245,245,0.1);
  --c-glass: rgba(255,255,255,0.04);
  --c-glass-border: rgba(255,255,255,0.08);
  --radius-card: 28px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --nav-h: 64px;
  --max-w: 1200px;
  --gap: 24px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --trans: 150ms ease;
  --trans-std: 200ms ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--c-dark);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== 排版基础 ===== */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; }
p { line-height: 1.7; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background var(--trans), color var(--trans), border-color var(--trans);
  min-height: 44px;
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-accent);
  color: #fff;
  border: 2px solid var(--c-accent);
}
.btn--primary:hover { background: var(--c-accent2); border-color: var(--c-accent2); }
.btn--outline {
  background: transparent;
  color: var(--c-text);
  border: 2px solid var(--c-text);
}
.btn--outline:hover { background: var(--c-text); color: var(--c-dark); }

/* ===== 玻璃拟态卡片 ===== */
.glass-card {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background var(--trans-std), border-color var(--trans-std);
}
.glass-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

/* ===== 通用区块标题 ===== */
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
}
.section-title + hr {
  border: none;
  border-top: 2px solid var(--c-accent);
  margin-bottom: 24px;
  width: 48px;
}
hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 16px 0;
}
.section-sub {
  color: var(--c-text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}
.section-head { margin-bottom: 0; }

/* ===== 导航栏 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-dark);
  border-bottom: 1px solid var(--c-border);
  height: var(--nav-h);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-brand {
  flex-shrink: 0;
  order: 2;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo { width: 32px; height: 32px; border-radius: 4px; }
.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.header-nav { order: 1; flex: 1; }
.header-nav--right { order: 3; }
.header-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-nav--right ul { justify-content: flex-end; }
.header-nav a {
  display: block;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--trans), background var(--trans);
  min-height: 40px;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--c-text); background: rgba(255,255,255,0.06); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  order: 4;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  transition: background var(--trans);
}
.mobile-menu {
  background: var(--c-dark2);
  border-top: 1px solid var(--c-border);
  padding: 16px 24px;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: color var(--trans), background var(--trans);
}
.mobile-menu a:hover { color: var(--c-text); background: rgba(255,255,255,0.06); }

/* ===== 面包屑 ===== */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 13px;
  color: var(--c-text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--c-text-muted); transition: color var(--trans); }
.breadcrumb a:hover { color: var(--c-accent); }
.bc-sep { color: var(--c-text-dim); }
.bc-current { color: var(--c-text); }

/* ===== Hero（首页） ===== */
.hero {
  position: relative;
  min-height: 70vh;
  background: var(--c-dark2);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-slash {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-dark) 0%, var(--c-dark) 45%, var(--c-dark3) 45%, var(--c-dark3) 55%, var(--c-dark2) 55%, var(--c-dark2) 100%);
  z-index: 0;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 60%;
  height: 6px;
  background: var(--c-accent);
  z-index: 2;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px;
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
}
.hero-text {
  flex: 0 0 auto;
  max-width: 560px;
}
.hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--c-text);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}
.hero-desc {
  font-size: 17px;
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 460px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-media {
  flex: 1;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 320px;
}
.hero-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
}
.hero-img--a { transform: translateY(0); }
.hero-img--b { transform: translateY(40px); }

/* ===== 分类卡片网格 ===== */
.cats-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px;
}
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.cat-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cat-icon { font-size: 36px; line-height: 1; }
.cat-name { font-size: 17px; font-weight: 600; }
.cat-name a { color: var(--c-text); transition: color var(--trans); }
.cat-name a:hover { color: var(--c-accent); }
.cat-desc { font-size: 14px; color: var(--c-text-muted); line-height: 1.6; flex: 1; }
.cat-link { font-size: 13px; font-weight: 600; color: var(--c-accent); transition: color var(--trans); }
.cat-link:hover { color: var(--c-accent2); }

/* ===== 首页布局 ===== */
.home-layout { width: 100%; }
.content-with-aside {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 64px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

/* ===== 内页布局（含 aside） ===== */
.inner-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ===== 主内容区 ===== */
.main-content { min-width: 0; }
.wrap { width: 100%; }
.page-section { width: 100%; }
.page-article { width: 100%; }

/* ===== 正文内容区 ===== */
.content-area {
  font-size: 16px;
  line-height: 1.8;
  color: var(--c-text);
}
.content-area h2 {
  font-size: 22px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 8px;
  color: var(--c-text);
}
.content-area h2 + hr {
  border: none;
  border-top: 2px solid var(--c-accent);
  margin-bottom: 20px;
  width: 40px;
}
.content-area h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
}
.content-area h3 + hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin-bottom: 16px;
}
.content-area p { margin-bottom: 16px; color: var(--c-text-muted); }
.content-area ul, .content-area ol {
  margin: 16px 0;
  padding-left: 24px;
  color: var(--c-text-muted);
}
.content-area ul { list-style: disc; }
.content-area ol { list-style: decimal; }
.content-area li { margin-bottom: 8px; line-height: 1.7; }
.content-area a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 3px; }
.content-area a:hover { color: var(--c-accent2); }
.content-area strong { color: var(--c-text); font-weight: 600; }
.content-area table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}
.content-area th {
  background: var(--c-dark3);
  color: var(--c-text);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
.content-area td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
.content-area tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== aside ===== */
.global-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.aside-block {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.aside-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--c-text);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.aside-title + hr {
  border: none;
  border-top: 2px solid var(--c-accent);
  width: 32px;
  margin-bottom: 16px;
}
.aside-links { display: flex; flex-direction: column; gap: 4px; }
.aside-links li a {
  display: block;
  padding: 7px 10px;
  font-size: 14px;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--trans), background var(--trans);
}
.aside-links li a:hover { color: var(--c-text); background: rgba(255,255,255,0.06); }

/* ===== 标签 ===== */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(233,69,96,0.15);
  color: var(--c-accent);
  border: 1px solid rgba(233,69,96,0.3);
  transition: background var(--trans), color var(--trans);
  min-height: 28px;
}
.tag-badge:hover { background: var(--c-accent); color: #fff; }
.tag-badge--lg { padding: 8px 18px; font-size: 14px; min-height: 40px; }
.tag-badge--active { background: var(--c-accent); color: #fff; }

/* ===== 子条目卡片列表 ===== */
.child-entries {
  padding: 40px 0 0;
}
.child-entries > h2 { margin-bottom: 8px; }
.tag-entries {
  padding: 40px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.tag-entries > h2 { margin-bottom: 8px; }
.entry-card {
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.entry-card-body { flex: 1; }
.entry-card-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.entry-card-title a { color: var(--c-text); transition: color var(--trans); }
.entry-card-title a:hover { color: var(--c-accent); }
.entry-card-desc { font-size: 14px; color: var(--c-text-muted); line-height: 1.6; margin-bottom: 8px; }
.entry-date { font-size: 12px; color: var(--c-text-dim); }
.entry-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 11px;
  border-radius: 12px;
  background: rgba(255,255,255,0.06);
  color: var(--c-text-muted);
  margin-bottom: 8px;
}
.entry-cat-badge a { color: inherit; transition: color var(--trans); }
.entry-cat-badge a:hover { color: var(--c-accent); }
.entry-card-cta {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-accent);
  transition: color var(--trans);
  white-space: nowrap;
  align-self: center;
}
.entry-card-cta:hover { color: var(--c-accent2); }

/* ===== 条目详情页 ===== */
.entry-header { margin-bottom: 32px; }
.entry-title { font-size: clamp(26px, 4vw, 40px); font-weight: 700; margin-bottom: 16px; }
.entry-meta { display: flex; gap: 24px; flex-wrap: wrap; }
.meta-date { font-size: 13px; color: var(--c-text-dim); }
.entry-hero-media { margin-bottom: 32px; border-radius: var(--radius-md); overflow: hidden; }
.entry-hero-img { width: 100%; max-height: 400px; object-fit: cover; }
.entry-body { margin-top: 0; }

/* ===== 页面横幅（分类/标签页） ===== */
.page-banner {
  background: var(--c-dark2);
  border-bottom: 3px solid var(--c-accent);
}
.page-banner-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
}
.banner-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.banner-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 8px;
}
.banner-date { font-size: 13px; color: var(--c-text-dim); }

/* ===== 标签横幅 ===== */
.tag-banner {
  background: linear-gradient(90deg, var(--c-dark3) 0%, var(--c-dark2) 100%);
  border-left: 6px solid var(--c-accent);
}
.tag-banner-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
}
.tag-label {
  display: inline-block;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--c-accent);
  color: #fff;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.tag-title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 8px; }
.tag-count { font-size: 14px; color: var(--c-text-muted); }
.all-tags-section {
  padding: 40px 0 0;
}
.all-tags-section > h2 { margin-bottom: 8px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== 关于页横幅 ===== */
.about-hero {
  background: var(--c-dark2);
  position: relative;
  overflow: hidden;
}
.about-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--c-accent);
}
.about-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px;
}
.about-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.about-title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 8px; }
.about-date { font-size: 13px; color: var(--c-text-dim); }
.about-features {
  padding: 40px 0 0;
}
.about-features > h2 { margin-bottom: 8px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
}
.feature-item { padding: 24px; }
.feature-icon { font-size: 32px; margin-bottom: 12px; }
.feature-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-desc { font-size: 14px; color: var(--c-text-muted); line-height: 1.6; }

/* ===== 隐私页横幅 ===== */
.privacy-header {
  background: var(--c-dark3);
  border-bottom: 3px solid var(--c-accent);
}
.privacy-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
}
.privacy-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: 12px;
}
.privacy-title { font-size: clamp(28px, 4vw, 44px); font-weight: 700; margin-bottom: 8px; }
.privacy-date { font-size: 13px; color: var(--c-text-dim); }
.privacy-article { max-width: 760px; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-dark2);
  border-top: 1px solid var(--c-border);
  margin-top: 64px;
}
.footer-top {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 64px 24px 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-col {}
.footer-brand { margin-bottom: 16px; }
.footer-brand .brand-name { font-size: 20px; }
.footer-tagline { font-size: 14px; color: var(--c-text-muted); line-height: 1.6; max-width: 260px; }
.footer-col-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-text);
  margin-bottom: 16px;
}
.footer-nav-col nav dl { display: flex; flex-direction: column; gap: 4px; }
.footer-nav-col nav dt, .footer-nav-col nav dd { margin: 0; }
.footer-nav-col nav a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--c-text-muted);
  transition: color var(--trans);
}
.footer-nav-col nav a:hover { color: var(--c-accent); }
.footer-bottom-nav {
  display: flex;
  flex-direction: row;
  gap: 0;
  align-items: center;
}
.footer-bottom-nav dt, .footer-bottom-nav dd { margin: 0; }
.footer-bottom-nav a {
  display: inline-flex;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--c-text-dim);
  transition: color var(--trans);
}
.footer-bottom-nav a:hover { color: var(--c-text); }
.footer-subscribe {
  background: var(--c-dark3);
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 100%;
}
.footer-subscribe-text {
  font-size: 15px;
  color: var(--c-text-muted);
  max-width: 500px;
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--c-border);
}
.footer-copy { font-size: 13px; color: var(--c-text-dim); }

/* ===== 动效：Scroll Reveal + Stagger ===== */
.reveal-section { opacity: 1; }
.reveal-item {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.reveal-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-item:nth-child(1) { transition-delay: 0ms; }
.reveal-item:nth-child(2) { transition-delay: 60ms; }
.reveal-item:nth-child(3) { transition-delay: 120ms; }
.reveal-item:nth-child(4) { transition-delay: 180ms; }
.reveal-item:nth-child(5) { transition-delay: 240ms; }
.reveal-item:nth-child(6) { transition-delay: 300ms; }

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

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .hero-media { display: none; }
  .hero-text { max-width: 100%; }
}

@media (max-width: 768px) {
  :root { --nav-h: 56px; }

  .header-nav { display: none; }
  .nav-toggle { display: flex; }

  .hero { min-height: auto; }
  .hero-content { padding: 56px 24px; flex-direction: column; }
  .hero-title { font-size: 32px; }

  .content-with-aside,
  .inner-layout {
    grid-template-columns: 1fr;
    padding: 24px 16px 48px;
    gap: 32px;
  }

  .global-aside { position: static; }

  .cats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .cats-section { padding: 40px 16px; }

  .footer-top {
    grid-template-columns: 1fr;
    padding: 40px 16px 32px;
    gap: 28px;
  }
  .footer-subscribe {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 16px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }

  .breadcrumb { padding: 12px 16px; }
  .page-banner-inner,
  .tag-banner-inner,
  .about-hero-inner,
  .privacy-header-inner { padding: 36px 16px; }

  .tag-entries { padding: 32px 16px; }
  .entry-card { flex-direction: column; gap: 12px; }
  .entry-card-cta { align-self: flex-start; }
}

@media (max-width: 480px) {
  .cats-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .footer-bottom-nav { flex-wrap: wrap; }
}
