/* ========== 热点聚合 · 门户样式 ========== */
:root {
  --bg: #0e1116;
  --bg-soft: #151a21;
  --card: #1a2029;
  --card-hover: #202836;
  --border: #262e3a;
  --text: #e8ecf2;
  --text-2: #9aa5b4;
  --text-3: #5f6b7c;
  --accent: #ff5a3c;
  --accent-2: #ffb03a;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --radius: 14px;
}
body.light {
  --bg: #f3f5f9;
  --bg-soft: #ffffff;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: #e3e8ef;
  --text: #1c2430;
  --text-2: #5a6675;
  --text-3: #9aa5b4;
  --shadow: 0 8px 24px rgba(30, 41, 59, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  transition: background .25s, color .25s;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1600px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-flame {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}
.logo-text { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.logo-sub { font-size: 12px; color: var(--text-3); margin-left: 2px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 12px; color: var(--text-2);
  transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  border: 0; outline: 0; background: transparent; color: var(--text);
  width: 200px; font-size: 14px;
}
.search-box input::placeholder { color: var(--text-3); }
.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-2); transition: all .2s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn.spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 平台标签 ---------- */
.tabs {
  max-width: 1600px; margin: 0 auto;
  display: flex; gap: 8px; padding: 10px 20px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13.5px; white-space: nowrap;
  transition: all .18s;
}
.tab:hover { color: var(--text); border-color: var(--text-3); }
.tab.active {
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; font-weight: 600;
}
.tab .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot-color, var(--accent)); }
.tab.active .dot { background: rgba(255,255,255,.9); }
.tab-count {
  min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--text-3) 20%, transparent);
  color: var(--text-2); font-size: 11px; line-height: 16px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.tab:hover .tab-count { color: var(--text); }
.tab.active .tab-count { background: rgba(255,255,255,.22); color: #fff; }

/* ---------- 主容器 ---------- */
.container { max-width: 1600px; margin: 0 auto; padding: 20px; min-height: 60vh; }

.loading-splash { text-align: center; padding: 80px 0; color: var(--text-3); }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px;
  border: 3px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}

/* ---------- 全平台概览网格 ---------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}
.pcard {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pcard-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
}
.pcard-badge {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 15px;
  background: var(--pc, var(--accent));
}
.pcard-title { font-weight: 700; font-size: 15.5px; }
.pcard-meta { font-size: 11.5px; color: var(--text-3); }
.pcard-more {
  margin-left: auto; font-size: 12.5px; color: var(--text-3);
  padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; transition: all .18s;
}
.pcard-more:hover { color: var(--accent); border-color: var(--accent); }
.pcard-body { padding: 4px 8px 10px; flex: 1; }
.pcard-empty { padding: 30px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.pcard-empty button {
  margin-top: 10px; padding: 6px 16px; border-radius: 8px;
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  font-size: 13px;
}

/* ---------- 榜单条目 ---------- */
.item {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 10px; border-radius: 9px;
  transition: background .15s;
}
.item:hover { background: var(--card-hover); }
.item-rank {
  flex-shrink: 0; width: 22px; text-align: center;
  font-weight: 800; font-size: 14px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.item-rank.r1 { color: #ff4d2e; }
.item-rank.r2 { color: #ff8a2e; }
.item-rank.r3 { color: #ffc52e; }
.item-main { flex: 1; min-width: 0; }
.item-title {
  display: block; color: var(--text); font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item:hover .item-title { color: var(--accent); }
.item-descr { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.item-side { flex-shrink: 0; display: flex; align-items: center; gap: 8px; }
.item-hot {
  font-size: 12px; color: var(--accent-2);
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.item-tag {
  display: inline-block; font-style: normal; font-size: 11px; line-height: 16px;
  color: var(--pc, var(--accent));
  border: 1px solid currentColor; padding: 0 4px; border-radius: 5px;
  margin-right: 6px; vertical-align: 1px; white-space: nowrap;
}
.item-go { color: var(--text-3); font-size: 12px; opacity: 0; transition: opacity .15s; }
.item:hover .item-go { opacity: 1; }

/* ---------- 单平台视图 ---------- */
.list-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.list-head .pcard-badge { width: 44px; height: 44px; font-size: 19px; border-radius: 12px; }
.list-head h2 { font-size: 20px; }
.list-head .meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.date-nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.date-nav button, .date-nav input {
  background: var(--card); border: 1px solid var(--border); color: var(--text-2);
  border-radius: 8px; padding: 5px 10px; font-size: 13px;
}
.date-nav button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.date-nav button:disabled { opacity: .35; cursor: not-allowed; }
.date-nav input { color-scheme: dark; outline: none; }
body.light .date-nav input { color-scheme: light; }
.list-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px;
  column-gap: 8px;
}
.list-panel .item { padding: 10px 12px; }
.list-panel .item-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.stale-tip {
  margin-bottom: 12px; padding: 9px 14px; border-radius: 10px; font-size: 13px;
  background: color-mix(in srgb, var(--accent-2) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent);
  color: var(--text-2);
}

/* ---------- 搜索结果 ---------- */
.result-group { margin-bottom: 18px; }
.result-group h3 {
  font-size: 14px; color: var(--text-2); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.result-group h3 .dot { width: 9px; height: 9px; border-radius: 50%; }
.empty-tip { text-align: center; padding: 70px 0; color: var(--text-3); }
.empty-tip svg { margin-bottom: 12px; opacity: .5; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--border);
  text-align: center; padding: 22px 20px 30px;
  color: var(--text-3); font-size: 12.5px;
}
.footer p + p { margin-top: 4px; }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; padding: 10px 14px; }
  .logo-sub { display: none; }
  .topbar-actions { width: 100%; order: 3; }
  .search-box { flex: 1; }
  .search-box input { width: 100%; }
  .tabs { padding: 8px 14px 10px; }
  .container { padding: 14px; }
  .grid { grid-template-columns: 1fr; }
  .date-nav { margin-left: 0; width: 100%; }
}
