/* ========== 热榜卡片 ========== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.hot-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.hot-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.hot-card.dimmed {
  opacity: 0.4;
}
.hot-card.degraded .card-title {
  color: var(--text-muted);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}
.card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.card-icon {
  font-size: 16px;
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-unit {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.card-status-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-muted);
  white-space: nowrap;
}

.card-body {
  flex: 1;
  overflow-y: auto;
  max-height: 320px;
  padding: 6px 0;
}

.hot-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  transition: background 0.2s;
}
.hot-item:hover {
  background: var(--bg-hover);
}
.hot-rank {
  width: 18px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  color: var(--rank-other);
  flex-shrink: 0;
}
.hot-item:nth-child(1) .hot-rank { color: var(--rank-1); }
.hot-item:nth-child(2) .hot-rank { color: var(--rank-2); }
.hot-item:nth-child(3) .hot-rank { color: var(--rank-3); }
.hot-title {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.hot-item:hover .hot-title {
  color: var(--accent-blue);
}
.hot-heat {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.hot-tag {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  flex-shrink: 0;
}
.hot-tag.hot {
  background: var(--tag-hot-bg);
  color: var(--tag-hot);
}
.hot-tag.new {
  background: var(--tag-new-bg);
  color: var(--tag-new);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--border-color);
  font-size: 11px;
  color: var(--text-muted);
}

/* 自定义链接卡片 */
.link-card-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
}
.link-card-btn {
  padding: 10px 24px;
  background: var(--bg-input-focus);
  border: 1px solid var(--accent-blue);
  border-radius: 20px;
  color: var(--accent-blue);
  font-size: 13px;
  transition: all 0.2s;
}
.link-card-btn:hover {
  background: var(--accent-blue);
  color: #fff;
}

/* 降级占位（不可抓爬提示） */
.degraded-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 120px;
  color: var(--text-muted);
  font-size: 12px;
  padding: 0 16px;
  text-align: center;
}

/* 搜索 */
.search-highlight {
  color: var(--accent-blue);
  font-weight: 600;
}
.search-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
  grid-column: 1 / -1;
}

/* 加载与错误态 */
.grid-loading,
.grid-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 14px;
}
.grid-error button {
  margin-top: 12px;
  padding: 8px 20px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  color: var(--accent-blue);
  cursor: pointer;
  font-size: 13px;
}
.grid-error button:hover {
  border-color: var(--accent-blue);
}

@media (max-width: 480px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}
