/* ============================================================================
   leaderboards.css - shared styling for ALL game leaderboards
   (/leaderboards/<game>/index.html)
   ----------------------------------------------------------------------------
   THEME: every accent colour is driven by the variables below. To re-theme a
   single game, override these vars AFTER this stylesheet loads, e.g. in the
   page <head> put:

     <link rel="stylesheet" href="../../css/leaderboards.css?v=1">
     <style>
       :root {
         --lb-accent-rgb: 6, 182, 212;      / * main accent (Ergo cyan) * /
         --lb-accent-strong: #0891b2;
         --lb-accent-light: #67e8f9;
         --lb-accent-light-rgb: 103, 232, 249;
         --lb-accent-mid-rgb: 34, 211, 238;
         --lb-accent-hover: #a5f3fc;
       }
     </style>

   Founder styling (platinum cyan) and Legends gold are NOT game-themed - same
   across every game. Founder badge styles live in css/founder-badge.css.
   `--card`, `--muted`, `--border-dark`, `--bg` come from the site styles.css.
   ============================================================================ */

:root {
  --lb-accent-rgb: 172, 94, 255;          /* #ac5eff - main purple */
  --lb-accent: rgb(var(--lb-accent-rgb));
  --lb-accent-strong: #ac5eff;
  --lb-accent-light: #d4b0ff;
  --lb-accent-light-rgb: 212, 176, 255;
  --lb-accent-mid-rgb: 199, 148, 255;     /* #c794ff - borders */
  --lb-accent-hover: #ead4ff;

  /* Legends (100%) - gold top bracket */
  --lb-legend-rgb: 240, 198, 116;
  --lb-legend: #f0c674;
  --lb-legend-strong: #d4a017;
  --lb-legend-light: #fde68a;

  /* Founder - platinum / trophy blue (mirrors --founder in founder-badge.css) */
  --lb-founder-rgb: 56, 189, 248;
  --lb-founder: #38bdf8;
  --lb-founder-strong: #0ea5e9;
  --lb-founder-light: #7dd3fc;
}

/* Suppress the site-wide "arrow after links" (styles.css appends content: '\2192'
   to links inside p / div / span / li). It bleeds into leaderboard links and looks
   off next to the themed styling. */
.lb-hero-desc a::after,
.lb-modal-panel a::after,
.lb-metabar a::after,
.lb-link::after,
.lb-social::after {
  content: none !important;
  display: none !important;
}

