/* ============================================================
 *  style.css — 全球热点深度解读
 *  专业时政风格 · 深色为主 · 解读卡片式布局
 * ============================================================ */

[hidden] { display: none !important; }

:root {
  --bg:        #0a0e1a;
  --bg-soft:   #0f1420;
  --card:      #131927;
  --card-hover:#1a2138;
  --line:      #1e2740;
  --line-2:    #2a3654;
  --text:      #e8edf5;
  --text-dim:  #94a3b8;
  --text-mute: #64708a;
  --accent:    #3b82f6;
  --accent-2:  #60a5fa;
  --danger:    #ef4444;
  --warn:      #f59e0b;
  --ok:        #10b981;
  --gold:      #fbbf24;
  --silver:    #cbd5e1;
  --bronze:    #d97706;
  --mono:      'JetBrains Mono', 'Consolas', 'Courier New', monospace;
  --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
               'Microsoft YaHei', 'Helvetica Neue', sans-serif;
}

html[data-theme="light"] {
  --bg:        #f8fafc;
  --bg-soft:   #f1f5f9;
  --card:      #ffffff;
  --card-hover:#f8fafc;
  --line:      #e2e8f0;
  --line-2:    #cbd5e1;
  --text:      #0f172a;
  --text-dim:  #475569;
  --text-mute: #94a3b8;
  --accent:    #2563eb;
  --accent-2:  #3b82f6;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============ 顶部导航 ============ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .topbar { background: rgba(248, 250, 252, 0.92); }

.topbar-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 12px 22px;
  display: flex; align-items: center; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 10px; font-size: 22px; color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.brand h1 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.brand .sub { font-size: 11px; color: var(--text-mute); font-family: var(--mono); }

.spacer { flex: 1; }

.ctrls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.clock {
  font-family: var(--mono); font-size: 12px; color: var(--text-mute);
  padding: 6px 10px; background: var(--card); border-radius: 6px;
  border: 1px solid var(--line);
}

.field { display: flex; align-items: center; gap: 6px; }
.search {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px;
}
.search span { color: var(--text-mute); }
.search input {
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 13px; width: 220px;
}
.search input::placeholder { color: var(--text-dim); opacity: 0.9; }
.search .clr {
  cursor: pointer; color: var(--text-mute); padding: 0 4px;
  font-size: 16px; line-height: 1;
}
.search .clr:hover { color: var(--text); }

select, .btn {
  background: var(--card); border: 1px solid var(--line);
  color: var(--text); padding: 7px 12px; border-radius: 8px;
  font-size: 13px; cursor: pointer; font-family: var(--sans);
  transition: border-color .15s, background .15s;
}
select:hover, .btn:hover { border-color: var(--accent); background: var(--card-hover); }

.btn { font-weight: 500; }

/* ============ 状态条 ============ */
.status-bar {
  max-width: 1400px; margin: 0 auto;
  padding: 8px 22px;
  font-size: 12px; color: var(--text-dim);
  font-family: var(--mono);
  border-bottom: 1px solid var(--line);
}
.status-bar.busy::before {
  content: ''; display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent);
  margin-right: 6px; vertical-align: middle;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* ============ 局势综述 ============ */
.digest-section {
  max-width: 1400px; margin: 20px auto 16px;
  padding: 0 22px;
}
.digest-card {
  background: linear-gradient(135deg, var(--card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 22px 26px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.digest-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.digest-ico { color: var(--accent); font-size: 20px; }
.digest-head h2 { font-size: 17px; font-weight: 700; flex: 1; }
.digest-time {
  font-size: 11px; color: var(--text-mute); font-family: var(--mono);
}
.digest-body {
  font-size: 14.5px; line-height: 1.85;
  color: var(--text); white-space: pre-wrap;
  text-indent: 2em;
}

/* ============ 分类标签 ============ */
.tabs-wrap {
  max-width: 1400px; margin: 0 auto 16px;
  padding: 0 22px;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.tab {
  background: transparent; border: 1px solid var(--line);
  color: var(--text-dim); padding: 6px 14px; border-radius: 20px;
  font-size: 13px; cursor: pointer; font-family: var(--sans);
  transition: all .15s;
  display: flex; align-items: center; gap: 6px;
}
.tab:hover { border-color: var(--accent-2); color: var(--text); }
.tab.on {
  background: var(--accent); border-color: var(--accent);
  color: #fff;
}
.tab-cnt {
  font-size: 11px; padding: 1px 6px; border-radius: 8px;
  background: rgba(255,255,255,0.15); font-family: var(--mono);
}
.tab:not(.on) .tab-cnt { background: var(--card); color: var(--text-mute); }

/* ============ 新闻卡片网格 ============ */
.grid {
  max-width: 1400px; margin: 0 auto;
  padding: 0 22px 40px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 16px;
}

.loading-placeholder, .error-placeholder {
  grid-column: 1 / -1;
  text-align: center; padding: 80px 22px;
  color: var(--text-mute); font-size: 14px;
}
.error-placeholder .empty-ico { font-size: 40px; margin-bottom: 12px; }
.err-detail {
  font-size: 12px; color: var(--text-mute); margin-top: 12px;
  max-width: 500px; margin-left: auto; margin-right: auto;
}

.news-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; gap: 14px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
}
.news-card:hover {
  border-color: var(--cat-color, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.news-card.focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.card-rank {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft); color: var(--text-mute);
  border-radius: 8px; font-weight: 700; font-size: 14px;
  font-family: var(--mono);
}
.card-rank.rank-top { background: var(--cat-color); color: #fff; }
.card-rank.rank-1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1a1a; }
.card-rank.rank-2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.card-rank.rank-3 { background: linear-gradient(135deg, #d97706, #92400e); color: #fff; }

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

.card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-mute); font-family: var(--mono);
}
.cat-tag {
  padding: 2px 8px; border-radius: 4px;
  background: color-mix(in srgb, var(--cat-color) 15%, transparent);
  color: var(--cat-color); font-weight: 600;
}
.card-time, .card-region { color: var(--text-dim); }
.imp { margin-left: auto; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.imp-high { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.imp-mid { color: #94a3b8; background: rgba(148, 163, 184, 0.1); }
.imp-low { color: var(--text-mute); }

.card-title {
  font-size: 16px; font-weight: 600; line-height: 1.4;
  margin-bottom: 6px;
}
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent-2); text-decoration: underline; }

.it-orig {
  font-size: 12px; color: var(--text-mute);
  font-style: italic; margin-bottom: 6px;
  font-family: var(--mono);
}

.card-summary {
  font-size: 13px; color: var(--accent-2); font-weight: 500;
  margin-bottom: 8px; padding-left: 10px;
  border-left: 2px solid var(--accent);
}

.card-analysis {
  font-size: 13.5px; line-height: 1.75;
  color: var(--text); margin-bottom: 10px;
  white-space: pre-wrap;
}

.card-kws {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
}
.kw {
  font-size: 11px; padding: 2px 8px;
  background: var(--bg-soft); color: var(--text-dim);
  border-radius: 4px; border: 1px solid var(--line);
  font-family: var(--mono);
}

.card-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--text-mute);
}
.src-label { color: var(--text-mute); }
.src-badge {
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg-soft); color: var(--text-dim);
  border: 1px solid var(--line); font-size: 11px;
  font-family: var(--mono);
}
.src-badge:hover { color: var(--accent-2); border-color: var(--accent); text-decoration: none; }

/* ============ 无结果占位 ============ */
.no-results {
  max-width: 1400px; margin: 0 auto; padding: 60px 22px;
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}
.no-results .empty-ico { font-size: 40px; opacity: 0.4; }
.no-results .nr-title { font-size: 17px; font-weight: 600; color: var(--text); }
.no-results .nr-sub { font-size: 13px; color: var(--text-mute); font-family: var(--mono); }
.no-results .btn { margin-top: 6px; }

/* ============ 页脚 ============ */
.foot {
  max-width: 1400px; margin: 0 auto;
  padding: 0 22px 40px;
  font-size: 11.5px; color: var(--text-mute);
  text-align: center; line-height: 1.8;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.kbd-hint {
  display: block; margin-top: 10px;
  font-family: var(--mono);
}
kbd {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 4px; padding: 1px 6px;
  font-size: 11px; font-family: var(--mono);
  color: var(--text); margin: 0 2px;
}

/* ============ 回顶按钮 ============ */
#backTop {
  position: fixed; bottom: 30px; right: 30px;
  width: 42px; height: 42px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 50%;
  font-size: 20px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 40;
}
#backTop.show { opacity: 1; pointer-events: auto; }
#backTop:hover { transform: translateY(-3px); }

/* ============ 帮助浮层 ============ */
.help-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.help-overlay.show { opacity: 1; pointer-events: auto; }

.help-card {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 24px 28px;
  max-width: 520px; width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.help-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.help-head h3 { font-size: 17px; }
.help-close {
  background: transparent; border: none; color: var(--text-mute);
  font-size: 24px; cursor: pointer; line-height: 1;
}
.help-close:hover { color: var(--text); }

.help-list { list-style: none; margin-bottom: 16px; }
.help-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 13px; color: var(--text-dim);
}
.help-list li span { flex: 1; }

.help-tip {
  font-size: 12px; color: var(--text-mute);
  padding: 12px; background: var(--bg-soft);
  border-radius: 8px; line-height: 1.6;
}

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .brand h1 { font-size: 15px; }
  .ctrls { width: 100%; }
  .search input { width: 160px; }
  .clock { display: none; }
  .grid {
    grid-template-columns: 1fr;
    padding: 0 14px 30px;
  }
  .digest-section, .tabs-wrap { padding: 0 14px; }
  .foot { padding: 20px 14px 30px; }
  .news-card { padding: 16px 16px; gap: 12px; }
  .card-rank { width: 30px; height: 30px; font-size: 13px; }
  .section-tabs { padding: 0 14px; margin: 12px auto 16px; }
  .sec-tab { padding: 10px 22px; font-size: 15px; gap: 8px; min-width: 140px; }
  .sec-ico { font-size: 17px; }
  .sec-cnt { padding: 1px 8px; font-size: 12px; min-width: 24px; }
  .digest-body { font-size: 15.5px; }
}

/* ============================================================
 *  Phase 2/3 增强：阅读进度条 · 卡片错峰动画 · Top3奖牌
 *                · 重要度进度条 · 局势综述引文 · 焦点态
 *                · 数据源统计 · 更新倒计时
 * ============================================================ */

/* ============ 阅读进度条 ============ */
.read-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent) 0%, #8b5cf6 50%, var(--gold) 100%);
  z-index: 200;
  transition: width .1s ease-out;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

/* ============ 卡片错峰淡入动画 ============ */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.news-card {
  animation: cardIn .4s ease-out both;
  animation-delay: calc(min(var(--i, 0), 20) * 40ms);
  will-change: opacity, transform;
}
@media (prefers-reduced-motion: reduce) {
  .news-card { animation: none; will-change: auto; }
  html { scroll-behavior: auto; }
}

/* ============ Top3 奖牌增强 ============ */
.card-rank.rank-top {
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
.card-rank.rank-1 {
  background: linear-gradient(135deg, #fde68a, #fbbf24 40%, #d97706);
  color: #422006;
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.45), inset 0 1px 0 rgba(255,255,255,0.5);
}
.card-rank.rank-2 {
  background: linear-gradient(135deg, #f1f5f9, #cbd5e1 40%, #94a3b8);
  color: #1e293b;
  box-shadow: 0 4px 14px rgba(203, 213, 225, 0.35), inset 0 1px 0 rgba(255,255,255,0.5);
}
.card-rank.rank-3 {
  background: linear-gradient(135deg, #fcd34d, #d97706 40%, #92400e);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.4);
}
.card-rank.rank-1::before { content: '👑'; position: absolute; top: -10px; font-size: 13px; }

/* ============ 局势综述引文装饰 ============ */
.digest-card { position: relative; overflow: hidden; }
.digest-body { position: relative; }
.digest-body::before {
  content: '"';
  position: absolute;
  top: -18px; left: -8px;
  font-size: 72px; line-height: 1;
  color: var(--accent);
  opacity: 0.18;
  font-family: Georgia, serif;
  pointer-events: none;
}

/* ============ 重要度进度条 ============ */
.imp {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto; padding: 2px 8px; border-radius: 4px;
  font-weight: 600; font-size: 10.5px; font-family: var(--mono);
}
.imp-bar {
  display: inline-block;
  width: 36px; height: 4px;
  background: var(--line-2); border-radius: 2px;
  overflow: hidden; vertical-align: middle;
}
.imp-bar > i {
  display: block; height: 100%;
  background: var(--gold);
  border-radius: 2px;
  transition: width .3s ease;
}
.imp-high > .imp-bar > i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.imp-mid  > .imp-bar > i { background: linear-gradient(90deg, #64748b, #94a3b8); }
.imp-low  > .imp-bar > i { background: var(--text-mute); }

/* ============ 无障碍焦点 ============ */
.btn:focus-visible,
.tab:focus-visible,
.src-badge:focus-visible,
a:focus-visible,
.search input:focus-visible,
#backTop:focus-visible,
.help-close:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ 元信息行 ============ */
.meta-bar {
  max-width: 1400px; margin: 0 auto;
  padding: 8px 22px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

/* ============ 数据源统计条 ============ */
.source-stats {
  display: flex; gap: 6px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-mute);
  font-family: var(--mono);
  align-items: center;
}
.source-stats-title { color: var(--text-dim); font-weight: 600; margin-right: 4px; }
.ss-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
}
.ss-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); flex-shrink: 0;
}
.ss-dot.fail { background: var(--danger); }
.ss-dot.warn { background: var(--warn); }
.ss-cnt { color: var(--text-dim); }

/* ============ 更新倒计时 ============ */
.countdown {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-mute);
  padding: 3px 9px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  display: inline-flex; align-items: center; gap: 5px;
}
.countdown-ico { color: var(--accent-2); }
.countdown-num { color: var(--text); font-weight: 600; }

/* ============ 平板（768-1024px）============ */
@media (min-width: 769px) and (max-width: 1024px) {
  .search input { width: 180px; }
  .brand .sub { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
}

/* ============ 移动端细化 ============ */
@media (max-width: 480px) {
  .topbar-inner { padding: 8px 12px; }
  .brand-logo { width: 32px; height: 32px; font-size: 18px; border-radius: 8px; }
  .brand h1 { font-size: 14px; }
  .search { padding: 5px 8px; }
  .search input { width: 110px; font-size: 12px; }
  .btn { padding: 5px 9px; font-size: 12px; }
  .digest-card { padding: 16px 18px; }
  .digest-body { font-size: 14.5px; line-height: 1.8; }
  .grid { padding: 0 10px 24px; gap: 12px; }
  .news-card { padding: 14px 14px; gap: 10px; }
  .card-rank { width: 26px; height: 26px; font-size: 12px; }
  .card-title { font-size: 16.5px; }
  .card-analysis { font-size: 14px; line-height: 1.72; }
  #backTop { width: 36px; height: 36px; bottom: 18px; right: 18px; font-size: 17px; }
  .source-stats { padding: 0 10px; }
  .tab { padding: 5px 11px; font-size: 12px; }
  .section-tabs-inner { padding: 3px; border-radius: 11px; }
  .sec-tab { padding: 9px 18px; font-size: 14.5px; gap: 6px; border-radius: 8px; min-width: 120px; }
  .sec-ico { font-size: 15px; }
  .sec-cnt { padding: 1px 7px; font-size: 11.5px; min-width: 22px; }
}

/* ============ 浅色主题细节 ============ */
html[data-theme="light"] .digest-card {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .news-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10);
}
html[data-theme="light"] .news-card.focused {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

/* ============================================================
 *  Phase 4 增强：Section 大 tab 切换器 · 字体放大
 *                （国际/国内双版块 · 双综述）
 * ============================================================ */

/* ============ 字体放大（用户明确要求）============ */
body { font-size: 16px; }
.brand h1 { font-size: 19px; }
.brand .sub { font-size: 12px; }
.clock { font-size: 13px; }
.search input { font-size: 14px; width: 240px; }
.btn { font-size: 14px; }
select { font-size: 14px; }
.status-bar { font-size: 13px; color: var(--text); }
.digest-head h2 { font-size: 20px; }
.digest-body { font-size: 16px; line-height: 1.9; }
.tab { font-size: 14px; padding: 7px 16px; }
.tab-cnt { font-size: 12px; }
.card-head { font-size: 12px; }
.card-title { font-size: 17.5px; }
.card-summary { font-size: 14px; }
.card-analysis { font-size: 14.5px; line-height: 1.78; }
.card-kws .kw { font-size: 12px; }
.card-foot { font-size: 12px; }
.src-badge { font-size: 12px; }
.it-orig { font-size: 14px; opacity: 0.85; }
.imp { font-size: 12px; }
.imp-bar { width: 42px; height: 5px; }
.meta-bar { font-size: 12px; }
.source-stats { font-size: 12px; }
.ss-chip { font-size: 12px; }
.countdown { font-size: 12px; }
.foot { font-size: 12.5px; }
kbd { font-size: 12px; }

/* ============ Section 大 tab 切换器 ============ */
.section-tabs {
  max-width: 1400px; margin: 16px auto 22px;
  padding: 0 22px;
  position: relative;
}
.section-tabs-inner {
  display: inline-flex; gap: 0;
  background: var(--bg-soft);
  border: 1px solid var(--line-2);
  border-radius: 14px; padding: 5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.sec-tab {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 28px; border: none;
  background: transparent; color: var(--text-dim);
  font-family: var(--sans); font-size: 16px; font-weight: 500;
  border-radius: 10px; cursor: pointer;
  transition: all .2s ease;
  min-width: 180px;
  justify-content: center;
}
.sec-tab:hover { color: var(--text); }
.sec-tab:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
/* 未选中：text-dim；激活：渐变背景+白字+强阴影 */
.sec-tab.on {
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
/* 两个版块的强调色（渐变更醒目）*/
.sec-tab[data-sec="international"].on {
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #fff;
}
.sec-tab[data-sec="domestic"].on {
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
  color: #fff;
}
.sec-ico { font-size: 20px; line-height: 1; }
.sec-name { letter-spacing: -0.01em; }
.sec-cnt {
  font-size: 13px; padding: 2px 10px;
  border-radius: 12px;
  background: var(--card); color: var(--text-dim);
  font-family: var(--mono); font-weight: 600;
  margin-left: 2px;
  min-width: 28px; text-align: center;
}
.sec-tab.on .sec-cnt {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.sec-tab:not(.on) .sec-cnt {
  background: var(--card); color: var(--text-dim);
}

/* ============ 浅色主题 section tab 细节 ============ */
html[data-theme="light"] .section-tabs-inner {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
html[data-theme="light"] .sec-tab.on {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}
html[data-theme="light"] .sec-tab:not(.on) .sec-cnt { background: #ffffff; }

/* ============================================================
 *  Phase 5 增强：三大版块（深度解读/实时热搜/全部新闻）
 *  · 深度解读子 tab（国际/国内）
 *  · 多平台实时热搜版块
 *  · 全网新闻时间流版块
 *  · 骨架屏 · 移动端适配
 * ============================================================ */

/* ============ 三大版块 tab 配色 ============ */
.sec-tab[data-sec="digest"].on {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #fff;
}
.sec-tab[data-sec="hot"].on {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
}
.sec-tab[data-sec="feed"].on {
  background: linear-gradient(135deg, #10b981 0%, #0891b2 100%);
  color: #fff;
}

/* ============ 深度解读子 tab（国际/国内） ============ */
.digest-tabs {
  max-width: 1400px; margin: -14px auto 14px;
  padding: 0 22px;
}
.digest-tabs .section-tabs-inner {
  border-radius: 10px; padding: 3px;
  background: var(--bg-soft);
}
.digest-tabs .sec-sub {
  min-width: 120px; padding: 8px 20px;
  font-size: 14px; border-radius: 8px;
}
.digest-tabs .sec-sub .sec-ico { font-size: 15px; }
.digest-tabs .sec-sub .sec-cnt { font-size: 12px; padding: 1px 8px; min-width: 22px; }

/* ============ 实时热搜版块 ============ */
.hot-section {
  max-width: 1400px; margin: 0 auto 20px;
  padding: 0 22px;
}
.hot-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.hot-ico { font-size: 22px; }
.hot-head h2 { font-size: 18px; font-weight: 700; }
.hot-hint { font-size: 12px; color: var(--text-mute); }
.hot-head .spacer { flex: 1; }
.hot-status {
  text-align: center; padding: 50px 20px;
  color: var(--text-mute); font-size: 14px;
}
.hot-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.hot-plat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.hot-plat:hover {
  border-color: var(--plat-color, var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.hot-plat-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.hot-plat-ico { font-size: 18px; }
.hot-plat-name { font-size: 15px; font-weight: 700; }
.hot-plat-cnt {
  margin-left: auto; font-size: 11px;
  color: var(--text-mute); font-family: var(--mono);
}
.hot-plat-list { list-style: none; }
.hot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 6px; border-radius: 8px;
  cursor: pointer; transition: background .15s;
  font-size: 13.5px; color: var(--text);
  text-decoration: none;
}
.hot-item:hover { background: var(--bg-soft); color: var(--accent-2); text-decoration: none; }
.hot-item .rk {
  flex-shrink: 0; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; font-size: 11px; font-weight: 700;
  background: var(--bg-soft); color: var(--text-mute);
  font-family: var(--mono);
}
.hot-item:nth-child(1) .rk { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #1a1a1a; }
.hot-item:nth-child(2) .rk { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.hot-item:nth-child(3) .rk { background: linear-gradient(135deg, #d97706, #92400e); color: #fff; }
.hot-item .t {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hot-item .tag {
  flex-shrink: 0; font-size: 10px; color: var(--text-mute);
  background: var(--bg-soft); padding: 1px 6px; border-radius: 4px;
}

/* ============ 全部新闻时间流 ============ */
.feed-section {
  max-width: 1400px; margin: 0 auto 20px;
  padding: 0 22px;
}
.feed-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.feed-ico { font-size: 22px; }
.feed-head h2 { font-size: 18px; font-weight: 700; }
.feed-time { font-size: 12px; color: var(--text-mute); }
.feed-head .spacer { flex: 1; }
.feed-count {
  font-size: 12px; color: var(--text-dim);
  font-family: var(--mono);
  padding: 3px 10px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
}
.feed-list { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color .2s, transform .15s;
  text-decoration: none; color: var(--text);
  animation: cardIn .35s ease-out both;
}
.feed-item:hover {
  border-color: var(--accent);
  transform: translateX(3px);
  text-decoration: none;
}
.feed-item .f-src {
  flex-shrink: 0; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  background: var(--bg-soft); color: var(--text-dim);
  font-family: var(--mono); min-width: 76px; text-align: center;
}
.feed-item .f-title {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 14px; color: var(--text);
}
.feed-item:hover .f-title { color: var(--accent-2); }
.feed-item .f-cat {
  flex-shrink: 0; font-size: 10.5px; color: var(--text-mute);
  padding: 1px 7px; border-radius: 4px;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.feed-item .f-age {
  flex-shrink: 0; font-size: 11px; color: var(--text-mute);
  font-family: var(--mono); min-width: 66px; text-align: right;
}
.feed-empty {
  text-align: center; padding: 50px 20px;
  color: var(--text-mute); font-size: 14px;
}

/* ============ 骨架屏（热搜加载） ============ */
.sk-hot {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.sk-plat {
  height: 220px; border-radius: 12px;
  background: linear-gradient(100deg, var(--card) 40%, var(--bg-soft) 50%, var(--card) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============ 搜索框 clear 按钮 ============ */
.clr { cursor: pointer; user-select: none; }
.clr:hover { color: var(--text); }

/* ============ 版块切换时隐藏元素 ============ */
#cards, #tabs, #digestTabs, #digestSection { transition: opacity .15s ease; }

/* ============ 移动端适配（新增版块） ============ */
@media (max-width: 768px) {
  .digest-tabs { margin: -10px auto 12px; padding: 0 14px; }
  .hot-section, .feed-section { padding: 0 14px; }
  .hot-platforms, .sk-hot { grid-template-columns: 1fr; }
  .hot-item { font-size: 14px; }
  .feed-item .f-time { display: none; }
  .feed-item .f-cat { display: none; }
  .feed-item .f-title { white-space: normal; line-height: 1.4; }
  /* 移动端 tab 等分宽度，防止溢出截断 */
  .section-tabs { padding: 0 10px; }
  .section-tabs-inner { display: flex; width: 100%; }
  .sec-tab { flex: 1; min-width: 0; padding: 10px 6px; font-size: 14px; }
  .sec-name { white-space: nowrap; }
}
@media (max-width: 480px) {
  .hot-head h2, .feed-head h2 { font-size: 16px; }
  .hot-hint, .feed-time { display: none; }
  .sec-name { font-size: 13px; }
  .sec-ico { font-size: 16px; }
  .sec-cnt { display: none; }
  .sec-tab { padding: 9px 4px; font-size: 13px; }
}


/* ============ 站点公告 / 页脚补充（后台可配置） ============ */
.site-notice {
  max-width: 1400px; margin: 0 auto;
  padding: 9px 22px 9px 18px;
  font-size: 12.5px; line-height: 1.65;
  color: var(--accent-2);
  background: linear-gradient(90deg, rgba(59,130,246,.10), transparent 70%);
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--accent);
}
html[data-theme="light"] .site-notice {
  background: linear-gradient(90deg, rgba(37,99,235,.08), transparent 70%);
}
.foot-main {
  font-size: 12.5px; font-weight: 600; color: var(--text-dim);
  letter-spacing: .3px; margin-bottom: 4px;
}
.foot-note { font-size: 11.5px; color: var(--text-mute); }
.foot-disclaimer {
  font-size: 11px; color: var(--text-mute);
  max-width: 720px; margin: 0 auto 10px;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line);
  line-height: 1.75;
}
.foot-admin { margin-top: 10px; font-size: 11px; }
.foot-admin a { color: var(--text-mute); }
.foot-admin a:hover { color: var(--accent-2); }
@media (max-width: 640px) {
  .site-notice { padding: 8px 14px; font-size: 11.5px; }
  .foot-main { font-size: 11.5px; }
}
