/* ============================================================
   基督教世界新闻 · 静态站样式
   深蓝主调 + 金色强调，Noto 字体，桌面/移动自适应
   ============================================================ */
:root {
  --bg: #eef1f6;
  --group: #ffffff;
  --ink: #1b2433;
  --muted: #6a7488;
  --accent: #1f3a5f;
  --accent-2: #2f5d8f;
  --gold: #c8932f;
  --gold-2: #e0a93f;
  --separator: rgba(31, 58, 95, 0.12);
  --shadow: 0 1px 2px rgba(31, 58, 95, .06), 0 10px 30px rgba(31, 58, 95, .08);
  --radius: 16px;
  --font: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC",
          "Microsoft YaHei", system-ui, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif SC", Georgia, "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--separator);
  box-shadow: 0 2px 12px rgba(31, 58, 95, .06);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 16px; flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--accent);
}
.logo-mark {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--gold-2); font-size: 18px; font-weight: 700;
}
.logo-text { font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.logo-text em { font-style: normal; font-family: var(--font-serif); color: var(--accent-2); }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 6px 11px; border-radius: 9px; transition: .15s;
}
.main-nav a:hover { color: var(--accent); background: rgba(31, 58, 95, .06); }

/* ---------- 容器 ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.container { padding-bottom: 48px; }

/* ---------- Hero 标题区 ---------- */
.hero {
  position: relative; overflow: hidden;
  margin: 18px 0 16px; padding: 26px 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1f3a5f, #2f5d8f 78%);
  color: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(224, 169, 63, .35), transparent 70%);
}
.hero--compact { margin-top: 18px; }
.hero-main { position: relative; z-index: 1; }
.hero h1 {
  font-family: var(--font-serif); font-size: 30px; font-weight: 700;
  letter-spacing: 1px; line-height: 1.25;
}
.hero-sub { margin-top: 7px; font-size: 14px; color: rgba(255, 255, 255, .82); max-width: 580px; }
.hero-tools {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.updated-pill {
  font-size: 12px; color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .14); padding: 5px 12px;
  border-radius: 20px; white-space: nowrap;
}
.date-nav {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .14); padding: 6px 8px; border-radius: 14px;
}
.date-nav-title {
  min-width: 98px; text-align: center; font-weight: 700; font-size: 14px;
  color: #fff; font-variant-numeric: tabular-nums;
}
.btn-date {
  border: none; background: #fff; color: var(--accent);
  width: 32px; height: 32px; border-radius: 10px; cursor: pointer;
  font-size: 16px; line-height: 1; display: grid; place-items: center;
  transition: .15s; box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.btn-date:hover { background: var(--gold-2); color: #fff; }
.btn-date:disabled { opacity: .4; cursor: default; }
.btn-date--all { width: auto; padding: 0 12px; font-size: 13px; font-weight: 600; }

/* ---------- 首页布局 ---------- */
.home-layout { display: flex; gap: 22px; align-items: flex-start; }
.main-col { flex: 1 1 auto; min-width: 0; }
.sidebar { width: 290px; flex: 0 0 290px; position: sticky; top: 72px; }

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--group); border: 1px solid var(--separator);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
  font-size: 14px; box-shadow: var(--shadow);
}
.btn-clear {
  border: none; background: rgba(200, 147, 47, .12); color: var(--gold);
  padding: 5px 12px; border-radius: 10px; cursor: pointer; font-size: 13px;
}

/* ---------- 时间线 ---------- */
.timeline { display: flex; flex-direction: column; gap: 18px; }
.date-section { background: transparent; }
.date-header {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px;
  border-left: 3px solid var(--gold); padding-left: 10px;
}
.date-header h2 { font-size: 16px; display: flex; gap: 8px; align-items: baseline; }
.date-badge { color: var(--accent-2); font-variant-numeric: tabular-nums; }
.date-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.date-count { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ---------- 文章卡片 ---------- */
.article-list { display: flex; flex-direction: column; gap: 10px; }
.article-card {
  background: var(--group); border: 1px solid var(--separator);
  border-left: 4px solid var(--accent-2);
  border-radius: var(--radius); padding: 15px 18px; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.article-card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31, 58, 95, .14); }
