/* ============================================================
   Verdiqts — Profiles, Settings, Leaderboard
   ============================================================ */

.profile-header {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}
.profile-header__top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 16px;
}
.profile-header__avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  border: 3px solid var(--bg-raised);
  object-fit: cover;
}
.profile-header__main { flex: 1; min-width: 0; }
.profile-header h1 {
  font-size: 24px;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-header__handle { color: var(--text-muted); font-size: 14px; margin-bottom: 8px; }
.profile-header__bio { color: var(--text-secondary); font-size: 14px; line-height: 1.5; margin: 0; }
.profile-header__meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.profile-header__meta a { color: var(--text-secondary); }
.profile-header__meta a:hover { color: var(--brand); }
.profile-header__actions { margin-left: auto; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}
.profile-stats__item {
  text-align: center;
}
.profile-stats__num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.profile-stats__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}
.profile-tabs a {
  padding: 12px 18px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.profile-tabs a.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

@media (max-width: 600px) {
  .profile-header__top { flex-direction: column; align-items: center; text-align: center; }
  .profile-header__actions { margin-left: 0; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* Settings page */
.settings-page {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
}
.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 80px;
}
.settings-nav a {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}
.settings-nav a:hover { background: var(--bg-raised); }
.settings-nav a.is-active {
  background: var(--brand-subtle);
  color: var(--brand-text);
}
.settings-section h2 {
  font-size: 20px;
  margin-bottom: 4px;
}
.settings-section .u-text-secondary {
  margin-bottom: 20px;
}

@media (max-width: 800px) {
  .settings-page { grid-template-columns: 1fr; }
  .settings-nav { flex-direction: row; flex-wrap: wrap; position: static; }
}

/* Leaderboard */
.leaderboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.leaderboard__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.leaderboard__rank {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: center;
}
.leaderboard__row:nth-child(1) .leaderboard__rank { color: var(--brand); }
.leaderboard__row:nth-child(2) .leaderboard__rank { color: var(--text-secondary); }
.leaderboard__row:nth-child(3) .leaderboard__rank { color: #B45309; }
.leaderboard__row img { width: 40px; height: 40px; border-radius: var(--radius-full); }
.leaderboard__main { flex: 1; min-width: 0; }
.leaderboard__name { color: var(--text-primary); font-weight: 700; font-size: 14px; }
.leaderboard__sub { color: var(--text-muted); font-size: 12px; }
.leaderboard__score {
  text-align: right;
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

/* Battle Arena */
.battle {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.battle__side {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
}
.battle__side--a:hover { border-color: var(--agree); }
.battle__side--b:hover { border-color: var(--disagree); }
.battle__body {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
  margin: 12px 0;
}
.battle__pct {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.battle__side--a .battle__pct { color: var(--agree); }
.battle__side--b .battle__pct { color: var(--disagree); }
.battle__vs {
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-muted);
}
.battle__countdown {
  text-align: center;
  margin-top: 16px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 700px) {
  .battle { grid-template-columns: 1fr; }
  .battle__vs { padding: 10px 0; }
}

/* Notifications dropdown */
.notif-panel {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: 70vh;
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  display: none;
  flex-direction: column;
  z-index: 80;
}
.notif-panel[data-open="true"] { display: flex; }
.notif-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.notif-panel__head h3 { margin: 0; font-size: 14px; }
.notif-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}
.notif-item:hover { background: var(--bg-raised); }
.notif-item.is-unread {
  background: var(--brand-subtle);
}
.notif-item img { width: 32px; height: 32px; border-radius: var(--radius-full); flex-shrink: 0; }
.notif-item strong { color: var(--text-primary); }
.notif-item time { display: block; color: var(--text-muted); font-size: 11px; margin-top: 4px; }
