/* ==============================================================================
   LEADERBOARD & GLOBAL EXTINCTION TICKER STYLING
   ============================================================================== */

#screen-leaderboard {
  display: none;
  background: radial-gradient(circle at 50% 15%, #1f2533 0%, #0c0d12 100%);
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  padding-bottom: 30px;
}

#screen-leaderboard.active {
  display: flex !important;
}

/* Header */
.lb-top-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  background: rgba(12, 13, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 20;
  border-bottom: 1px solid rgba(255, 122, 0, 0.2);
}

.lb-title-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lb-heading {
  font-family: 'Luckiest Guy', cursive, sans-serif;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: #ffaa5a;
  text-shadow: 0 2px 10px rgba(255, 122, 0, 0.4);
  margin: 0;
}

.lb-subhead {
  font-size: 0.75rem;
  color: #a4b0be;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

/* Global Extinction Ticker Banner */
.lb-ticker-card {
  flex-shrink: 0;
  margin: 16px 20px 10px 20px;
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.12) 0%, rgba(255, 71, 87, 0.08) 100%);
  border: 2px solid rgba(255, 122, 0, 0.35);
  border-radius: 20px;
  padding: 16px 20px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 122, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.lb-ticker-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: #ffaa5a;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.lb-ticker-count {
  font-family: 'Luckiest Guy', cursive, sans-serif;
  font-size: clamp(2rem, 7vw, 2.6rem);
  color: #ffffff;
  letter-spacing: 1.5px;
  line-height: 1;
  text-shadow: 0 4px 14px rgba(255, 122, 0, 0.5);
  margin-bottom: 4px;
}

.lb-ticker-sub {
  font-size: 0.78rem;
  color: #7bed9f;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Sub-Tab Navigation (Hunters vs Bosses) */
.lb-main-tabs {
  flex-shrink: 0;
  display: flex;
  margin: 8px 20px 10px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 14px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #a4b0be;
  font-family: 'Luckiest Guy', cursive, sans-serif;
  font-size: 0.92rem;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lb-tab-btn.active {
  background: linear-gradient(135deg, #ff7a00, #ff5e3a);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(255, 122, 0, 0.4);
}

/* Timeframe Pills */
.lb-timeframe-row {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 4px 20px 14px;
}


.lb-tf-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ced6e0;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.lb-tf-btn.active {
  background: #ffdd59;
  color: #1e272e;
  border-color: #ffdd59;
  box-shadow: 0 2px 10px rgba(255, 221, 89, 0.35);
}

/* List Container */
.lb-scroll-list {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Row Cards */
.lb-row-card {
  display: flex;
  align-items: center;
  background: rgba(22, 27, 36, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px 14px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.lb-row-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 0, 0.4);
}

.lb-row-card.gold-podium {
  background: linear-gradient(90deg, rgba(255, 211, 42, 0.15) 0%, rgba(22, 27, 36, 0.95) 100%);
  border: 2px solid #ffd32a;
  box-shadow: 0 6px 18px rgba(255, 211, 42, 0.2);
}

.lb-row-card.is-self {
  border: 2px solid #00e653;
  background: rgba(0, 230, 83, 0.08);
}

.lb-col-rank {
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Luckiest Guy', sans-serif;
}

.lb-rank-num {
  font-size: 1.15rem;
  color: #747d8c;
}

.lb-crown-badge {
  font-size: 1.1rem;
  font-weight: bold;
}
.lb-crown-badge.gold { color: #ffd32a; }
.lb-crown-badge.silver { color: #d2dae2; }
.lb-crown-badge.bronze { color: #e17055; }

.lb-col-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2f3542;
  border: 2px solid #57606f;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.lb-col-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lb-col-avatar.boss-avatar {
  border: 2px solid #ffa502;
  box-shadow: 0 0 10px rgba(255, 165, 2, 0.35);
  background: #1e272e;
}

.lb-boss-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lb-col-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lb-hunter-name {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-hunter-tag {
  font-size: 0.72rem;
  color: #747d8c;
  font-weight: 600;
  text-transform: uppercase;
}

.lb-col-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-left: 10px;
}

.lb-score-val {
  font-family: 'Luckiest Guy', sans-serif;
  font-size: 1.25rem;
  color: #2ed573;
  letter-spacing: 0.5px;
}

.lb-score-val.fire-val {
  color: #ff4757;
}

.lb-score-lbl {
  font-size: 0.65rem;
  color: #747d8c;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Loading & Empty States */
.lb-loading-state, .lb-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #a4b0be;
  font-family: 'Fredoka', sans-serif;
}

.lb-spinner {
  display: inline-block;
  font-size: 2.2rem;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}