/* Hero */
.lb-hero {
  position: relative;
  overflow: hidden;
  margin: 20px 0 26px 0;
  padding: 30px 30px 26px;
  border: 1px solid rgba(var(--lb-accent-rgb), 0.22);
  border-radius: 16px;
  background: linear-gradient(165deg, rgba(var(--lb-accent-rgb), 0.10) 0%, rgba(18, 14, 28, 0.96) 46%, rgba(10, 8, 18, 0.98) 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04), 0 8px 28px rgba(0,0,0,0.22);
}
.lb-hero::after {
  content: '';
  position: absolute;
  width: min(420px, 90vw);
  height: min(420px, 90vw);
  top: -45%;
  right: -10%;
  background: radial-gradient(circle, rgba(var(--lb-accent-rgb), 0.16) 0%, rgba(236, 72, 153, 0.06) 45%, transparent 68%);
  filter: blur(46px);
  pointer-events: none;
}
.lb-hero-inner { position: relative; z-index: 1; }
.lb-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lb-accent-light);
  margin: 0 0 10px 0;
}
.lb-hero h1 {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px 0;
  line-height: 1.25;
}
.lb-hero h1 .lb-highlight {
  background: linear-gradient(90deg, var(--lb-accent-light), var(--lb-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lb-hero-desc {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.78);
  margin: 0 0 20px 0;
  max-width: 720px;
}
.lb-hero-desc:not(:last-of-type) { margin-bottom: 10px; }
.lb-hero-desc a {
  color: var(--lb-accent-light);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lb-hero-desc a:hover,
.lb-hero-desc a:focus-visible { color: var(--lb-accent-hover); }
.lb-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.lb-link,
.lb-link:link,
.lb-link:visited {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 10px;
  border: 1px solid rgba(var(--lb-accent-mid-rgb), 0.35);
  background: rgba(var(--lb-accent-rgb), 0.12);
  transition: background 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.lb-link:hover,
.lb-link:focus-visible {
  color: #fff !important;
  background: rgba(var(--lb-accent-rgb), 0.24);
  border-color: rgba(var(--lb-accent-light-rgb), 0.7);
  box-shadow: 0 4px 16px rgba(var(--lb-accent-rgb), 0.22);
  transform: translateY(-1px);
}
.lb-link:hover .lb-link-arrow { transform: translateX(2px); }
.lb-link-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}
.lb-link-arrow { color: var(--lb-accent-light) !important; font-weight: 800; transition: transform 0.15s; }

/* Meta bar: player count + your rank + how-this-works */
.lb-metabar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 8px 0;
  padding: 14px 18px;
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  background: var(--card);
}
.lb-metabar-left { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.lb-metabar-players { display: flex; align-items: baseline; gap: 7px; }
.lb-metabar-num { font-size: 16px; font-weight: 800; color: var(--lb-accent-light); }
.lb-metabar-label { font-size: 13px; color: var(--muted); }
.lb-metabar-yourrank {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.05;
  color: rgba(255,255,255,0.9);
}
.lb-yourrank-num { color: var(--lb-accent-light); font-weight: 800; font-size: 46px; letter-spacing: -0.01em; }
.lb-yourrank-cta { color: var(--lb-accent-light); font-weight: 700; }
.lb-yourrank-optout {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--muted);
  max-width: 42ch;
}
.lb-yourrank-optout a,
.lb-yourrank-optout a:link,
.lb-yourrank-optout a:visited,
.lb-yourrank-optout a:hover,
.lb-yourrank-optout a:focus,
.lb-yourrank-optout a:focus-visible {
  color: var(--lb-accent-light) !important;
  text-decoration: none !important;
}
.lb-yourrank-optout a:hover,
.lb-yourrank-optout a:focus-visible { text-decoration: underline !important; }
  .lb-yourrank-link,
  .lb-yourrank-link:link,
  .lb-yourrank-link:visited,
  .lb-yourrank-link:hover,
  .lb-yourrank-link:focus,
  .lb-yourrank-link:focus-visible {
    color: var(--lb-accent-light) !important;
    font-weight: 700;
    text-decoration: none !important;
  }
  .lb-yourrank-link:hover,
  .lb-yourrank-link:focus-visible { text-decoration: underline !important; }
.lb-how-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--lb-accent-light);
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(var(--lb-accent-mid-rgb), 0.4);
  background: rgba(var(--lb-accent-rgb), 0.1);
  transition: background 0.2s, border-color 0.2s;
}
.lb-how-btn:hover { background: rgba(var(--lb-accent-rgb), 0.22); border-color: rgba(var(--lb-accent-light-rgb), 0.7); }
.lb-how-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  font-size: 12px; font-weight: 800;
  background: rgba(var(--lb-accent-light-rgb), 0.2); color: var(--lb-accent-light);
}

/* How-this-works modal */
.lb-modal[hidden] { display: none !important; }
.lb-modal {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; box-sizing: border-box;
}
.lb-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); cursor: pointer; }
.lb-modal-panel {
  position: relative; z-index: 1;
  max-width: 540px; width: 100%; max-height: min(86vh, 720px);
  overflow: auto;
  background: linear-gradient(165deg, rgba(30, 27, 45, 0.98) 0%, rgba(14, 12, 24, 0.99) 100%);
  border: 1px solid rgba(var(--lb-accent-rgb), 0.35);
  border-radius: 16px;
  padding: 24px 26px 26px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
}
.lb-modal-panel h3 { margin: 0 0 12px 0; font-size: 1.25rem; color: #fff; }
.lb-modal-lead { margin: 0 0 20px 0; font-size: 14px; line-height: 1.65; color: rgba(255,255,255,0.85); }
.lb-modal-panel h4 { margin: 18px 0 7px 0; font-size: 14px; font-weight: 800; color: var(--lb-accent-light); }
.lb-modal-panel ul { margin: 0; padding-left: 20px; }
.lb-modal-panel li { margin: 0 0 7px 0; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,0.85); }
.lb-modal-panel a { color: var(--lb-accent-light); text-decoration: underline; text-underline-offset: 2px; }
.lb-modal-panel a:hover { color: var(--lb-accent-hover); }
.lb-modal-founder {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid rgba(var(--lb-founder-rgb), 0.4);
  background: linear-gradient(160deg, rgba(var(--lb-founder-rgb), 0.12) 0%, rgba(8, 20, 36, 0.65) 100%);
}
.lb-modal-founder-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 800;
  color: var(--lb-founder-light);
}
.lb-modal-founder li { color: rgba(255,255,255,0.9); }
.lb-modal-founder-cta {
  display: inline-block;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--lb-founder-light) !important;
}
/* legacy class alias while pages migrate */
.lb-modal-pro { /* kept empty for old markup */ }
.lb-modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; padding: 0; border: none; border-radius: 8px;
  font-size: 22px; line-height: 1; cursor: pointer;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.75);
}
.lb-modal-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* Section heading */
.lb-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 30px 0 14px;
}
.lb-section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.lb-section-head .lb-section-sub {
  font-size: 13px;
  color: var(--muted);
}
.lb-section-head .lb-section-count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--lb-accent-light);
}

