/* ═══════════════════════════════════════════════════
   DXRP — Pages (leaderboard + live)
   Shared styles for /leaderboard/ and /live/ pages.
   ═══════════════════════════════════════════════════ */

/* ── Utilities ───────────────────────────────────────────────────────── */
.text-accent { color: var(--accent-h); }
.text-gold   { color: var(--gold); }
.lb-dim      { color: var(--muted); }

/* ── Page Hero ───────────────────────────────────────────────────────── */
.page-hero {
  padding: 72px 0 48px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -120px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(225,29,72,.18) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
}
.page-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(225,29,72,.25);
  padding: 6px 14px; border-radius: 100px;
}
.page-hero-title {
  font-family: var(--font); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1;
}
.page-hero-sub {
  font-size: 1.05rem; color: var(--muted); max-width: 520px;
}

/* ═══════════════════════════════════════════════════
   LEADERBOARD
   ═══════════════════════════════════════════════════ */

/* ── Tabs ─────────────────────────────────────────────────────────────── */
.lb-tabs-wrap {
  position: sticky; top: var(--nav-h); z-index: 30;
  background: rgba(9,9,11,.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.lb-tabs {
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tab {
  flex-shrink: 0;
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  color: var(--muted);
  padding: 14px 24px; border: none; background: none; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.lb-tab:hover  { color: var(--sub); }
.lb-tab.active { color: var(--accent-h); border-bottom-color: var(--accent); }

/* ── Podium section ───────────────────────────────────────────────────── */
.podium-section { padding: 48px 0 24px; }
.podium-wrap    { display: none; }
.podium-wrap.active { display: block; }

.podium {
  display: flex; align-items: flex-end; justify-content: center; gap: 16px;
  min-height: 260px; padding-bottom: 8px;
}

/* Step base */
.podium-step {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  min-width: 140px; max-width: 180px; flex: 1;
  animation: podiumRise .6s var(--ease) both;
}
@keyframes podiumRise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Avatar */
.podium-avatar-link { display: block; }
.lb-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--border);
  object-fit: cover; display: block;
}
.lb-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid var(--border);
  background: var(--card); color: var(--text);
  font-family: var(--font); font-weight: 700; font-size: 1.1rem;
}
.podium-step .lb-avatar,
.podium-step .lb-avatar-placeholder {
  width: 64px; height: 64px; font-size: 1.4rem;
}

/* Medal + labels */
.podium-medal  { font-size: 1.6rem; line-height: 1; margin-top: -2px; }
.podium-name   {
  font-family: var(--font); font-size: .9rem; font-weight: 700; text-align: center;
  color: var(--text); text-decoration: none;
  max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.podium-name:hover { color: var(--accent-h); }
.podium-job    { font-size: .72rem; color: var(--muted); text-align: center; }
.podium-val    {
  font-family: var(--font); font-size: 1rem; font-weight: 800;
  color: var(--accent-h); text-align: center;
}

/* Plinth */
.podium-plinth {
  width: 100%; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r) var(--r) 0 0;
  padding: 10px 0;
}
.podium-rank {
  font-family: var(--font); font-size: 1.1rem; font-weight: 900; color: var(--text);
}

/* Gold */
.podium-gold   .podium-plinth { background: linear-gradient(160deg, #92400e, #78350f); border: 1px solid rgba(234,179,8,.3); }
.podium-gold   .podium-plinth-1 { min-height: 90px; }

/* Silver */
.podium-silver .podium-plinth { background: linear-gradient(160deg, #3f3f46, #27272a); border: 1px solid rgba(161,161,170,.2); }
.podium-silver .podium-plinth-2 { min-height: 60px; }

/* Bronze */
.podium-bronze .podium-plinth { background: linear-gradient(160deg, #7c2d12, #6b2613); border: 1px solid rgba(249,115,22,.2); }
.podium-bronze .podium-plinth-3 { min-height: 45px; }

/* Gold shimmer on #1 rank */
.podium-pos-1 .podium-medal { filter: drop-shadow(0 0 6px rgba(234,179,8,.6)); }
.podium-pos-1 .podium-val   { color: var(--gold); }

/* Gang podium tag */
.gang-tag-big {
  font-family: var(--font); font-size: 1.1rem; font-weight: 900;
  padding: 8px 18px; border-radius: 8px; border: 2px solid;
  text-align: center; letter-spacing: .04em;
}

/* ── Full ranked list ─────────────────────────────────────────────────── */
.lb-full-section { padding: 24px 0 80px; }
.lb-full  { display: none; }
.lb-full.active { display: block; }

.lb-empty { color: var(--muted); font-size: .9rem; padding: 32px 0; text-align: center; }

.lb-table { width: 100%; display: flex; flex-direction: column; gap: 2px; }

.lb-thead {
  display: grid; grid-template-columns: 40px 1fr repeat(var(--cols, 3), 100px);
  padding: 8px 16px;
  font-family: var(--font); font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--dim);
}
.lb-tbody { display: flex; flex-direction: column; gap: 4px; }

.lb-row {
  display: grid; grid-template-columns: 40px 1fr repeat(var(--cols, 3), 100px);
  padding: 10px 16px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--border);
  align-items: center; text-decoration: none; color: var(--text);
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .15s var(--ease);
}
.lb-row:hover {
  background: rgba(255,255,255,.06); border-color: var(--border-h);
  transform: translateX(2px);
}
.lb-row-top { border-color: rgba(225,29,72,.15); }

/* Rank numbers */
.lb-rank {
  font-family: var(--font); font-size: .95rem; font-weight: 800; color: var(--muted);
  min-width: 28px; text-align: center;
}
.rank-gold   { color: var(--gold);   text-shadow: 0 0 12px rgba(234,179,8,.5); }
.rank-silver { color: #94a3b8; }
.rank-bronze { color: var(--orange); }

/* Player cell */
.lb-player-cell {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.lb-player-info {
  display: flex; flex-direction: column; min-width: 0;
}
.lb-player-name {
  font-family: var(--font); font-size: .9rem; font-weight: 700; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-player-job {
  font-size: .72rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-row .lb-avatar,
.lb-row .lb-avatar-placeholder {
  width: 36px; height: 36px; font-size: .9rem; flex-shrink: 0;
}

/* Gang small tag */
.gang-tag-sm {
  font-family: var(--font); font-size: .72rem; font-weight: 800;
  padding: 3px 8px; border-radius: 5px; flex-shrink: 0;
  white-space: nowrap; letter-spacing: .04em;
}

/* ═══════════════════════════════════════════════════
   LIVE DASHBOARD
   ═══════════════════════════════════════════════════ */

/* ── Status bar ──────────────────────────────────────────────────────── */
.live-status-bar {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--nav-h); z-index: 20;
}
.live-status-inner {
  display: flex; align-items: center; gap: 24px;
  padding-top: 12px; padding-bottom: 12px;
  flex-wrap: wrap;
}

/* Live indicator */
.live-dot-wrap   { display: flex; align-items: center; gap: 8px; }
.live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--dim);
  transition: background .4s;
}
.live-dot.dot-online {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: livePulse 2s ease-in-out infinite;
}
.live-dot.dot-error { background: var(--red); }
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.live-status-txt {
  font-family: var(--font); font-size: .8rem; font-weight: 600;
  color: var(--muted);
}

/* Counters */
.live-counters {
  display: flex; align-items: center; gap: 16px; margin-left: auto;
}
.live-sep { width: 1px; height: 28px; background: var(--border); }
.live-counter { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.live-num {
  font-family: var(--font); font-size: 1.15rem; font-weight: 900; color: var(--text);
}
.live-lbl { font-size: .65rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }

/* SSE badge */
.live-sse-badge {
  font-family: var(--font); font-size: .65rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--green); background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  padding: 4px 10px; border-radius: 100px;
  opacity: 0; transition: opacity .4s;
}
.live-sse-badge.visible { opacity: 1; }

/* ── Dashboard grid ─────────────────────────────────────────────────── */
.live-grid {
  display: grid;
  grid-template-columns: 1fr 340px 280px;
  gap: 20px;
  padding-top: 24px; padding-bottom: 80px;
  align-items: start;
}

/* ── Panel shell ───────────────────────────────────────────────────── */
.live-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.live-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
}
.live-panel-title {
  font-family: var(--font); font-size: .9rem; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.live-count-badge {
  font-family: var(--font); font-size: .75rem; font-weight: 800;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(225,29,72,.25);
  padding: 2px 9px; border-radius: 100px; min-width: 28px; text-align: center;
}

.live-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* ── Online players grid ────────────────────────────────────────────── */
.online-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px; padding: 14px 18px; min-height: 80px;
}
.player-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  text-decoration: none; color: var(--text);
  padding: 8px 4px; border-radius: var(--r);
  transition: background .15s var(--ease);
  cursor: pointer;
}
.player-card:hover { background: rgba(255,255,255,.05); }
.player-card .lb-avatar,
.player-card .lb-avatar-placeholder {
  width: 44px; height: 44px; font-size: 1.1rem;
}
.player-card-name {
  font-size: .68rem; font-weight: 600; color: var(--sub);
  text-align: center; max-width: 80px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.player-card-job {
  font-size: .6rem; color: var(--muted); text-align: center;
  max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.live-empty { color: var(--muted); font-size: .85rem; padding: 20px; text-align: center; }

/* ── Event feed ─────────────────────────────────────────────────────── */
.feed-pause-btn {
  font-size: .9rem; color: var(--muted); padding: 4px 6px;
  border-radius: 6px; transition: background .15s;
}
.feed-pause-btn:hover      { background: rgba(255,255,255,.06); color: var(--text); }
.feed-pause-btn.is-paused  { color: var(--accent); }

.event-feed {
  display: flex; flex-direction: column;
  max-height: 440px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
  padding: 8px;
}
.event-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  animation: feedSlide .3s var(--ease) both;
  font-size: .82rem;
}
@keyframes feedSlide {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.event-icon   { font-size: 1rem; flex-shrink: 0; line-height: 1.4; }
.event-body   { flex: 1; min-width: 0; }
.event-text   { color: var(--sub); line-height: 1.4; }
.event-text strong { color: var(--text); font-weight: 700; }
.event-time   { font-size: .65rem; color: var(--dim); white-space: nowrap; margin-top: 1px; }

/* Type colours */
.event-kill      .event-icon { filter: none; }
.event-kill      .event-item { background: rgba(239,68,68,.04); }
.event-territory              { }
.event-join      .event-item { background: rgba(34,197,94,.03); }

/* ── Territory list ─────────────────────────────────────────────────── */
.territory-list { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }
.territory-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  border: 1px solid transparent;
  transition: background .15s;
}
.territory-item:hover { background: var(--surface); }
.territory-dot {
  width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
  background: var(--dim);
}
.territory-dot.owned   { background: var(--accent); box-shadow: 0 0 5px rgba(225,29,72,.5); }
.territory-dot.neutral { background: var(--green); box-shadow: 0 0 5px rgba(34,197,94,.4); }
.territory-info   { flex: 1; min-width: 0; }
.territory-name   {
  font-size: .82rem; font-weight: 600; color: var(--sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.territory-owner  { font-size: .68rem; color: var(--muted); }
.territory-income {
  font-family: var(--font); font-size: .72rem; font-weight: 700; color: var(--gold);
}

/* ── Gang list (sidebar) ─────────────────────────────────────────────── */
.gang-list { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }
.gang-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  transition: background .15s;
}
.gang-item:hover { background: var(--surface); }
.gang-item-info  { flex: 1; min-width: 0; }
.gang-item-name  {
  font-size: .82rem; font-weight: 600; color: var(--sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gang-item-meta  { font-size: .68rem; color: var(--muted); }
.gang-rank {
  font-family: var(--font); font-size: .75rem; font-weight: 800;
  color: var(--muted); flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .live-grid {
    grid-template-columns: 1fr 300px;
  }
  .live-sidebar {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  }
}

@media (max-width: 720px) {
  .live-grid {
    grid-template-columns: 1fr;
  }
  .live-sidebar {
    grid-template-columns: 1fr;
  }
  .lb-thead,
  .lb-row {
    grid-template-columns: 36px 1fr 90px 90px;
  }
  .lb-row > span:last-child { display: none; }
  .lb-thead > span:last-child { display: none; }
  .podium-step { min-width: 100px; }
}

@media (max-width: 480px) {
  .lb-tab { padding: 12px 16px; font-size: .82rem; }
  .live-counters { gap: 10px; }
  .live-sep { display: none; }
}


/* ── Sub-page footer ──────────────────────────────────────────────────── */
.footer-inner.container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-top: 32px; padding-bottom: 32px;
}
.footer-logo { display: flex; align-items: center; flex-shrink: 0; }
.footer-links {
  display: flex; align-items: center; gap: 20px;
  list-style: none; padding: 0; margin: 0;
}
.footer-link {
  font-size: .84rem; color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.footer-link:hover { color: var(--text); }
.footer-copy {
  font-size: .78rem; color: var(--dim);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .footer-inner.container { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { flex-wrap: wrap; gap: 14px; }
}
