/* BYMAV Cube — Leaderboard Styles */
#saas-leaderboard {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  max-width: 90vw;
  height: 100vh;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid #222;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #fff;
  pointer-events: auto;
}

#saas-leaderboard.lb-open {
  right: 0;
}

.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #222;
}

.lb-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lb-close {
  background: none;
  border: none;
  color: #666;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.lb-close:hover { color: #fff; }

.lb-your-score {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-bottom: 1px solid #222;
}

.lb-label {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lb-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.lb-rank {
  margin-left: auto;
  font-size: 1.1rem;
  font-weight: 600;
  color: #8b5cf6;
}

.lb-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 0;
}

.lb-loading {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.lb-row {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.5rem;
  transition: background 0.15s;
}

.lb-row:hover { background: rgba(255, 255, 255, 0.03); }

.lb-row.lb-you {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid #6366f1;
}

.lb-pos {
  width: 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
}

.lb-gold .lb-pos { color: #fbbf24; }
.lb-silver .lb-pos { color: #94a3b8; }
.lb-bronze .lb-pos { color: #d97706; }

.lb-name {
  flex: 1;
  font-size: 0.9rem;
  color: #ccc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  min-width: 3rem;
  text-align: right;
}

.lb-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #222;
}

.lb-play-again {
  width: 100%;
  padding: 0.75rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.lb-play-again:hover { opacity: 0.9; }

/* Mobile adjustments */
@media (max-width: 480px) {
  #saas-leaderboard {
    width: 100vw;
    max-width: 100vw;
    right: -100vw;
  }
}
