/* ── Live Stats floating panel ─────────────────────────────────────────
   Shared across every game (Mines, Plinko, Blackjack, Roulette, Chicken, Limbo).
   ────────────────────────────────────────────────────────────────────── */

/* ── Combined BEE + BetEmpireElite logo (shared across all game navs) ── */
/* ── Branding block: literal duplicate of the admin panel header ──────
   Copied 1:1 from admin.css:
     .ad-brand      → display:flex; align-items:center; gap:12px;
     .ad-brand img  → height:36px;  border-radius:8px;
     .ad-brand-text → font-size:17px; font-weight:800; color:#fff;
     .ad-brand-text .gold → gold gradient text clip.
   No extra padding/margins/filters — pixel-identical spacing & sizing. */
.nav-combined-logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;          /* game navs are tighter than admin's; never squish */
  text-decoration: none;
}
.nav-combined-logo {
  height: 36px;
  border-radius: 8px;
}
.nav-combined-brand-text {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}
.nav-combined-brand-text .gold {
  background: linear-gradient(135deg, #ffd700, #c9a227);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@media (max-width: 640px) {
  .nav-combined-brand-text { display: none; }
}

/* ── Trigger button ──────────────────────────────────────────────────── */
.live-stats-trigger-btn {
  position: fixed;
  top: 68px;
  right: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #1b1e24 0%, #101216 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  color: #eef0f3;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.live-stats-trigger-btn:hover {
  background: linear-gradient(180deg, #22262e 0%, #15171c 100%);
  border-color: rgba(57, 255, 143, 0.4);
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .live-stats-trigger-btn { top: 62px; right: 12px; width: 36px; height: 36px; font-size: 15px; }
}

/* ── Panel ───────────────────────────────────────────────────────────── */
#liveStatsPanel {
  position: fixed;
  top: 90px;
  right: 24px;
  width: 300px;
  background: #13151a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.25);
  z-index: 100000;
  font-family: 'Inter', Arial, sans-serif;
  color: #eef0f3;
  user-select: none;
  display: none;
  overflow: hidden;
}
#liveStatsPanel.show {
  display: block;
  animation: lsFadeIn 0.16s ease;
}
@keyframes lsFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ──────────────────────────────────────────────────────────── */
.ls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: grab;
}
.ls-header:active { cursor: grabbing; }
.ls-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #f4f4f6;
}
.ls-header-title .ls-trend-icon { font-size: 14px; line-height: 1; }
.ls-close-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: #9aa0ab;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.ls-close-btn:hover { background: rgba(255, 79, 107, 0.15); color: #ff4f6b; }

