/* ============================================================
   知潮 NOW · 现代极客设计系统 (Linear / Geist / aihot.news / 知微趋势)
   ============================================================ */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans", sans-serif;
  --font-mono: "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* 基础尺寸 */
  --header-height: 56px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  --transition-fast: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================= 浅色主题 (Light: Geist / Slate clean) ================= */
body.theme-light {
  --bg-page: #f8fafc;
  --bg-nav: rgba(255, 255, 255, 0.86);
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-item-hover: rgba(241, 245, 249, 0.85);
  --bg-active: #e2e8f0;
  --bg-track: #eef2f6;

  --border-light: rgba(226, 232, 240, 0.8);
  --border-card: rgba(203, 213, 225, 0.65);
  --border-hover: rgba(148, 163, 184, 0.6);

  --text-main: #0f172a;
  --text-sub: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #2563eb;
  --accent-light: rgba(37, 99, 235, 0.08);
  --accent-hover: #1d4ed8;

  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-pill: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);

  /* 知微舆情热度色彩梯度 (浅色) */
  --rank-1-bg: #fee2e2;
  --rank-1-text: #dc2626;
  --rank-2-bg: #ffedd5;
  --rank-2-text: #ea580c;
  --rank-3-bg: #fef9c3;
  --rank-3-text: #ca8a04;
  --rank-n-text: #94a3b8;

  --tag-burst-bg: #fee2e2;
  --tag-burst-text: #ef4444;
  --tag-hot-bg: #ffedd5;
  --tag-hot-text: #f97316;
  --tag-up-bg: #ecfdf5;
  --tag-up-text: #10b981;
  --tag-new-bg: #eff6ff;
  --tag-new-text: #3b82f6;

  --heat-super-bg: rgba(239, 68, 68, 0.1);
  --heat-super-text: #dc2626;
  --heat-high-bg: rgba(249, 115, 22, 0.1);
  --heat-high-text: #ea580c;
  --heat-med-bg: rgba(241, 245, 249, 1);
  --heat-med-text: #64748b;
}

/* ================= 深色主题 (Dark: Linear / Deep Space) ================= */
body.theme-dark {
  --bg-page: #090d16;
  --bg-nav: rgba(12, 16, 28, 0.82);
  --bg-card: #111625;
  --bg-card-hover: #151b2e;
  --bg-subtle: rgba(255, 255, 255, 0.04);
  --bg-item-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(255, 255, 255, 0.08);
  --bg-track: rgba(255, 255, 255, 0.05);

  --border-light: rgba(255, 255, 255, 0.06);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);

  --text-main: #f8fafc;
  --text-sub: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #3b82f6;
  --accent-light: rgba(59, 130, 246, 0.14);
  --accent-hover: #60a5fa;

  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 30px -4px rgba(0, 0, 0, 0.6);
  --shadow-pill: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);

  /* 知微舆情热度色彩梯度 (深色) */
  --rank-1-bg: rgba(239, 68, 68, 0.22);
  --rank-1-text: #f87171;
  --rank-2-bg: rgba(249, 115, 22, 0.22);
  --rank-2-text: #fb923c;
  --rank-3-bg: rgba(234, 179, 8, 0.22);
  --rank-3-text: #facc15;
  --rank-n-text: #64748b;

  --tag-burst-bg: rgba(239, 68, 68, 0.25);
  --tag-burst-text: #fca5a5;
  --tag-hot-bg: rgba(249, 115, 22, 0.25);
  --tag-hot-text: #fdba74;
  --tag-up-bg: rgba(16, 185, 129, 0.22);
  --tag-up-text: #6ee7b7;
  --tag-new-bg: rgba(59, 130, 246, 0.22);
  --tag-new-text: #93c5fd;

  --heat-super-bg: rgba(239, 68, 68, 0.18);
  --heat-super-text: #fca5a5;
  --heat-high-bg: rgba(249, 115, 22, 0.18);
  --heat-high-text: #fdba74;
  --heat-med-bg: rgba(255, 255, 255, 0.05);
  --heat-med-text: #94a3b8;
}

