/* 每日资讯页面样式 — 仿 2010 cnBeta 版式 */

/* 导航栏：分类 Tab + 日期选择，同一条横栏 */
.navbar {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 8px;
}

/* 分类标签 — 经典方角 Tab，底部线条标记当前项，不是胶囊按钮 */
.category-tabs {
  display: flex;
  overflow-x: auto;
}

.tab-btn {
  flex-shrink: 0;
  padding: 10px 14px;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.date-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  flex-shrink: 0;
}

.date-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
}

.date-btn:active {
  opacity: 0.6;
}

.date-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.date-display {
  font-size: 12px;
  color: var(--muted);
  min-width: 90px;
  text-align: center;
}

/* 正文两栏：左主列表 + 右侧栏，桌面端才并排 */
.body-layout {
  display: flex;
  flex-direction: column;
}

.main-col {
  flex: 1;
  min-width: 0;
  padding: 4px 14px;
}

.sidebar-col {
  padding: 4px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 860px) {
  .body-layout {
    flex-direction: row;
    border-top: 1px solid var(--border);
  }
  .main-col {
    border-right: 1px solid var(--border);
    padding: 10px 16px;
  }
  .sidebar-col {
    width: 260px;
    flex-shrink: 0;
    padding: 10px 14px;
  }
}

/* 侧栏小组件 — 蓝色标题条 + 方框，经典 cnBeta 侧边栏样式 */
.widget {
  border: 1px solid var(--border);
}

.widget-title {
  background: var(--header-bg);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

.widget-list {
  list-style: none;
  padding: 8px 10px;
  counter-reset: hot;
}

.widget-list li {
  counter-increment: hot;
  font-size: 12px;
  line-height: 1.7;
  padding-left: 18px;
  position: relative;
}

.widget-list li::before {
  content: counter(hot);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--accent);
}

.widget-list a {
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.widget-list a:hover { color: var(--accent); }

.widget-empty { color: var(--faint); list-style: none; padding-left: 0 !important; }
.widget-empty::before { content: '' !important; }

.widget-links {
  list-style: none;
  padding: 6px 10px;
}

.widget-links li {
  border-bottom: 1px solid var(--border);
}

.widget-links li:last-child { border-bottom: none; }

.widget-links a {
  display: block;
  padding: 7px 2px;
  font-size: 12px;
  color: var(--text);
}

.widget-links a:hover { color: var(--accent); }

/* 资讯列表 — 标题用链接蓝，摘要用正文灰，细线分隔，不是卡片 */
.news-list {
  display: flex;
  flex-direction: column;
}

.news-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-item {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.news-item-link:active .news-item {
  opacity: 0.7;
}

.news-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.news-category-badge {
  display: inline-block;
  padding: 1px 6px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.news-item-time {
  font-size: 11px;
  color: var(--faint);
}

.news-item-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--link);
  line-height: 1.5;
  margin-bottom: 4px;
}

.news-item-link:hover .news-item-title { text-decoration: underline; }

.news-item-summary {
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 4px;
}

.news-item-source {
  font-size: 11px;
  color: var(--faint);
}

/* 加载状态 */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--surface2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
}

/* 错误状态 */
.error-state {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  text-align: center;
  color: #ef4444;
  margin: 20px 0;
}

.error-state strong {
  display: block;
  margin-bottom: 8px;
}