/* Leaderboard list */
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* User row (dense: more players per viewport) */
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  transition: border-color 0.2s, transform 0.15s;
}
.lb-row:hover {
  border-color: rgba(255,255,255,0.14);
  transform: translateX(1px);
}
.lb-rank {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255,255,255,0.4);
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

/* 100% Legends rows (gold top bracket) */
.lb-row-legend {
  background: rgba(var(--lb-legend-rgb), 0.09);
  border-color: rgba(var(--lb-legend-rgb), 0.42);
  animation: legend-glow 5.5s ease-in-out infinite;
}
@keyframes legend-glow {
  0%, 100% { box-shadow: inset 0 0 12px rgba(var(--lb-legend-rgb),0.07), 0 0 6px rgba(var(--lb-legend-rgb),0.06); }
  50%      { box-shadow: inset 0 0 18px rgba(var(--lb-legend-rgb),0.16), 0 0 14px rgba(var(--lb-legend-rgb),0.12); }
}
.lb-row-legend .lb-rank { color: var(--lb-legend); }
.lb-row-legend .lb-username { color: var(--lb-legend-light); }
.lb-row-legend .lb-items { color: rgba(253, 230, 138, 0.7); }
.lb-row-legend .lb-pct { color: var(--lb-legend) !important; }

/* 100% shimmering gold bar */
.lb-bar-fill.bar-complete {
  background: linear-gradient(90deg, var(--lb-legend-strong), var(--lb-legend), var(--lb-legend-light), var(--lb-legend), var(--lb-legend-strong)) !important;
  background-size: 200% 100%;
  animation: bar-shimmer 4s ease-in-out infinite;
}

/* Founder progress bar (platinum) */
.lb-bar-fill.bar-founder {
  background: linear-gradient(90deg, var(--lb-founder-strong), var(--lb-founder), var(--lb-founder-light), var(--lb-founder), var(--lb-founder-strong)) !important;
  background-size: 200% 100%;
  animation: bar-shimmer 3.2s ease-in-out infinite;
}

.lb-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
}
.lb-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.lb-username {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-items {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}
.lb-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 2px;
  overflow: hidden;
}
.lb-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.lb-pct {
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
  min-width: 44px;
  text-align: right;
}

/* ===== Row: avatar / bio / socials ===== */