/* ================= 全局重置与排版规范 ================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
  user-select: none;
}

/* 官方正版 Logo 基础规范 */
.brand-official-logo {
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.brand-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ================= 顶栏 Navbar (aihot.news + Linear 极简毛玻璃) ================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* 品牌标识 */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.brand-symbol {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  display: flex;
  align-items: center;
}

.brand-suffix {
  font-size: 10px;
  font-weight: 800;
  margin-left: 5px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent-light);
  color: var(--accent-primary);
  letter-spacing: 0.04em;
}

/* aihot.news 标杆同款：胶囊分段轨道导航 (Pill Segmented Navigation) */
.nav-segmented {
  display: inline-flex;
  align-items: center;
  background: var(--bg-track);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  position: relative;
}

.nav-segment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-segment:hover {
  color: var(--text-main);
}

.nav-segment.active {
  background: var(--bg-card);
  color: var(--text-main);
  font-weight: 600;
  box-shadow: var(--shadow-pill);
}

.seg-svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.nav-segment.active .seg-svg {
  color: var(--accent-primary);
}

/* 顶栏右侧工具区 */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 快捷搜索框 (Linear 极客微框) */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-svg {
  position: absolute;
  left: 10px;
  width: 13px;
  height: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  font-family: inherit;
  font-size: 12.5px;
  background: var(--bg-track);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 5px 28px 5px 28px;
  width: 170px;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-normal);
}

.search-box input:focus {
  width: 210px;
  background: var(--bg-card);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.kbd-hint {
  position: absolute;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  pointer-events: none;
}

/* 数据更新时间与手动刷新组件 (aihot 脉冲胶囊 + 手动刷新) */
.sync-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-time-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-track);
  border: 1px solid var(--border-light);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-sub);
  user-select: none;
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
  animation: pulseDot 2.4s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.manual-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.manual-refresh-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-hover);
  transform: translateY(-0.5px);
}

.manual-refresh-btn .refresh-icon {
  transition: transform 0.3s ease;
  color: var(--text-sub);
}

.manual-refresh-btn:hover .refresh-icon {
  color: var(--text-main);
}

.manual-refresh-btn.is-refreshing .refresh-icon {
  animation: spinRefresh 0.8s linear infinite;
  color: var(--accent-primary);
}

@keyframes spinRefresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 主题切换 */
.theme-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  transition: var(--transition-fast);
}

.theme-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.theme-svg {
  width: 15px;
  height: 15px;
}

.hidden {
  display: none !important;
}

/* ================= 页面主体容器与通用子标题 ================= */
.main-shell {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 20px 48px;
  flex: 1;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-subheader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
  flex-wrap: wrap;
}

.view-intro h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.intro-muted {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.category-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-track);
  color: var(--text-sub);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.pill:hover {
  color: var(--text-main);
  background: var(--bg-active);
}

.pill.active {
  background: var(--text-main);
  color: var(--bg-page);
  border-color: var(--text-main);
  font-weight: 600;
}

/* ================= 模块 1: 综合热搜 (Home - aihot.news + 知微趋势) ================= */
.cards-layout {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* 平台卡片容器：微弱边框、环境微光、紧凑高密度 */
.platform-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.platform-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

/* 卡片头部 */
.card-head {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-subtle);
}

.head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.head-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.head-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.card-more-btn {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  transition: var(--transition-fast);
}

.card-more-btn:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* 卡片内容区 */
.card-body {
  padding: 4px 0;
  display: flex;
  flex-direction: column;
}

/* 知微趋势 + aihot.news 极度紧凑单行热搜条目 (Trend Item) */
.trend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  height: 35px;
  transition: var(--transition-fast);
  color: var(--text-main);
  position: relative;
}

.trend-item:hover {
  background: var(--bg-item-hover);
}

/* 序号规范：等宽数字、Top 1-3 鲜明高亮 */
.trend-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  width: 19px;
  height: 19px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--rank-n-text);
  font-variant-numeric: tabular-nums;
}

