/* ============ 极洞察 · 前台样式（微信公众平台式简洁风） ============ */
:root {
  --primary: #e62028;
  --primary-dark: #c41820;
  --primary-soft: #fff1f0;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --border: #ebedf0;
  --border-soft: #f2f3f5;
  --radius: 10px;
  --sidebar-width: 148px;
}

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; display: block; }
ul, li { list-style: none; }

::selection { background: var(--primary-soft); color: var(--primary); }

/* ============ 顶部导航（白色简洁） ============ */
.topnav {
  background: #fff;
  height: 56px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topnav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px;
}
.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 24px;
  flex-shrink: 0;
}
.topnav-brand svg { width: 34px; height: 27px; }
.topnav-brand .bname {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1px;
}
.topnav-item {
  color: var(--text-2);
  font-size: 14px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 6px;
  transition: all 0.15s;
}
.topnav-item:hover { color: var(--primary); background: var(--primary-soft); }
.topnav-item.active { color: var(--primary); font-weight: 600; }
.topnav-item.hot::after {
  content: "HOT";
  font-size: 9px;
  color: #fff;
  background: var(--primary);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 4px;
  vertical-align: 2px;
}
.topnav-items { display: flex; align-items: center; gap: 4px; }
.topnav-spacer { flex: 1; }
.topnav-tools { display: flex; gap: 10px; align-items: center; }
.topnav-tools a, .topnav-tools button {
  color: var(--text-2);
  font-size: 13px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
}
.topnav-tools a:hover { color: var(--primary); background: var(--primary-soft); }
.topnav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 7px 18px !important;
  border-radius: 18px !important;
  font-weight: 600;
}
.topnav-cta:hover { background: var(--primary-dark) !important; color: #fff !important; }

/* 顶部搜索框：放大镜按钮 + 输入框，提交跳转 /search.html?q=... */
.topnav-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 4px 0 10px;
  transition: border-color .15s, background .15s;
}
.topnav-search:focus-within { border-color: var(--primary); background: #fff; }
.topnav-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent !important;
  color: var(--text-2) !important;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.topnav-search-btn:hover { color: var(--primary) !important; background: var(--primary-soft) !important; }
.topnav-search input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  padding: 7px 8px 7px 6px;
  width: 180px;
  min-width: 0;
}
.topnav-search input::placeholder { color: var(--text-3); }

/* ============ 主布局 ============ */
.page-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 20px;
  padding: 20px;
  min-height: calc(100vh - 56px);
}

/* ============ 左侧栏（白卡片、轻分割） ============ */
.sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 12px;
  position: sticky;
  top: 76px;
  height: fit-content;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.sidebar-logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px 16px;
}
.brand-logo { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.brand-logo svg, .brand-logo-img { width: 64px; height: 50px; }
.brand-tagline { font-size: 11px; color: var(--text-3); letter-spacing: 2px; }

.sidebar-nav { padding: 4px 0; }
.sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  margin: 2px 0;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s;
}
.sidebar-nav-item:hover { background: var(--bg); color: var(--text); }
.sidebar-nav-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.sidebar-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: 18px;
  padding: 7px 12px;
  gap: 6px;
  margin: 12px 4px;
}
.sidebar-search span { font-size: 12px; flex-shrink: 0; opacity: 0.5; }
.sidebar-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  color: var(--text);
}
.sidebar-search input::placeholder { color: var(--text-3); }

.sidebar-actions {
  padding: 8px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-soft);
  margin-top: 8px;
  padding-top: 14px;
}
.sidebar-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-2);
  transition: all 0.15s;
  font-weight: 500;
  white-space: nowrap;
  background: var(--bg);
}
.sidebar-cta:hover { color: var(--primary); background: var(--primary-soft); }
.sidebar-cta .cta-icon { font-size: 14px; flex-shrink: 0; }
.sidebar-cta.primary { background: var(--primary); color: #fff; }
.sidebar-cta.primary:hover { background: var(--primary-dark); color: #fff; }

.sidebar-footer {
  padding: 14px 8px 2px;
  margin-top: 10px;
  border-top: 1px solid var(--border-soft);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.9;
}
.sidebar-footer .f-title { font-weight: 600; color: var(--text-2); margin-bottom: 2px; }
.sidebar-footer a { color: var(--primary); }

/* ============ 主内容区 ============ */
.main-content { min-width: 0; }

/* ============ 英雄区 ============ */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 14px;
  margin-bottom: 20px;
}
.hero-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 380px;
  cursor: pointer;
  background: #2a2a30;
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.hero-main:hover img { transform: scale(1.02); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.78));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  color: #fff;
}
.hero-tag {
  display: inline-block;
  background: var(--primary);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.hero-title { font-size: 26px; font-weight: 800; line-height: 1.35; }
.hero-sub { font-size: 13px; opacity: 0.85; margin-top: 8px; max-width: 85%; }
.hero-watermark {
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.35);
  padding: 3px 10px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

.hero-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
}
.hero-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  min-height: 0;
  background: #3a3a40;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.hero-card:hover img { transform: scale(1.04); }