/* Avatar shell: owns ring space so the photo can stay overflow:hidden circle */
.lb-avatar-shell {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-avatar {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #3b3357, #241d38);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.lb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.lb-row-legend .lb-avatar { background: linear-gradient(135deg, var(--lb-legend-strong), var(--lb-legend-light)); }

/* Bio (1 line on dense leaderboards) */
.lb-bio {
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255,255,255,0.5);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Name row: username + badges + socials */
.lb-name-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}
.lb-name-main .gc-founder-badge {
  position: relative;
  z-index: 6;
}
.lb-row-founder .lb-name-main .gc-founder-badge:hover,
.lb-row-founder .lb-name-main .gc-founder-badge:focus-within {
  z-index: 30;
}
.lb-socials { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.lb-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.15s, transform 0.15s;
}
.lb-social img {
  width: 15px;
  height: 15px;
  display: block;
  object-fit: contain;
}
.lb-social:hover { opacity: 1; transform: translateY(-1px); }

/* ===== Founder rows - platinum / electrified (NOT game-themed) ===== */
/* Sudden crackle + zigzag lightning bolts (not dash sparks) */
.lb-avatar-shell-founder {
  width: 40px;
  height: 40px;
  overflow: visible;
}
.lb-avatar-shell-founder .lb-avatar {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--lb-founder-strong), var(--lb-founder-light));
  /* Same offset glow positions as before, eased instead of stepped */
  animation: founder-avatar-glow 4.2s ease-in-out infinite;
}
/*
  Zigzag bolts: tip centered at bottom (50% 100%), origin = tip.
  Every tip sits on the same circle (avatar rim, r=16, center 20,20).
  Body extends outward; tip aims at center.
*/
.lb-avatar-shell-founder::before,
.lb-avatar-shell-founder::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 15px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform-origin: 50% 100%;
  background: linear-gradient(180deg, #ffffff 0%, #e0f2fe 40%, #38bdf8 100%);
  /* Tip exactly at 50% 100% so rotation stays on the rim */
  clip-path: polygon(
    38% 0%,
    62% 0%,
    48% 36%,
    74% 36%,
    50% 100%,
    40% 52%,
    20% 52%
  );
  filter:
    drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 4px #7dd3fc)
    drop-shadow(0 0 8px #0ea5e9);
}
.lb-avatar-shell-founder::before {
  animation: founder-bolt-a 4.2s steps(1, end) infinite;
}
.lb-avatar-shell-founder::after {
  width: 9px;
  height: 13px;
  clip-path: polygon(
    40% 0%,
    64% 0%,
    50% 40%,
    76% 40%,
    50% 100%,
    42% 54%,
    18% 54%
  );
  animation: founder-bolt-b 4.2s steps(1, end) infinite;
}
/* Offset circle clones in multiple directions + big aura */
@keyframes founder-avatar-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(56, 189, 248, 0.55),
      0 0 14px rgba(56, 189, 248, 0.45),
      0 0 28px rgba(14, 165, 233, 0.28),
      0 0 44px rgba(56, 189, 248, 0.16);
  }
  /* Peak A — below + right + left */
  10% {
    box-shadow:
      0 0 0 1.5px rgba(224, 242, 254, 0.95),
      4px 5px 0 0 rgba(125, 211, 252, 0.8),
      -5px 6px 0 0 rgba(56, 189, 248, 0.75),
      6px 8px 0 0 rgba(14, 165, 233, 0.65),
      -3px 9px 0 0 rgba(56, 189, 248, 0.55),
      7px -2px 0 0 rgba(125, 211, 252, 0.7),
      -7px 1px 0 0 rgba(14, 165, 233, 0.65),
      2px -6px 0 0 rgba(56, 189, 248, 0.6),
      0 0 22px rgba(125, 211, 252, 0.9),
      0 0 40px rgba(56, 189, 248, 0.55),
      0 0 58px rgba(125, 211, 252, 0.28);
  }
  22% {
    box-shadow:
      0 0 0 1px rgba(56, 189, 248, 0.5),
      0 0 14px rgba(56, 189, 248, 0.4),
      0 0 28px rgba(14, 165, 233, 0.24),
      0 0 42px rgba(56, 189, 248, 0.14);
  }
  /* Peak B — up + diagonals + below */
  44% {
    box-shadow:
      0 0 0 1.5px rgba(125, 211, 252, 0.95),
      -4px -5px 0 0 rgba(224, 242, 254, 0.75),
      5px -4px 0 0 rgba(125, 211, 252, 0.7),
      -6px 3px 0 0 rgba(56, 189, 248, 0.75),
      6px 4px 0 0 rgba(14, 165, 233, 0.7),
      -3px 7px 0 0 rgba(56, 189, 248, 0.6),
      4px 8px 0 0 rgba(125, 211, 252, 0.55),
      0px -7px 0 0 rgba(14, 165, 233, 0.65),
      0 0 20px rgba(56, 189, 248, 0.85),
      0 0 38px rgba(125, 211, 252, 0.5),
      0 0 56px rgba(14, 165, 233, 0.26);
  }
  56% {
    box-shadow:
      0 0 0 1px rgba(56, 189, 248, 0.5),
      0 0 14px rgba(56, 189, 248, 0.42),
      0 0 28px rgba(14, 165, 233, 0.24),
      0 0 44px rgba(56, 189, 248, 0.15);
  }
  /* Peak C — all around, denser */
  73% {
    box-shadow:
      0 0 0 1.5px #e0f2fe,
      5px 3px 0 0 rgba(125, 211, 252, 0.8),
      -6px 4px 0 0 rgba(56, 189, 248, 0.75),
      4px 7px 0 0 rgba(14, 165, 233, 0.7),
      -4px 8px 0 0 rgba(125, 211, 252, 0.6),
      7px -3px 0 0 rgba(56, 189, 248, 0.7),
      -7px -2px 0 0 rgba(14, 165, 233, 0.65),
      1px -7px 0 0 rgba(125, 211, 252, 0.7),
      -1px 9px 0 0 rgba(56, 189, 248, 0.55),
      0 0 24px rgba(125, 211, 252, 0.9),
      0 0 42px rgba(56, 189, 248, 0.55),
      0 0 60px rgba(125, 211, 252, 0.28);
  }
  86% {
    box-shadow:
      0 0 0 1px rgba(56, 189, 248, 0.55),
      0 0 14px rgba(56, 189, 248, 0.45),
      0 0 28px rgba(14, 165, 233, 0.28),
      0 0 44px rgba(56, 189, 248, 0.16);
  }
}
/*
  Rim tips: (20±16, 20±16). left = tipX - w/2, top = tipY - h.
  rot = atan2(cy-tipY, cx-tipX)*180/PI - 90  (natural tip = +Y).
*/
/* Body must stay OUTSIDE: tip on rim, aim inward, rotate so body swings outward.
   Brief flashes (~3% of cycle ≈ 125ms at 4.2s). */