.trend-rank.rank-top-1 {
  background: var(--rank-1-bg);
  color: var(--rank-1-text);
}

.trend-rank.rank-top-2 {
  background: var(--rank-2-bg);
  color: var(--rank-2-text);
}

.trend-rank.rank-top-3 {
  background: var(--rank-3-bg);
  color: var(--rank-3-text);
}

/* 标题规范：单行截断、鼠标悬浮微右移微高亮 */
.trend-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
  transition: var(--transition-fast);
  min-width: 0;
}

.trend-item:hover .trend-title {
  color: var(--accent-primary);
  transform: translateX(1px);
}

/* 知微热搜趋势风格：热度标签与数值胶囊组合 */
.trend-meta-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* 知微热度状态标签（爆/热/升/新） */
.hot-tag-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1.2;
  white-space: nowrap;
}

.hot-tag-burst {
  background: var(--tag-burst-bg);
  color: var(--tag-burst-text);
}

.hot-tag-hot {
  background: var(--tag-hot-bg);
  color: var(--tag-hot-text);
}

.hot-tag-up {
  background: var(--tag-up-bg);
  color: var(--tag-up-text);
}

.hot-tag-new {
  background: var(--tag-new-bg);
  color: var(--tag-new-text);
}

/* 热度数值胶囊 */
.trend-heat-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  background: var(--heat-med-bg);
  color: var(--heat-med-text);
}

.trend-heat-pill.heat-super {
  background: var(--heat-super-bg);
  color: var(--heat-super-text);
  font-weight: 600;
}

.trend-heat-pill.heat-high {
  background: var(--heat-high-bg);
  color: var(--heat-high-text);
}

/* ================= 模块 2: 热搜全景与二级子榜 (Boards) ================= */
.boards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 顶部平台横向胶囊条 */
.platform-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
}

.platform-strip::-webkit-scrollbar {
  display: none;
}

.p-strip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition-fast);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.p-strip-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-main);
  background: var(--bg-subtle);
}

.p-strip-btn.active {
  background: var(--text-main);
  color: var(--bg-page);
  border-color: var(--text-main);
  font-weight: 600;
  box-shadow: var(--shadow-pill);
}

.p-strip-btn.active .brand-official-logo {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* 详细榜单内容卡片 */
.boards-content-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
}

.board-top-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 12px;
}

.board-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-title-row h2 {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.board-title-logo {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
}

.board-title-logo .brand-official-logo {
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.meta-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-track);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.subtabs-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.subtab-pill {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-track);
  color: var(--text-sub);
  font-weight: 500;
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.subtab-pill:hover {
  color: var(--text-main);
  background: var(--bg-active);
}

.subtab-pill.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}

.subtab-badge {
  font-size: 10.5px;
  opacity: 0.85;
}

/* 全景热搜明细列表行 (对标知微趋势数据行) */
.rank-list-box {
  display: flex;
  flex-direction: column;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-row:hover {
  background: var(--bg-item-hover);
}

.rank-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--rank-n-text);
  font-variant-numeric: tabular-nums;
}

.rank-num.rank-top-1 {
  background: var(--rank-1-bg);
  color: var(--rank-1-text);
}

.rank-num.rank-top-2 {
  background: var(--rank-2-bg);
  color: var(--rank-2-text);
}

.rank-num.rank-top-3 {
  background: var(--rank-3-bg);
  color: var(--rank-3-text);
}

.rank-info {
  flex: 1;
  min-width: 0;
}

.rank-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition-fast);
  display: inline-block;
  line-height: 1.4;
}

.rank-link:hover {
  color: var(--accent-primary);
}

.rank-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-extra {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.open-link-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--bg-track);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.open-link-btn:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: var(--bg-card);
}

/* ================= 模块 3: 科技快讯 (News Feed 流式时间线) ================= */
.news-feed-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
  position: relative;
}

.news-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.news-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-track);
  border: 1px solid var(--border-light);
  color: var(--text-sub);
}