.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,0.8));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}
.hero-card-tag {
  background: var(--primary);
  color: #fff;
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 6px;
}
.hero-card-title {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============ 焦点轮播 ============ */
.hero-carousel { position: relative; overflow: hidden; }
.hero-track { display: flex; height: 100%; transition: transform 0.5s ease; }
.hero-slide { position: relative; min-width: 100%; height: 100%; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.hero-carousel:hover .hero-slide.active img { transform: scale(1.02); }
.hero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: background 0.2s, width 0.2s; }
.hero-dot.active { background: #fff; width: 22px; border-radius: 5px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.35); color: #fff; font-size: 22px; line-height: 1;
  cursor: pointer; z-index: 3; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
}
.hero-carousel:hover .hero-arrow { opacity: 1; }
.hero-prev { left: 12px; }
.hero-next { right: 12px; }
@media (prefers-reduced-motion: reduce) {
  .hero-track { transition: none; }
}

/* ============ 双栏 ============ */
.dual-section {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* 右栏：快讯 + 24小时热榜，上下两个独立模块堆叠（不吸顶，避免滚动时互相遮挡） */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  padding: 0 4px 12px;
}
.section-title .bar {
  width: 4px;
  height: 16px;
  background: var(--primary);
  border-radius: 2px;
  align-self: center;
}
.section-title .more {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
  font-weight: normal;
}
.section-title .more:hover { color: var(--primary); }

/* 文章列表（横向排版：左头图 + 右标题/摘要，头图比例 2.35:1 同微信头条） */
.articles-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px 8px;
}
.article-list { display: flex; flex-direction: column; }
.article-list-item {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.article-list-item:last-child { border-bottom: none; }
.article-list-item .cover {
  width: 300px;
  aspect-ratio: 2.35 / 1; /* 微信公众平台头条头图比例 900×383 */
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}
.article-list-item .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.article-list-item:hover .cover img { transform: scale(1.04); }
.article-list-item .body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.article-list-item .title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.article-list-item:hover .title { color: var(--primary); }
.article-list-item .subtitle {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-list-item .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  margin-top: auto;
}
.article-list-item .meta .source-tag {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 1px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.article-list-item .meta .dot { color: #d5d5d5; }

/* 封面角标 */
.cover-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e62028;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 5px;
  letter-spacing: 1px;
  z-index: 2;
}

/* 快讯（白卡片 + 自动上下轮播） */
.flash-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px 8px;
  overflow: hidden;
}
.flash-scroll {
  height: 360px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
.flash-track { will-change: transform; }
.flash-item {
  display: block;
  padding: 12px 6px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
}
.flash-item:last-child { border-bottom: none; }
.flash-item:hover .title { color: var(--primary); }
.flash-item .title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s;
}
.flash-item .time { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ============ 24 小时热榜（独立于快讯的右栏模块，微信公众号头条卡片排版） ============ */
.hot-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  overflow: hidden;
}
.hot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.hot-item {
  border-radius: 8px;
  overflow: hidden;
  background: #f5f6f8;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hot-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.hot-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.hot-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #ff7a45 0%, #e62028 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hot-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s;
}
.hot-link:hover .hot-cover-img { transform: scale(1.05); }

/* 无封面时的占位：渐变背景 + 首字 */
.hot-cover-letter {
  font-size: 64px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: -2px;
  user-select: none;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1;
}

/* TOP 徽章：左上角 */
.hot-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
}
.hot-item.top-1 .hot-badge { background: #e62028; }
.hot-item.top-2 .hot-badge { background: #f97316; }
.hot-item.top-3 .hot-badge { background: #eab308; color: #1a1a1a; }

/* 标题压底：图片底部渐变 + 白字 */
.hot-cover-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 12px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
  z-index: 1;
}
.hot-title-text {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.hot-meta {
  padding: 8px 10px 2px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
}
.hot-source { font-weight: 500; color: var(--text-2); }
.hot-dot { color: #d5d5d5; }
.hot-time { /* 默认沿用 .hot-meta 颜色 */ }

.hot-loading, .hot-empty {
  padding: 26px 6px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  list-style: none;
}
.hot-note {
  padding: 10px 6px;
  background: #f8fafc;
  font-size: 12px;
  color: #64748b;
  list-style: none;
  border-bottom: 1px solid var(--border-soft);
}

@media (max-width: 768px) {
  .hot-list { gap: 12px; }
  .hot-title-text { font-size: 13px; }
  .hot-cover-letter { font-size: 52px; }
}

/* ============ 分类页 ============ */
.category-page { padding: 4px 0 30px; }
.category-header {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-bottom: 16px;
}
.category-header h1 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.category-header h1::before {
  content: "";
  width: 5px;
  height: 22px;
  background: var(--primary);
  border-radius: 3px;
}
.category-header p { color: var(--text-3); font-size: 13px; margin-top: 6px; }
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.category-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.category-card:hover {
  border-color: #f3c1c3;
  box-shadow: 0 6px 20px rgba(230,32,40,0.08);
  transform: translateY(-2px);
}
.category-card .cover { width: 100%; height: 170px; background: var(--bg); overflow: hidden; position: relative; }
.category-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s; }
.category-card:hover .cover img { transform: scale(1.04); }
.category-card .body { padding: 14px 16px; }
.category-card .title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-card .meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ============ 文章详情 ============ */
.article-page {
  padding: 8px 0 40px;
  max-width: 780px;
  margin: 0 auto;
}
.article-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 44px 44px;
}
.article-detail h1 { font-size: 26px; font-weight: 800; line-height: 1.4; margin-bottom: 14px; }
.article-detail .article-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 18px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}
.article-detail .article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-3);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.article-detail .article-cover {
  width: 100%;
  max-height: 420px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 24px;
}
.article-content { font-size: 16px; line-height: 1.9; color: #2b2f36; }
.article-content h1 { font-size: 22px; margin: 26px 0 12px; }
.article-content h2 { font-size: 19px; margin: 26px 0 12px; font-weight: 700; }
.article-content h3 { font-size: 16.5px; margin: 20px 0 8px; }
.article-content p { margin: 14px 0; }
.article-content ul, .article-content ol { padding-left: 24px; margin: 14px 0; }
.article-content li { margin: 6px 0; }
.article-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 10px 16px;
  margin: 16px 0;
  background: var(--bg);
  border-radius: 0 8px 8px 0;
  color: var(--text-2);
}
.article-content code {
  background: var(--bg);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: "Consolas", monospace;
  font-size: 13.5px;
  color: var(--primary-dark);
}
.article-content pre {
  background: #23262b;
  color: #d4d4d4;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}
.article-content pre code { background: transparent; padding: 0; color: inherit; }
.article-content table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 9px 14px; text-align: left; }
.article-content th { background: var(--bg); font-weight: 600; }
.article-content img { border-radius: 8px; margin: 16px 0; }
.article-tags {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.article-tag {
  background: var(--bg);
  color: var(--text-2);
  padding: 4px 14px;
  border-radius: 14px;
  font-size: 12px;
  transition: all 0.15s;
  cursor: pointer;
}
.article-tag:hover { background: var(--primary-soft); color: var(--primary); }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-3);
  font-size: 13px;
  margin-bottom: 14px;
}
.back-link:hover { color: var(--primary); }

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-main { height: 300px; }
  .dual-section { grid-template-columns: 1fr; }
  .flash-col { position: static; }
  .page-container { grid-template-columns: 120px 1fr; }
}