@keyframes founder-bolt-a {
  0%, 7%, 11%, 42%, 46%, 72%, 76%, 100% { opacity: 0; }
  /* Top tip (20, 4) — aim down, body above */
  8%, 10% {
    opacity: 1;
    top: -11px;
    left: 15px;
    transform: rotate(0deg);
  }
  /* Left tip (4, 20) — aim right, body further left */
  43%, 45% {
    opacity: 1;
    top: 5px;
    left: -1px;
    transform: rotate(-90deg);
  }
  /* Bottom-right tip (31.31, 31.31) — aim toward center, body SE */
  73%, 75% {
    opacity: 1;
    top: 16.31px;
    left: 26.31px;
    transform: rotate(135deg);
  }
}
@keyframes founder-bolt-b {
  0%, 7%, 11%, 42%, 46%, 72%, 76%, 100% { opacity: 0; }
  /* Right tip (36, 20) — aim left, body further right */
  8%, 10% {
    opacity: 1;
    top: 7px;
    left: 31.5px;
    transform: rotate(90deg);
  }
  /* Top-left tip (8.69, 8.69) — aim toward center, body NW */
  43%, 45% {
    opacity: 1;
    top: -4.31px;
    left: 4.19px;
    transform: rotate(-45deg);
  }
  /* Bottom tip (20, 36) — aim up, body below */
  73%, 75% {
    opacity: 1;
    top: 23px;
    left: 15.5px;
    transform: rotate(180deg);
  }
}

