/* ==========================================================================
   GymDiet Master - Leagues & Divisions (Cyberpunk / Dark Neon Aesthetic)
   ========================================================================== */

#screen-leagues {
  background: var(--gd-bg, #06090f) !important;
  color: #f1f5f9;
  min-height: 100vh;
  padding-bottom: 96px;
}

.leagues-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.leagues-content-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

/* Hero Badge & Division Header */
.league-hero-card {
  background: rgba(16, 23, 36, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 6px;
}

.league-hero-card::before {
  content: "";
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--league-accent, #ffd700) 0%, transparent 70%);
  opacity: 0.25;
  filter: blur(25px);
  pointer-events: none;
}

.league-badge-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.6));
  border: 2px solid var(--league-accent, #ffd700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 0 24px var(--league-glow, rgba(255, 215, 0, 0.35));
  animation: leaguePulse 3s infinite ease-in-out;
}

@keyframes leaguePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.league-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 4px;
  color: #fff;
  text-shadow: 0 0 15px var(--league-glow, rgba(255, 215, 0, 0.3));
}

.league-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  margin-top: 6px;
}

.league-countdown span {
  color: #00f0ff;
  font-weight: 700;
}

/* User Level & XP Bar */
.user-xp-status-card {
  background: rgba(16, 23, 36, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  margin-bottom: 6px;
}

.user-xp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 118, 0.15);
  border: 1px solid rgba(0, 240, 118, 0.35);
  color: #00f076;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.user-xp-values {
  font-size: 13px;
  color: #94a3b8;
}

.user-xp-values strong {
  color: #fff;
  font-size: 15px;
}

.xp-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.xp-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #00f076, #00f0ff);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.xp-promotion-hint {
  font-size: 12px;
  color: #17c987;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Quick XP Earn Cards */
.earn-xp-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.earn-xp-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  margin: 0;
}

.earn-xp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.earn-xp-card {
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
}

.earn-xp-card:hover, .earn-xp-card:active {
  background: rgba(26, 38, 64, 0.9);
  border-color: rgba(0, 240, 255, 0.4);
  transform: translateY(-2px);
}

.earn-xp-badge {
  font-size: 11px;
  font-weight: 800;
  color: #00f076;
  background: rgba(0, 240, 118, 0.15);
  align-self: flex-start;
  padding: 2px 6px;
  border-radius: 6px;
}

.earn-xp-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.earn-xp-desc {
  font-size: 11px;
  color: #94a3b8;
}

/* Streak Freeze Card */
.streak-freeze-bar {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.streak-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-flame {
  font-size: 24px;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.streak-text h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.streak-text p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #cbd5e1;
}

.btn-freeze-streak {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: transform 0.15s ease;
}

.btn-freeze-streak:active {
  transform: scale(0.96);
}

/* Leaderboard List */
.leaderboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zone-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin: 6px 0;
}

.zone-divider::before, .zone-divider::after {
  content: "";
  flex: 1;
  height: 1px;
}

.zone-divider.promotion {
  color: #00f076;
}

.zone-divider.promotion::before, .zone-divider.promotion::after {
  background: linear-gradient(90deg, transparent, rgba(0, 240, 118, 0.4), transparent);
}

.zone-divider.relegation {
  color: #f43f5e;
}

.zone-divider.relegation::before, .zone-divider.relegation::after {
  background: linear-gradient(90deg, transparent, rgba(244, 63, 94, 0.4), transparent);
}