/* ── Circular refresh / reset button ─────────────────────────────────── */
.ls-refresh-btn {
  width: 24px;
  height: 24px;
  margin-left: auto;
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #9aa0ab;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.ls-refresh-btn:hover { background: rgba(57, 255, 143, 0.14); color: #39ff8f; }
.ls-refresh-spinning { animation: ls-spin 0.8s linear infinite; color: #39ff8f; }
@keyframes ls-spin { to { transform: rotate(360deg); } }

/* ── Reset confirmation toast ────────────────────────────────────────── */
.ls-reset-toast {
  display: none;
  margin-top: 8px;
  padding: 6px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #39ff8f;
  background: rgba(57, 255, 143, 0.08);
  border: 1px solid rgba(57, 255, 143, 0.25);
  border-radius: 8px;
}
.ls-reset-toast.ls-toast-show { display: block; }

/* ── Body & stats grid ───────────────────────────────────────────────── */
.ls-body { padding: 12px 14px 14px; }
.ls-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 10px;
}
.ls-stat { display: flex; flex-direction: column; gap: 3px; }
.ls-stat-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}
.ls-stat-label .ls-coin-icon { font-size: 10px; }
.ls-stat-value {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1px;
  font-variant-numeric: tabular-nums;
}
.ls-stat-value.ls-profit-pos { color: #39ff8f; text-shadow: 0 0 10px rgba(57,255,143,0.3); }
.ls-stat-value.ls-profit-neg { color: #e03030; text-shadow: 0 0 10px rgba(224,48,48,0.3); }
.ls-stat-value.ls-wagered    { color: #e8eaf0; }
.ls-stat-value.ls-wins       { color: #39ff8f; }
.ls-stat-value.ls-losses     { color: #e03030; }

/* ── Chart area ──────────────────────────────────────────────────────── */
.ls-chart-wrap {
  width: 100%;
  height: 140px;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Horizontal-scroll window: the canvas inside grows wider than this box
   as plot points accumulate; a subtle left-to-right scrollbar appears
   naturally once dots overflow the visible bounds. */
.ls-chart-scroll {
  position: relative;   /* needed for absolute tooltip child */
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.ls-chart-scroll::-webkit-scrollbar {
  height: 6px;
}
.ls-chart-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.ls-chart-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}
#liveStatsChart {
  width: 100%;      /* baseline; JS expands it per plot point as needed */
  height: 100%;
  display: block;
}

/* ── Hover tooltip ───────────────────────────────────────────────────── */
.ls-tooltip {
  display: none;
  position: absolute;
  pointer-events: none;
  background: rgba(10, 11, 15, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

/* ── Round-result flash animations ───────────────────────────────────── */
@keyframes lsFlashWin {
  0%   { box-shadow: 0 20px 56px rgba(0,0,0,.65), 0 0 0 2px rgba(57,255,143,.9),  0 0 28px rgba(57,255,143,.4); }
  60%  { box-shadow: 0 20px 56px rgba(0,0,0,.65), 0 0 0 2px rgba(57,255,143,.4),  0 0 12px rgba(57,255,143,.15); }
  100% { box-shadow: 0 20px 56px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.25); }
}
@keyframes lsFlashLoss {
  0%   { box-shadow: 0 20px 56px rgba(0,0,0,.65), 0 0 0 2px rgba(224,48,48,.9),   0 0 28px rgba(224,48,48,.4); }
  60%  { box-shadow: 0 20px 56px rgba(0,0,0,.65), 0 0 0 2px rgba(224,48,48,.4),   0 0 12px rgba(224,48,48,.15); }
  100% { box-shadow: 0 20px 56px rgba(0,0,0,.65), 0 0 0 1px rgba(0,0,0,.25); }
}
#liveStatsPanel.ls-flash-win  { animation: lsFlashWin  0.55s ease-out forwards; }
#liveStatsPanel.ls-flash-loss { animation: lsFlashLoss 0.55s ease-out forwards; }

/* ══ Game-wide overlay — flash + multiplier pop-up (game-overlay.js) ══ */
@keyframes gol-flash-win {
  0%   { box-shadow: 0 0 0    0    rgba(50,255,100,0);    filter: brightness(1); }
  20%  { box-shadow: 0 0 45px 20px rgba(50,255,100,.95);  filter: brightness(3.0); }
  50%  { box-shadow: 0 0 18px 8px  rgba(50,255,100,.55);  filter: brightness(1.8); }
  70%  { box-shadow: 0 0 55px 25px rgba(50,255,100,1);    filter: brightness(3.4); }
  100% { box-shadow: 0 0 0    0    rgba(50,255,100,0);    filter: brightness(1); }
}
@keyframes gol-flash-lose {
  0%   { box-shadow: 0 0 0    0    rgba(255,45,60,0);    filter: brightness(1); }
  20%  { box-shadow: 0 0 45px 20px rgba(255,45,60,.95);  filter: brightness(3.0); }
  50%  { box-shadow: 0 0 18px 8px  rgba(255,45,60,.55);  filter: brightness(1.8); }
  70%  { box-shadow: 0 0 55px 25px rgba(255,45,60,1);    filter: brightness(3.4); }
  100% { box-shadow: 0 0 0    0    rgba(255,45,60,0);    filter: brightness(1); }
}
.gol-flash-win  { animation: gol-flash-win  0.75s ease-out forwards; }
.gol-flash-lose { animation: gol-flash-lose 0.75s ease-out forwards; }

.gol-mult-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  font-family: 'Rajdhani', 'Orbitron', 'Inter', sans-serif;
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 900;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: scale(0.55);
  transition: opacity 0.14s ease, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-shadow: 0 0 60px currentColor, 0 0 130px currentColor, 0 0 6px #000;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}
.gol-mult-win  { color: #32ff64; }
.gol-mult-lose { color: #ff2d3c; }
.gol-mult-popup.gol-show {
  opacity: 1;
  transform: scale(1);
}
.gol-mult-popup.gol-fade {
  opacity: 0;
  transform: scale(1.12);
  transition: opacity 0.44s ease, transform 0.44s ease;
}

/* ── Shared "← Lobby" nav button — exact copy of the Blackjack reference
   (.bj-lobby-btn) so navigation is pixel-identical across every game. ── */
.bee-lobby-btn{
  display:inline-block;padding:8px 16px;background:transparent;
  border:1px solid rgba(201,162,39,.18);border-radius:10px;
  color:#f0d060;font-size:13px;font-weight:600;text-decoration:none;
  transition:background .15s,border-color .15s;white-space:nowrap;
}
.bee-lobby-btn:hover{background:rgba(201,162,39,.1);border-color:#c9a227;}
