/* ============================================
   FolloFi News Stream — 沉浸阅读式
   设计稿:48076603a46eeb37460b739abae65ccc.png
   2026-04-27 r1
   ============================================ */

.news-page {
  /* 整体左对齐 logo 下方,宽度上限 960,右侧自然留出空间 */
  max-width: 960px;
  margin: 0;
  padding: 0 20px 80px;
  color: var(--fg-secondary);
  font-size: 15px;
  line-height: 1.6;
  /* 玻璃面板:用变量 — 暗模式深色 / 亮模式浅色 */
  background: var(--glass-bg) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
}

/* 顶部 tab 行 — sticky 比 main 稍深突出 */
.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  margin: 0 -20px 28px;
  position: sticky;
  top: 56px;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  z-index: 50;
}
.news-tab {
  font-size: 12.5px;
  letter-spacing: 0.3px;
  padding: 6px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  cursor: pointer;
  user-select: none;
  transition: all .15s;
}
.news-tab:hover {
  color: var(--fg-secondary);
  border-color: var(--border-strong);
}
.news-tab.active {
  color: #04342c;
  background: #00d4aa;
  border-color: #00d4aa;
  font-weight: 600;
}

/* 主流 */
.news-stream {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.news-day {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.news-day .day-label {
  font-size: 16px;
  font-weight: 600;
  color: #00d4aa;        /* 品牌色 */
  letter-spacing: 0.5px;
}
/* 数字段用 mono 字体(.num span)保证 4/28 等数字字符等宽,中文字符保留 */
.news-day .day-label .num {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-feature-settings: 'tnum';
  letter-spacing: 0;
}
.news-day .day-meta {
  font-size: 11.5px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* 单条新闻 grid:左时间 右内容 */
.news-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 28px;
  padding: 14px 4px 18px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.news-item:last-child { border-bottom: none }

.news-item .ts {
  font-size: 13.5px;
  color: var(--fg-muted);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
  letter-spacing: 0.5px;
  padding-top: 2px;
  text-align: right;
}

.news-item .body { min-width: 0 }

.news-item .head {
  /* grid 两列:标题(可换行) + 来源 tag(固定右上,不参与换行) */
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 4px;
}
.news-item .title {
  font-size: 15.5px;
  font-weight: 500;
  color: var(--fg-primary);
  line-height: 1.45;
  min-width: 0;
  word-break: break-word;
}
.news-item .title a {
  color: inherit;
  text-decoration: none;
}
.news-item .title a:hover { color: #00d4aa }

.news-item .excerpt {
  font-size: 14px;
  color: var(--fg-subtle);
  line-height: 1.6;
  margin-top: 5px;
}

.news-item .src-tag {
  /* 固定在 head grid 第 2 列,不跟标题换行 */
  font-size: 13px;
  color: var(--fg-muted);
  letter-spacing: 0.4px;
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid var(--border);
  white-space: nowrap;
  align-self: start;
  margin-top: 1px;
}
.news-item .src-tag.blockbeats { color: #2563EB; border-color: rgba(37,99,235,0.4) }
.news-item .src-tag.jin10      { color: #7CB9FF; border-color: rgba(124,185,255,0.4) }
.news-item .src-tag.bwenews    { color: #FF6B35; border-color: rgba(255,107,53,0.4) }

/* ticker 徽章 */
.news-item .tickers {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.news-item .ticker {
  font-size: 10.5px;
  letter-spacing: 0.3px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0,212,170,0.1);
  color: #00d4aa;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
}

/* 重要新闻整条红色调 */
.news-item.important .title {
  color: #f85149;
  font-weight: 600;
}
.news-item.important .excerpt {
  color: #d68480;
}
.news-item.important .ts {
  color: #f85149;
}
.news-item.important::before {
  content: "⚡";
  position: absolute;
  margin-left: -16px;
  margin-top: 2px;
  color: #f85149;
}
.news-item.important { position: relative }

.news-loading, .news-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-faint);
  font-size: 13px;
}

/* ============================================
   移动端响应式:左右两列折叠成上下,时间在标题上方
   ============================================ */
@media (max-width: 768px) {
  .news-page {
    padding: 18px 16px 60px;
    font-size: 13.5px;
  }
  .news-tabs {
    padding: 6px 0 14px;
    margin-bottom: 18px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .news-tabs::-webkit-scrollbar { display: none }
  .news-tab { flex-shrink: 0 }

  .news-day {
    padding: 12px 0 6px;
    margin-bottom: 12px;
  }

  .news-item {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 4px 14px;
  }
  .news-item .ts {
    text-align: left;
    padding: 0;
    font-size: 11.5px;
  }
  .news-item .title { font-size: 14px }
  .news-item .excerpt { font-size: 12.5px }
  .news-item.important::before {
    margin-left: 0;
    margin-right: 4px;
    position: static;
  }
}

/* ============================================
   r2 实时滚动新闻 fresh 闪烁动画
   ============================================ */
.news-item {
  background: transparent;
  transition: background 2.5s ease-out;
}
.news-item.fresh {
  background: rgba(0, 212, 170, 0.10);
  transition: background 0s;
}
.news-item.fresh.important {
  background: rgba(248, 81, 73, 0.10);
}

/* ============================================
   r4 影响币种 + 利多/利空 (DSV4 enrich)
   ============================================ */
.news-item .impact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.news-item .impact .coin {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
  background: rgba(125,133,144,0.12);
  color: var(--fg-secondary);
}
/* 各 bias 染色 */
.news-item .impact .coin.bullish  { background: rgba(63,185,80,0.18);  color: #3fb950 }
.news-item .impact .coin.bearish  { background: rgba(248,81,73,0.18);  color: #f85149 }
.news-item .impact .coin.mixed    { background: rgba(245,165,36,0.18); color: #f5a524 }
.news-item .impact .coin.neutral  { background: rgba(125,133,144,0.18); color: var(--fg-subtle) }

.news-item .impact .bias {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  margin-left: 4px;
}
.news-item .impact .bias.bullish { color: #3fb950 }
.news-item .impact .bias.bearish { color: #f85149 }
.news-item .impact .bias.mixed   { color: #f5a524 }
.news-item .impact .bias.neutral { color: var(--fg-subtle) }

/* 兼容前端正则 fallback 的 .ticker 老 class */
.news-item .tickers { display: none }

/* r5 AI takeaway 一句话摘要 */
.news-item .takeaway {
  font-size: 13px;
  color: #58a6ff;
  background: rgba(88,166,255,0.08);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #58a6ff;
  margin-top: 8px;
  line-height: 1.5;
}
.news-item.important .takeaway {
  color: #ffb4ad;
  background: rgba(248,81,73,0.08);
  border-left-color: #f85149;
}

/* r10 搜索框 + 币种 chip */
.news-search {
  flex: 1 1 200px; min-width: 180px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--fg-primary);
  outline: none;
  transition: border-color .15s;
}
.news-search:focus { border-color: #00d4aa }
.news-search::placeholder { color: var(--fg-faint) }

.news-coin-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.news-coin-label {
  font-size: 11.5px; color: var(--fg-faint);
  letter-spacing: 0.4px;
  margin-right: 4px;
}
.news-coin-chip {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
  letter-spacing: 0.3px;
  transition: all .15s;
}
.news-coin-chip:hover { color: var(--fg-secondary); border-color: var(--border-strong) }
.news-coin-chip.active {
  color: #00d4aa;
  background: rgba(0,212,170,0.12);
  border-color: rgba(0,212,170,0.5);
  font-weight: 600;
}