.leaderboard-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(18, 26, 43, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.leaderboard-card.current-user {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid #00f0ff;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
  position: relative;
}

.leaderboard-card.current-user::after {
  content: "ВЫ";
  position: absolute;
  right: 12px;
  top: -8px;
  background: #00f0ff;
  color: #0b0f19;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}

.rank-badge {
  width: 28px;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  color: #94a3b8;
}

.rank-badge.top-1 { font-size: 18px; color: #ffd700; }
.rank-badge.top-2 { font-size: 18px; color: #c0c0c0; }
.rank-badge.top-3 { font-size: 18px; color: #cd7f32; }

.competitor-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.competitor-info {
  flex: 1;
  min-width: 0;
}

.competitor-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.competitor-xp {
  font-size: 13px;
  font-weight: 800;
  color: #00f0ff;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Floating XP Toast */
.xp-floating-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(11, 15, 25, 0.95);
  border: 1.5px solid #00f076;
  box-shadow: 0 10px 30px rgba(0, 240, 118, 0.35);
  border-radius: 999px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.xp-floating-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.xp-toast-amount {
  font-size: 15px;
  font-weight: 900;
  color: #00f076;
  text-shadow: 0 0 10px rgba(0, 240, 118, 0.5);
}

.xp-toast-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* Main Dashboard Leagues Widget */
.dashboard-leagues-widget {
  background: linear-gradient(135deg, rgba(16, 28, 22, 0.92), rgba(10, 18, 14, 0.97));
  border: 1px solid rgba(0, 240, 118, 0.28);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(0, 240, 118, 0.08);
}

.dashboard-leagues-widget:hover, .dashboard-leagues-widget:active {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 118, 0.55);
  box-shadow: 0 6px 20px rgba(0, 240, 118, 0.2);
}

.dlw-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dlw-badge {
  font-size: 28px;
}

.dlw-title {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.dlw-sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 2px 0 0;
}

.dlw-sub strong {
  color: #00f076;
}

.dlw-chevron {
  font-size: 14px;
  color: #00f076;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 240, 118, 0.1);
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 240, 118, 0.2);
}

/* ==========================================================================
   Monthly Seasonal Rewards & Top-3 Podium (Season Rotates Monthly)
   ========================================================================== */
.league-season-card {
  background: linear-gradient(135deg, rgba(14, 20, 32, 0.94) 0%, rgba(8, 12, 20, 0.98) 100%);
  border: 1px solid rgba(0, 240, 118, 0.22);
  border-radius: 20px;
  padding: 20px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin-bottom: 6px;
}

.league-season-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0, 240, 118, 0.12) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

.season-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.season-title-wrap {
  flex: 1;
}

.season-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #00f076;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.season-name {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
}

.season-theme {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

.season-countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(0, 240, 118, 0.08);
  border: 1px solid rgba(0, 240, 118, 0.3);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #00f076;
  white-space: nowrap;
}

.season-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.season-prize-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  min-height: 148px;
}

.season-prize-card:hover, .season-prize-card:active {
  transform: translateY(-2px);
}

.season-prize-card.place-1 {
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.12) 0%, rgba(255, 215, 0, 0.03) 100%);
  border-color: rgba(255, 215, 0, 0.45);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.15);
}

.season-prize-card.place-1:hover {
  border-color: #ffd700;
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.25);
}

.season-prize-card.place-2 {
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.1) 0%, rgba(192, 192, 192, 0.03) 100%);
  border-color: rgba(192, 192, 192, 0.35);
}

.season-prize-card.place-3 {
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.1) 0%, rgba(205, 127, 50, 0.03) 100%);
  border-color: rgba(205, 127, 50, 0.35);
}

.season-prize-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.season-prize-card.place-1 .season-prize-badge {
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.season-prize-place-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.season-prize-card.place-1 .season-prize-place-tag { color: #ffd700; }
.season-prize-card.place-2 .season-prize-place-tag { color: #e2e8f0; }
.season-prize-card.place-3 .season-prize-place-tag { color: #f97316; }

.season-prize-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 4px;
}

.season-prize-summary {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
}

.season-prize-btn {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  padding: 3px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.season-prize-card:hover .season-prize-btn {
  background: #00f076;
  color: #000;
  border-color: #00f076;
}

/* Leaderboard Header Row with Refresh Button */
.leaderboard-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 4px;
}

.leaderboard-header-row .earn-xp-title {
  margin: 0 !important;
}

.btn-refresh-division {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh-division:hover {
  background: rgba(0, 240, 118, 0.1);
  color: #00f076;
  border-color: rgba(0, 240, 118, 0.35);
}

.btn-refresh-division svg {
  transition: transform 0.4s ease;
}

.btn-refresh-division.is-refreshing svg {
  animation: spinRefresh 0.75s linear infinite;
  stroke: #00f076;
}

@keyframes spinRefresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Seasonal Prize Modal Overlay */
.season-prize-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.season-prize-modal {
  background: #0b0f19;
  border: 1px solid rgba(0, 240, 118, 0.3);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 24px 20px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 240, 118, 0.15);
  position: relative;
  text-align: center;
}

.season-prize-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.season-prize-modal-badge {
  font-size: 52px;
  margin-bottom: 10px;
  display: inline-block;
  animation: prizeFloat 2.5s infinite ease-in-out;
}

@keyframes prizeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.season-prize-modal-title {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 6px;
}

.season-prize-modal-subtitle {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0 0 16px;
}

.season-prize-perks-list {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  margin-bottom: 18px;
}

.season-prize-perk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.season-prize-perk-item:last-child {
  border-bottom: none;
}

.season-prize-perk-check {
  color: #00f076;
  font-weight: 800;
  font-size: 14px;
}