.article-card.cat-persecution { border-left-color: #b32414; }
.article-card.cat-mission { border-left-color: #2f5d8f; }
.article-card.cat-church { border-left-color: #5b3da0; }
.article-card.cat-theology { border-left-color: #c8932f; }
.article-card.cat-heresy { border-left-color: #b34a1a; }
.article-card.cat-culture { border-left-color: #1f7a64; }
.article-card.cat-wiki { border-left-color: #6a7488; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; font-size: 12px; }
.category-tag {
  font-weight: 700; padding: 2px 9px; border-radius: 20px;
  background: rgba(31, 58, 95, .08); color: var(--accent);
}
.cat-persecution { background: rgba(200, 60, 47, .12); color: #b32414; }
.cat-mission { background: rgba(47, 93, 143, .14); color: var(--accent-2); }
.cat-church { background: rgba(120, 90, 160, .14); color: #5b3da0; }
.cat-theology { background: rgba(200, 147, 47, .16); color: #946a16; }
.cat-heresy { background: rgba(200, 80, 40, .15); color: #b34a1a; }
.cat-culture { background: rgba(40, 140, 120, .14); color: #1f7a64; }
.cat-wiki { background: rgba(110, 120, 140, .14); color: #566; }
.source { color: var(--muted); }
.region { color: var(--gold); font-weight: 600; }
.country { color: #9aa3b5; }
.date { color: #9aa3b5; }
.article-card h3 { font-family: var(--font-serif); font-size: 17px; line-height: 1.5; font-weight: 600; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: var(--accent-2); text-decoration: underline; }
.title-original { font-size: 12px; color: var(--muted); margin-top: 3px; font-style: italic; }
.article-card p { font-size: 14px; color: #46506a; margin-top: 8px; line-height: 1.75; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { font-size: 11.5px; color: var(--accent-2); background: rgba(47, 93, 143, .08); padding: 2px 8px; border-radius: 8px; }

/* ---------- 侧栏小部件 ---------- */
.widget {
  background: var(--group); border: 1px solid var(--separator);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.widget h3 { font-size: 14px; color: var(--accent); margin-bottom: 10px; }
.hot-list { display: flex; flex-direction: column; gap: 4px; }
.hot-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 6px;
  border-radius: 10px; cursor: pointer; font-size: 13.5px;
}
.hot-item:hover { background: rgba(31, 58, 95, .05); }
.hot-rank {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--bg); color: var(--muted);
}
.hot-rank.rank-1 { background: var(--gold); color: #fff; }
.hot-rank.rank-2 { background: #b7bcc6; color: #fff; }
.hot-rank.rank-3 { background: #c79a5c; color: #fff; }
.hot-name { flex: 1; color: var(--ink); }
.hot-count { font-size: 12px; color: var(--muted); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-tag {
  font-size: 13px; color: var(--accent-2); background: rgba(47, 93, 143, .08);
  padding: 5px 11px; border-radius: 20px; cursor: pointer;
}
.topic-tag:hover { background: rgba(47, 93, 143, .16); }
.topic-tag .count { color: var(--muted); font-size: 11px; margin-left: 4px; }

/* ---------- 分类页 ---------- */
.category-header { padding: 22px 0 10px; }
.category-header h1 { font-size: 24px; color: var(--accent); }
.category-header p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.filters { display: flex; gap: 10px; margin: 12px 0 16px; flex-wrap: wrap; }
.filters input, .filters select {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--separator);
  background: var(--group); font-size: 14px; color: var(--ink); font-family: var(--font);
}
.filters input { flex: 1; min-width: 200px; }
.compact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

/* ---------- 信息源页 ---------- */
.sources-page { padding-top: 20px; }
.sources-header h1 { font-size: 24px; color: var(--accent); }
.sources-header p { color: var(--muted); margin: 6px 0 18px; }
.source-group { margin-bottom: 22px; }
.source-group h2 {
  font-size: 17px; color: var(--ink); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.group-count { font-size: 12px; color: var(--muted); font-weight: 500; }
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.source-card {
  display: block; background: var(--group); border: 1px solid var(--separator);
  border-radius: var(--radius); padding: 12px 14px; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s ease;
}
.source-card:hover { transform: translateY(-1px); }
.source-card-head { display: flex; justify-content: space-between; align-items: center; }
.source-card-name { font-weight: 700; font-size: 14.5px; color: var(--accent); }
.country-badge { font-size: 11px; color: #fff; background: var(--accent-2); padding: 1px 7px; border-radius: 8px; }
.source-card-url { font-size: 11.5px; color: var(--muted); margin: 5px 0; word-break: break-all; }
.source-card-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--muted); }
.parser-tag { background: rgba(200, 147, 47, .14); color: #946a16; padding: 1px 7px; border-radius: 6px; }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--separator); margin-top: 30px;
  padding: 22px 16px; background: var(--group);
}
.site-footer p { text-align: center; color: var(--muted); font-size: 13px; }
.site-footer .disclaimer { font-size: 11.5px; margin-top: 6px; opacity: .85; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .home-layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .widget { margin-bottom: 0; }
  .hero { padding: 20px 18px; }
  .hero h1 { font-size: 24px; }
  .main-nav { font-size: 13px; gap: 2px; }
  .main-nav a { padding: 6px 8px; }
}
@media (max-width: 560px) {
  .sidebar { grid-template-columns: 1fr; }
  .hero-tools { align-items: flex-start; width: 100%; }
  .date-nav { width: 100%; justify-content: space-between; }
  .date-nav-title { flex: 1; }
}

/* ---------- 立场 / 争议标记 ---------- */
.chk-inline {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: rgba(255, 255, 255, .92); cursor: pointer;
  background: rgba(255, 255, 255, .14); padding: 6px 12px; border-radius: 20px;
  white-space: nowrap; user-select: none;
}
.chk-inline input { accent-color: var(--gold-2); width: 15px; height: 15px; }
.filters .chk-inline { background: rgba(31, 58, 95, .06); color: var(--accent); }
.stance-tag, .flag-tag {
  font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  white-space: nowrap; line-height: 1.6;
}
.stance-warn { background: rgba(179, 36, 20, .12); color: #b32414; border: 1px solid rgba(179, 36, 20, .25); }
.stance-info { background: rgba(110, 120, 140, .14); color: #566; }
.flag-tag { background: rgba(200, 147, 47, .14); color: #946a16; }
.legend-widget p {
  font-size: 12.5px; color: var(--muted); margin-top: 7px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