.source-badge.kr {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
}

.source-badge.it {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
}

.news-time {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.news-headline {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 6px;
}

.news-headline a {
  transition: var(--transition-fast);
}

.news-headline a:hover {
  color: var(--accent-primary);
}

.news-summary {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ================= 模块 4: 汽车销量大盘 (Sales) ================= */
.car-filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.filter-controls-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-group-relative {
  position: relative;
}

.filter-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-select, .filter-dropdown-btn {
  font-family: inherit;
  font-size: 12.5px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-track);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-select:focus, .filter-dropdown-btn:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card);
}

.filter-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.reset-group {
  margin-left: auto;
}

.reset-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-track);
  transition: var(--transition-fast);
}

.reset-filter-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

.filter-status-row {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light);
  font-size: 12px;
  color: var(--text-muted);
}

/* 汽车之家同款无级价格弹层 */
.price-popover {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 100;
  width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 16px;
}

.price-popover.show {
  display: block;
}

.price-presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.price-preset-btn {
  font-size: 11px;
  padding: 4px 2px;
  text-align: center;
  border-radius: var(--radius-xs);
  background: var(--bg-track);
  color: var(--text-sub);
  border: 1px solid var(--border-light);
  transition: var(--transition-fast);
}

.price-preset-btn:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
}

.price-preset-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  font-weight: 600;
}

.price-slider-title {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.dual-slider-container {
  position: relative;
  margin: 10px 10px 24px;
}

.dual-slider-track {
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  position: relative;
}

.dual-slider-range {
  position: absolute;
  height: 100%;
  background: var(--accent-primary);
  border-radius: 2px;
}

.slider-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent-primary);
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.slider-tick-labels {
  position: relative;
  height: 16px;
  margin-top: 8px;
}

.slider-tick-labels span {
  position: absolute;
  font-size: 10px;
  color: var(--text-muted);
  transform: translateX(-50%);
}

.price-popover-confirm-btn {
  width: 100%;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  background: var(--accent-primary);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 8px;
}

/* 汽车列表卡片与排版 */
.autohome-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.autohome-car-row, .brand-table-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
}

.autohome-car-row:hover, .brand-table-row:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.car-rank-box {
  width: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.car-rank-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rank-n-text);
  font-variant-numeric: tabular-nums;
}

.car-rank-badge.rank-top-1 {
  background: var(--rank-1-bg);
  color: var(--rank-1-text);
}

.car-rank-badge.rank-top-2 {
  background: var(--rank-2-bg);
  color: var(--rank-2-text);
}

.car-rank-badge.rank-top-3 {
  background: var(--rank-3-bg);
  color: var(--rank-3-text);
}

.car-rank-change {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.car-thumb-box {
  width: 80px;
  height: 54px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.car-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.car-series-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.car-series-name:hover {
  color: var(--accent-primary);
}

.energy-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
}

.energy-pill.ev {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.energy-pill.phev {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.energy-pill.reev {
  background: rgba(139, 92, 246, 0.12);
  color: #7c3aed;
}

.energy-pill.ice {
  background: var(--bg-track);
  color: var(--text-sub);
}

.car-score-badge {
  font-size: 11px;
  color: #ea580c;
  font-weight: 600;
}

.car-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.car-factory-name {
  color: var(--text-sub);
}

.car-price-box {
  width: 140px;
  flex-shrink: 0;
}

.car-price-label {
  font-size: 11px;
  color: var(--text-muted);
}

.car-price-val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  color: #ea580c;
  margin-top: 1px;
}

.car-sales-box {
  width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.car-sales-num-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.car-sales-num {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.car-sales-unit {
  font-size: 11px;
  color: var(--text-muted);
}

.car-sales-bar-outer {
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: var(--bg-track);
  overflow: hidden;
}

.car-sales-bar-inner {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #3b82f6, #6366f1);
}

.car-action-box {
  flex-shrink: 0;
}

.autohome-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-track);
  border: 1px solid var(--border-light);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-sub);
  transition: var(--transition-fast);
}

.autohome-btn:hover {
  background: var(--bg-card);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
}

.brand-logo-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
}

