/* ============================================================
   RCKT Overlay Shared Module — CSS
   Leaderboard (bottom-left), guess-flash state, 7TV paint helpers.
   Include AFTER your game's own <style> block so these can be
   overridden per-overlay if needed.
   ============================================================ */

:root{
  --rckt-lb-bg: rgba(10,10,14,.72);
  --rckt-lb-border: rgba(255,255,255,.10);
  --rckt-lb-text: #eef0f5;
  --rckt-lb-dim: #9aa0ad;
  --rckt-accent: #8b5cf6;
  --rckt-flash: #34d399;
}

/* ---- Leaderboard: fixed bottom-left, independent of game card ---- */
#rcktLB{
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 9000;
  width: 220px;
  background: var(--rckt-lb-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--rckt-lb-border);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: 'Poppins','Segoe UI',sans-serif;
  color: var(--rckt-lb-text);
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  transition: opacity .25s ease;
}
#rcktLB.rckt-hidden{ display:none; }
#rcktLB h4{
  margin:0 0 8px; font-size:11px; font-weight:800; letter-spacing:.08em;
  text-transform:uppercase; color: var(--rckt-lb-dim);
  display:flex; align-items:center; gap:6px;
}
#rcktLB h4::before{ content:"🏆"; font-size:12px; }
#rcktLB ol{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:5px; }
#rcktLB li{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  font-size:12.5px; font-weight:600; padding:3px 0;
}
#rcktLB li .rckt-lb-name{
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0;
}
#rcktLB li .rckt-lb-score{
  color: var(--rckt-accent); font-weight:800; font-variant-numeric:tabular-nums; flex:0 0 auto;
}
#rcktLB li.rckt-rank1 .rckt-lb-name{ color:#ffd447; }
#rcktLB li.rckt-empty{ color:var(--rckt-lb-dim); font-weight:500; font-style:italic; }

/* Flash state: briefly highlights the row that just scored, then
   the board settles back to normal ranked order after ~5s (handled in JS) */
#rcktLB li.rckt-just-scored{
  animation: rcktScoreFlash 1.1s ease;
  border-radius: 8px;
}
@keyframes rcktScoreFlash{
  0%{ background: rgba(52,211,153,.35); transform: translateX(0); }
  15%{ background: rgba(52,211,153,.28); transform: translateX(2px); }
  100%{ background: transparent; }
}

/* Standalone "X guessed it!" banner that appears independent of the
   leaderboard, top-of-card or wherever the overlay places #rcktFlash */
#rcktFlash{
  position:relative;
  display:flex; align-items:center; justify-content:center; gap:6px;
  font-size:13px; font-weight:700; text-align:center;
  padding:0; max-height:0; overflow:hidden; opacity:0;
  transition: max-height .25s ease, opacity .25s ease, padding .25s ease;
  color: var(--rckt-flash);
}
#rcktFlash.rckt-show{ max-height:40px; opacity:1; padding:6px 10px; }

/* ---- 7TV paint text rendering ---- */
.rckt-7tv-paint{
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  background-size: cover;
  background-position: center;
}
