:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --surface2: #243044;
  --border: #2f3f57;
  --text: #e8eef7;
  --muted: #93a4bd;
  --accent: #ff6b35;
  --green: #5ba46b;
  --red: #c75b5b;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); }
.page { max-width: 900px; margin: 0 auto; padding: 24px 16px 64px; }
.back { color: var(--accent); text-decoration: none; font-size: 0.85rem; }
.brand { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.logo {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, #ff6b35, #c44a1a);
  color: #fff; display: grid; place-items: center; font-weight: 800;
}
.brand h1 { margin: 0; font-size: 1.5rem; }
.brand p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-top: 16px;
}
.panel h2 { margin: 0 0 14px; font-size: 1rem; }
.panel label { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); }
.search-wrap { position: relative; margin-top: 8px; margin-bottom: 12px; }
#searchInput {
  width: 100%; padding: 12px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px; color: var(--text); font: inherit;
}
.suggestions {
  position: absolute; z-index: 10; top: 100%; left: 0; right: 0;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  list-style: none; margin: 4px 0 0; padding: 4px 0; max-height: 280px; overflow: auto;
}
.suggestions li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.suggestions li:hover { background: rgba(255,107,53,0.12); }
.suggestions img { width: 46px; height: 18px; border-radius: 2px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters select {
  padding: 8px 12px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font: inherit;
}
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tab {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--muted); font: inherit; cursor: pointer;
  font-weight: 600; font-size: 0.85rem;
}
.tab.active { background: rgba(255,107,53,0.15); border-color: var(--accent); color: #ff9a72; }
.tab.disabled { opacity: 0.45; cursor: not-allowed; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 0.85rem; }
.hint.error { color: #f87171; }
.author-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.author-link:hover { text-decoration: underline; }
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.stat-row strong { color: var(--text); }
.badge-twitter { background: rgba(29,155,240,0.2); color: #6bc5ff; }
.badge-threads { background: rgba(200,200,200,0.15); color: #ddd; }
.btn {
  padding: 8px 16px; border: none; border-radius: 8px; font: inherit; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600;
}
.loading { text-align: center; padding: 40px; color: var(--muted); }
.hidden { display: none !important; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-top: 16px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-card .num { font-size: 1.6rem; font-weight: 700; }
.stat-card .lbl { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.post-list { display: flex; flex-direction: column; gap: 12px; }
.post {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px;
}
.post.positive { border-left: 3px solid var(--green); }
.post.negative { border-left: 3px solid var(--red); }
.post.neutral { border-left: 3px solid var(--muted); }
.post-title { font-weight: 600; margin-bottom: 6px; }
.post-title a { color: var(--text); text-decoration: none; }
.post-title a:hover { color: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; }
.post-body { font-size: 0.88rem; color: var(--muted); white-space: pre-wrap; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 0.72rem; font-weight: 600; }
.badge-reddit { background: rgba(255,107,53,0.2); color: #ff9a72; }
.badge-steam { background: rgba(102,192,244,0.2); color: #66c0f4; }
.badge-pos { background: rgba(91,164,107,0.2); color: #8fd49f; }
.badge-neg { background: rgba(199,91,91,0.2); color: #f08a8a; }
.badge-neu { background: rgba(147,164,189,0.2); color: var(--muted); }