/* 新车日历网格 */
.new-car-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.new-car-item {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-fast);
}

.new-car-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.car-tag-date {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.car-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.car-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-sub);
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ================= 模块 5: 深度报道 (Insights 智库特稿统一汇总) ================= */
.insights-feed-container {
  gap: 14px;
}

.insight-feed-card {
  padding: 16px 20px;
}

.insight-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
}

.insight-feed-read-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}

.insight-feed-score {
  font-size: 11px;
  color: #ea580c;
  font-weight: 600;
  margin-left: 4px;
}

.insight-feed-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

.insight-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.insight-feed-tag {
  font-size: 11px;
  color: var(--text-muted);
}

.insight-feed-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-primary);
  transition: var(--transition-fast);
}

.insight-feed-link:hover {
  transform: translateX(2px);
}

/* ================= 通用 Loading & 空状态 ================= */
.loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
  width: 100%;
  grid-column: 1 / -1;
}

.mini-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-light);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spinRefresh 0.7s linear infinite;
}

.empty-state {
  text-align: center;
  padding: 48px 0;
  color: var(--text-muted);
  font-size: 13.5px;
  width: 100%;
  grid-column: 1 / -1;
}

.search-highlight {
  background: rgba(254, 240, 138, 0.5);
  color: inherit;
  border-radius: 2px;
  padding: 0 2px;
}

body.theme-dark .search-highlight {
  background: rgba(202, 138, 4, 0.4);
}

/* ================= 极简页脚 ================= */
.app-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  background: var(--bg-card);
  padding: 16px 20px;
}

.footer-content {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-brand {
  font-weight: 600;
  color: var(--text-main);
}

.footer-top:hover {
  color: var(--accent-primary);
}

/* ================= 移动端与小屏响应式适配 ================= */
@media (max-width: 900px) {
  .nav-container {
    padding: 0 14px;
    gap: 8px;
  }

  .nav-segmented {
    padding: 2px;
  }

  .nav-segment {
    padding: 5px 10px;
    font-size: 12px;
    gap: 3px;
  }

  .seg-text {
    font-size: 12px;
  }

  .search-box input {
    width: 120px;
  }

  .search-box input:focus {
    width: 150px;
  }

  .main-shell {
    padding: 14px 14px 36px;
  }

  .cards-layout {
    grid-template-columns: 1fr;
  }

  .car-card-row, .brand-table-row {
    flex-wrap: wrap;
    gap: 10px;
  }

  .car-sales-box {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .nav-segmented {
    overflow-x: auto;
    max-width: 58vw;
    scrollbar-width: none;
  }

  .nav-segmented::-webkit-scrollbar {
    display: none;
  }

  .search-box {
    display: none;
  }

  .sync-time-badge {
    padding: 4px 6px;
  }

  #updateTimeText {
    display: none;
  }
}

/* 深度报道：独立的手机搜索与采集状态，不改变其他板块 */
.insights-mobile-search { display: none; }
.insights-status { color: var(--text-sub); font-size: 13px; padding: 10px 12px; background: var(--bg-hover); border-left: 2px solid var(--accent-primary); margin-bottom: 16px; }
.insights-status[hidden] { display: none; }
#view-insights .news-meta-row { flex-wrap: wrap; gap: 8px; }
.insight-feed-author { color: var(--text-muted); font-size: 12px; }
.insight-media-name { display: none; }
@media (max-width: 640px) {
  .insights-mobile-search { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--text-sub); font-size: 13px; }
  .insights-mobile-search input { flex: 1; width: 0; min-width: 0; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); border-radius: 8px; padding: 10px 12px; font: inherit; }
  #view-insights .insight-feed-card { padding: 14px; }
  #view-insights .news-headline { line-height: 1.55; }
  #view-insights .insight-feed-author { max-width: 100%; overflow-wrap: anywhere; }
}
