/* ========== Floating Progress Widget ========== */
.sg-progress-card {
  position: fixed;
  top: 85px;
  right: 18px;
  z-index: 9999;
  background: rgba(20, 20, 20, 0.85);
  color: #fff;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px); /* Safari */
  backdrop-filter: blur(6px);          /* Chrome/Edge/Firefox */
  transition: all 0.3s ease;
}

/* ========== Leaderboard Final ========== */
/* === Compact, Centered Leaderboard === */

/* === Mini Leaderboard 30% size === */
.leaderboard-card.mini {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 10px 0 14px;
  width: 100%;
  max-width: 230px;            /* 👈 super small container */
  margin: 0 auto 20px;
  text-align: center;
  border-top: 4px solid #1d3557;
}

.lb-title {
  color: #1d3557;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
}

.leaderboard-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;                    /* tight spacing */
  width: 100%;
  max-width: 160px;
  margin: 0 auto;
}

#leaderboardBars {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}

.podium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  width: 45px;                 /* 👈 very narrow */
}

.podium .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  margin-bottom: 3px;
}
.podium .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.podium .bar {
  width: 55%;
  height: var(--height, 25px); /* 👈 shorter bars */
  background: linear-gradient(180deg, #457b9d, #1d3557);
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset 0 0 3px rgba(255,255,255,0.4);
  animation: grow 0.6s ease forwards;
  margin-bottom: 3px;
}
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.podium .score {
  font-size: 10px;
  color: #1d3557;
  font-weight: 600;
  margin-top: 2px;
}

.podium .name {
  font-size: 10px;
  color: #333;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45px;
}

/* Rank colors */
.podium:nth-child(1) .bar {
  background: linear-gradient(180deg,#ffd60a,#ffb703);
  height: calc(var(--height,25px)*1.2);
}
.podium:nth-child(2) .bar {
  background: linear-gradient(180deg,#adb5bd,#6c757d);
}
.podium:nth-child(3) .bar {
  background: linear-gradient(180deg,#c77dff,#7209b7);
}
.podium:nth-child(1) { transform: translateY(-4px); }

/* Mobile */
@media (max-width:600px){
  .leaderboard-card.mini { max-width: 200px; }
  .leaderboard-container { gap: 6px; }
  .podium { width: 40px; }
  .podium .avatar { width: 28px; height: 28px; }
  .podium .score, .podium .name { font-size: 9px; }
}
/* ---------- Combined Right Sidebar ---------- */
.right-sidebar {
  position: fixed;
  top: 140px;
  right: 20px;
  width: 180px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}


/* ---------- History Card ---------- */
.history-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 8px 0 12px;
  text-align: center;
  border-top: 4px solid #457b9d;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0 10px;
  font-size: 10px;
  color: #333;
}
.history-list li {
  margin-bottom: 4px;
  line-height: 1.3;
}

/* ---------- Progress Tab ---------- */
.progress-tab {
  position: fixed;          /* 👈 was absolute — now fixed to window */
  top: 40px;
  left: 20px;               /* 👈 truly far-left */
  background: #1d3557;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  padding: 8px 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  line-height: 1.2;
  cursor: default;
  transition: all .25s ease;
}
.progress-tab:hover {
  background: #0f2233;
  transform: translateY(-2px);
}
.progress-tab small {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.9;
}