@media (max-width: 768px) {
  .topnav-inner { overflow-x: auto; }
  .page-container { grid-template-columns: 1fr; padding: 12px; }
  .sidebar { display: none; }
  .category-grid { grid-template-columns: 1fr; }
  .article-list-item { grid-template-columns: 1fr; }
  .article-list-item .cover { width: 100%; aspect-ratio: 2.35 / 1; }
  .article-detail { padding: 24px 20px; }

  /* 手机版：快讯移到最新文章上方，并改为横向条状滚动 */
  .dual-section { gap: 12px; }
  .articles-col { order: 2; }
  .flash-col { padding: 10px 8px 4px; }
  .flash-col .section-title { padding: 0 4px 6px; }
  .flash-scroll {
    height: 52px !important;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  }
  .flash-track {
    display: inline-flex;
    align-items: center;
    height: 100%;
    will-change: transform;
  }
  .flash-item {
    display: inline-flex;
    align-items: center;
    height: 100%;
    white-space: nowrap;
    border-bottom: none;
    border-right: 1px solid var(--border-soft);
    padding: 0 16px;
  }
  .flash-item .title {
    -webkit-line-clamp: 1;
    font-size: 13px;
  }
  .flash-item .time { margin-top: 0; margin-left: 8px; }
}

/* 尊重「减少动态效果」偏好：关闭滚动动画 */
@media (prefers-reduced-motion: reduce) {
  .flash-track { animation: none !important; }
}