/* Whole-row Founder: glow + sheen + sudden edge sparks */
.lb-row-founder {
  position: relative;
  overflow: visible;
  isolation: isolate;
  border-color: rgba(var(--lb-founder-rgb), 0.65);
  background:
    linear-gradient(90deg,
      rgba(56, 189, 248, 0.16) 0%,
      rgba(14, 165, 233, 0.07) 45%,
      rgba(56, 189, 248, 0.12) 100%);
  animation: founder-row-electric 4.2s ease-in-out infinite;
}
.lb-row-founder > * {
  position: relative;
  z-index: 1;
}
/* Soft electric sheen sweeping across the row */
.lb-row-founder::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 42%,
    rgba(224, 242, 254, 0.14) 50%,
    transparent 58%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: founder-row-sheen 4.2s ease-in-out infinite;
}
@keyframes founder-row-electric {
  0%, 100% {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow:
      inset 0 0 14px rgba(56, 189, 248, 0.1),
      inset 3px 0 12px rgba(56, 189, 248, 0.12),
      0 0 10px rgba(56, 189, 248, 0.18),
      0 0 0 1px rgba(56, 189, 248, 0.22);
  }
  35% {
    border-color: rgba(125, 211, 252, 0.75);
    box-shadow:
      inset 0 0 22px rgba(56, 189, 248, 0.18),
      inset 3px 0 18px rgba(125, 211, 252, 0.16),
      0 0 18px rgba(125, 211, 252, 0.35),
      0 0 32px rgba(56, 189, 248, 0.2),
      0 0 0 1px rgba(125, 211, 252, 0.45);
  }
  55% {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow:
      inset 0 0 16px rgba(14, 165, 233, 0.12),
      inset 3px 0 14px rgba(56, 189, 248, 0.14),
      0 0 12px rgba(56, 189, 248, 0.22),
      0 0 0 1px rgba(56, 189, 248, 0.3);
  }
  78% {
    border-color: rgba(224, 242, 254, 0.55);
    box-shadow:
      inset 0 0 24px rgba(125, 211, 252, 0.2),
      inset 3px 0 20px rgba(56, 189, 248, 0.18),
      0 0 22px rgba(125, 211, 252, 0.4),
      0 0 40px rgba(56, 189, 248, 0.22),
      0 0 0 1px rgba(224, 242, 254, 0.4);
  }
}
@keyframes founder-row-sheen {
  0%, 100% { background-position: 120% 0; opacity: 0.55; }
  45% { background-position: -20% 0; opacity: 1; }
  70% { background-position: -40% 0; opacity: 0.7; }
}
.lb-row-founder .lb-rank { color: var(--lb-founder-light); }
.lb-row-founder .lb-username { color: var(--lb-founder-light); }
.lb-row-founder .lb-items { color: rgba(125, 211, 252, 0.72); }
.lb-row-founder .lb-pct { color: var(--lb-founder-light) !important; }
/* Legend gold must not override Founder platinum on dual-status rows */
.lb-row-legend.lb-row-founder {
  border-color: rgba(var(--lb-founder-rgb), 0.65);
  background:
    linear-gradient(90deg,
      rgba(56, 189, 248, 0.16) 0%,
      rgba(14, 165, 233, 0.07) 45%,
      rgba(56, 189, 248, 0.12) 100%);
  animation: founder-row-electric 4.2s ease-in-out infinite;
}
.lb-row-legend.lb-row-founder .lb-rank,
.lb-row-legend.lb-row-founder .lb-username,
.lb-row-legend.lb-row-founder .lb-items,
.lb-row-legend.lb-row-founder .lb-pct {
  color: var(--lb-founder-light) !important;
}
.lb-row-legend.lb-row-founder .lb-items { color: rgba(125, 211, 252, 0.72) !important; }

/* Load more */
.lb-load-more {
  display: block;
  width: 100%;
  padding: 14px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--border-dark);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
  text-align: center;
}
.lb-load-more:hover {
  background: rgba(var(--lb-accent-rgb), 0.1);
  color: #fff;
  border-color: rgba(var(--lb-accent-rgb), 0.3);
}
.lb-load-more:disabled {
  opacity: 0.5;
  cursor: default;
}

@keyframes bar-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Loading / empty state */
.lb-loading, .lb-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--muted);
  font-size: 15px;
}

/* Responsive */
@media (max-width: 600px) {
  .lb-hero { padding: 22px 18px 20px; }
  .lb-hero h1 { font-size: 22px; }
  .lb-row { gap: 8px; padding: 6px 10px; }
  .lb-rank { font-size: 12px; min-width: 24px; }
  .lb-avatar-shell { width: 28px; height: 28px; }
  .lb-avatar { width: 28px; height: 28px; font-size: 12px; }
  .lb-avatar-shell-founder { width: 36px; height: 36px; }
  .lb-avatar-shell-founder .lb-avatar { width: 28px; height: 28px; font-size: 12px; }
  .lb-username { font-size: 12.5px; }
  .lb-pct { font-size: 13px; min-width: 36px; }
  .lb-items { font-size: 11px; }
  .lb-bio { display: none; }
  .lb-metabar { padding: 12px 14px; }
  .lb-metabar-num { font-size: 15px; }
  .lb-metabar-yourrank { font-size: 19px; }
  .lb-yourrank-num { font-size: 34px; }
}