:root {
  --bg: #0b1020;
  --bg2: #121a31;
  --card: rgba(18, 26, 49, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e8eefc;
  --muted: #9aa8c7;
  --accent: #7dd3fc;
  --accent2: #a78bfa;
  --warn: #fbbf24;
  --danger: #fb7185;
  --ok: #34d399;
  --shadow: 0 18px 50px rgba(0,0,0,.35);
  --radius: 18px;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { position: relative; overflow-x: hidden; }
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(125,211,252,.18), transparent 60%),
    radial-gradient(800px 480px at 90% 0%, rgba(167,139,250,.16), transparent 55%),
    linear-gradient(180deg, #0b1020 0%, #0a0f1c 100%);
}
.bg-grid::after {
  content: ""; position: absolute; inset: 0; opacity: .22;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(circle at 50% 30%, #000 20%, transparent 75%);
}
.top, .layout, .foot { position: relative; z-index: 1; }
.top {
  max-width: 1280px; margin: 0 auto; padding: 28px 20px 8px;
  display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between;
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 800; font-size: 22px; color: #031018;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 30px rgba(125,211,252,.25);
}
h1 { margin: 0; font-size: 1.55rem; letter-spacing: .02em; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.controls { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.seg {
  display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
}
.seg-btn {
  appearance: none; border: 0; cursor: pointer; color: var(--muted);
  background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 600;
}
.seg-btn.active {
  color: #041018; background: linear-gradient(135deg, var(--accent), #c4b5fd);
}
.meta-line { color: var(--muted); font-size: .86rem; }
.layout {
  max-width: 1280px; margin: 0 auto; padding: 12px 20px 28px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .9fr); gap: 18px;
}
.cloud-panel, .card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.cloud-panel { padding: 16px 16px 12px; min-height: 560px; display: flex; flex-direction: column; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.panel-head h2 { margin: 0; font-size: 1.05rem; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: .8rem; align-items: center; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.dot.douyin { background: #f472b6; }
.dot.weibo { background: #fb7185; }
.dot.bilibili { background: #60a5fa; }
.dot.baidu { background: #fbbf24; }
.dot.xhs { background: #fb7185; outline: 1px dashed #fda4af; }
.cloud-wrap {
  position: relative; flex: 1; margin-top: 10px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border: 1px dashed rgba(148,163,184,.15); min-height: 460px;
}
#cloud { width: 100%; height: 100%; display: block; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.hidden { display: none !important; }
.hint { color: var(--muted); font-size: .8rem; margin: 10px 4px 0; }
.side { display: flex; flex-direction: column; gap: 14px; }
.card { padding: 16px; }
.card h3 { margin: 0 0 10px; font-size: .98rem; }
.muted { color: var(--muted); font-size: .9rem; }
#detailBody { margin-top: 8px; }
.kw-title { font-size: 1.25rem; font-weight: 800; margin: 0 0 6px;
  background: linear-gradient(90deg, var(--accent), #ddd6fe); -webkit-background-clip: text; color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.chip {
  font-size: .75rem; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); background: rgba(255,255,255,.03);
}
.related { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.related a {
  display: block; text-decoration: none; color: var(--text); padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
}
.related a:hover { border-color: rgba(125,211,252,.45); background: rgba(125,211,252,.06); }
.related .r-meta { color: var(--muted); font-size: .75rem; margin-top: 4px; }
.top-list { margin: 0; padding-left: 18px; }
.top-list li { margin: 0 0 8px; }
.top-list button {
  all: unset; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; width: 100%;
}
.top-list button:hover .t { color: var(--accent); }
.top-list .t { font-weight: 600; }
.top-list .w { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.source-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.source-list li {
  display: flex; justify-content: space-between; gap: 10px; font-size: .86rem;
  padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid var(--line);
}
.source-list .ok { color: var(--ok); }
.source-list .bad { color: var(--danger); }
.source-list .stale { color: var(--warn); }
.gap-box {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: rgba(251,191,36,.08); border: 1px solid rgba(251,191,36,.35); color: #fde68a; font-size: .86rem;
}
.disclaimer { color: var(--muted); font-size: .78rem; line-height: 1.5; margin: 12px 0 0; }
.foot {
  max-width: 1280px; margin: 0 auto 28px; padding: 0 20px;
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
  color: var(--muted); font-size: .78rem;
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .cloud-panel { min-height: 480px; }
  .cloud-wrap { min-height: 380px; }
  .controls { align-items: flex-start; }
}