/* ============ 状态 ============ */
.loading { text-align: center; padding: 48px; color: var(--text-3); font-size: 13px; }
.empty { text-align: center; padding: 64px 20px; color: var(--text-3); }
.empty .icon { font-size: 40px; margin-bottom: 10px; opacity: 0.6; }

/* ============ 站点底部（参考36氪风） ============ */
.site-footer { background: #2c2c2c; color: #c8c8c8; margin-top: 40px; }
.site-footer-inner {
  max-width: 1280px; margin: 0 auto; padding: 48px 20px 0;
}
.footer-cols {
  display: grid;
  /* 自动适配可见列数：被隐藏的列消失后，其余列自动填满（minmax 200 保证不被压扁） */
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #3d3d3d;
}
.footer-col h4 {
  color: #fff; font-size: 15px; font-weight: 600; margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 11px; line-height: 1.4; }
.footer-col a {
  color: #b5b5b5; text-decoration: none; font-size: 13px;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }
.footer-link-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px;
}
.partner-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 14px;
}
.partner-item {
  display: flex; align-items: center; gap: 8px;
  background: #383838; border-radius: 6px; padding: 10px 12px;
  font-size: 12.5px; color: #d8d8d8;
  text-decoration: none; transition: background .15s;
}
.partner-item:hover { background: #444; color: #fff; }
.partner-item img {
  width: 22px; height: 22px; object-fit: contain;
  background: #fff; border-radius: 4px; padding: 2px;
}
.partner-item .pname { font-weight: 500; }
.app-download { text-align: center; }
.app-download h4 { text-align: left; }
.app-qr {
  width: 120px; height: 120px; background: #fff;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; overflow: hidden;
}
.app-qr img { width: 100%; height: 100%; object-fit: contain; }
.app-qr-placeholder { color: #999; font-size: 12px; }
.app-labels { display: flex; justify-content: center; gap: 18px; font-size: 12.5px; color: #aaa; }
.app-labels span::before { content: "•"; color: var(--primary); margin-right: 4px; }

.footer-mid {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; border-bottom: 1px solid #3d3d3d; font-size: 13px;
}
.footer-report a { color: #b5b5b5; text-decoration: none; }
.footer-report a:hover { color: #fff; }

.footer-bottom { padding: 20px 0 28px; font-size: 12px; color: #999; line-height: 1.8; }
.footer-bottom-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-bottom-row .provider-logo {
  width: 50px; height: 18px; object-fit: contain;
  background: #fff; border-radius: 3px; padding: 2px;
}
.footer-desc { margin: 6px 0; }
.footer-copyright { color: #888; }
.footer-icp { color: #888; }

@media (max-width: 768px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .app-download { grid-column: span 2; }
  .footer-mid { flex-direction: column; gap: 8px; align-items: flex-start; }
}

/* ============ 「查看更多」分页按钮 ============ */
.view-more-wrap { text-align: center; padding: 24px 0 8px; }
.view-more-btn {
  display: inline-block; padding: 10px 32px;
  border: 1px solid var(--primary); color: var(--primary);
  background: #fff; border-radius: 22px;
  font-size: 13.5px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.view-more-btn:hover { background: var(--primary); color: #fff; }
.view-more-btn:disabled { opacity: .5; cursor: not-allowed; }
.view-more-info { display: block; font-size: 12px; color: var(--text-3); margin-top: 8px; }

/* ============================================================
   响应式适配（手机 / 平板）
   ============================================================ */

/* ---------- 平板：英雄区右侧塌陷 ---------- */
@media (max-width: 1024px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-main { height: 300px; }
  .hero-side { grid-template-rows: auto; grid-template-columns: 1fr 1fr; }
  .page-container { grid-template-columns: 200px 1fr; gap: 16px; padding: 16px; }
}

/* ---------- 手机：全面单列 + 侧栏转顶部横滑 ---------- */
@media (max-width: 768px) {
  /* 主布局单列 */
  .page-container {
    grid-template-columns: 1fr;
    padding: 12px 12px 24px;
    gap: 14px;
    min-height: auto;
  }

  /* 左侧栏 -> 顶部横向分类导航 */
  .sidebar {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding: 8px 4px;
    border-radius: var(--radius);
  }
  .sidebar-logo-area,
  .sidebar-search,
  .sidebar-actions,
  .sidebar-footer { display: none; }
  .sidebar-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding: 4px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 7px 14px;
    margin: 0;
    font-size: 13px;
    border-radius: 16px;
    background: var(--bg);
  }
  .sidebar-nav-item.active { background: var(--primary); color: #fff; }

  /* 顶部导航：菜单横滑、搜索收缩 */
  .topnav-inner { flex-wrap: nowrap; gap: 8px; padding: 0 10px; }
  .topnav-brand .bname { display: none; }
  .topnav-items {
    order: 3;
    flex: 1 1 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .topnav-items::-webkit-scrollbar { display: none; }
  .topnav-item { white-space: nowrap; }
  .topnav-search { flex: 0 1 auto; min-width: 0; }
  .topnav-search input { width: 96px; }
  .topnav-spacer { display: none; }

  /* 英雄区单列 */
  .hero-section { grid-template-columns: 1fr; gap: 12px; margin-bottom: 16px; }
  .hero-main { height: 200px; }
  .hero-title { font-size: 18px; }
  .hero-side { grid-template-columns: 1fr 1fr; }

  /* 快讯：横向自动滚动（配合 JS X 轴滚动） */
  .flash-col { padding: 12px 10px 6px; }
  .flash-scroll {
    height: auto;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }
  .flash-track { display: flex; flex-direction: row; }
  .flash-item {
    flex: 0 0 auto;
    width: 74vw;
    max-width: 300px;
    border-bottom: none;
    border-right: 1px solid var(--border-soft);
    padding: 10px 14px;
  }
  .flash-item .title { -webkit-line-clamp: 3; }

  /* 24 小时热榜：单列卡片、间距收紧、封面比例微调 */
  .hot-card { padding: 14px 12px 10px; }
  .hot-list { gap: 10px; }
  .hot-item { border-radius: 10px; }
  .hot-cover-wrap { aspect-ratio: 16 / 10; }
  .hot-title-text { font-size: 13px; }
  .hot-cover-letter { font-size: 48px; }

  /* 文章列表：单列（覆盖桌面 300px 1fr） */
  .article-list-item {
    grid-template-columns: 1fr !important;
  }
  .article-list-item .cover { width: 100% !important; aspect-ratio: 2.35 / 1; }
  .article-list-item .cover img { width: 100%; height: 100%; object-fit: cover; }

  /* 文章详情页 */
  .article-detail { padding: 0 2px; }
  .article-detail h1 { font-size: 22px; line-height: 1.35; }
  .article-meta { flex-wrap: wrap; font-size: 12px; }
  .article-content { font-size: 15px; line-height: 1.8; }
  .article-content img,
  .article-content video { max-width: 100%; height: auto; }
  .article-content table { display: block; overflow-x: auto; }
  .article-tags { flex-wrap: wrap; }

  /* 分类页网格单列 */
  .category-grid { grid-template-columns: 1fr; }
  .category-header { padding: 16px 18px; }
  .category-header h1 { font-size: 20px; }

  /* 页脚 */
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 20px; }
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .app-download { grid-column: span 2; }
  .footer-mid { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* 通用卡片内边距收紧 */
  .main-content { padding: 0; }
}

/* 超小屏 */
@media (max-width: 380px) {
  .hero-side { grid-template-columns: 1fr; }
  .flash-item { width: 82vw; }
  .topnav-search input { width: 72px; }
}
