/* ============================================
   LEADERBOARD PAGE
   ============================================ */

/* Hero Section */
.lb-hero {
  padding: 100px 20px 60px;
  min-height: 700px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Platform Tabs */
.lb-platform-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.lb-platform-tab {
  padding: 10px 28px;
  border-radius: 8px;
  font-family: 'Rubik', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lb-platform-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.08);
}

.lb-platform-tab.active {
  color: #fff;
  background: rgba(245, 119, 226, 0.15);
  border-color: rgba(245, 119, 226, 0.4);
}

.lb-tab-label {
  font-family: 'Space Grotesk', sans-serif;
}

/* Prize Pool */
.lb-prize-pool {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}

.lb-prize-amount {
  font-size: 48px;
  font-weight: 800;
  color: var(--green);
  text-shadow: 0 0 20px rgba(80, 235, 150, 0.3);
}

.lb-prize-platform {
  font-family: 'Bungee', sans-serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--blue);
  letter-spacing: 2px;
  text-shadow: 0 0 29.4px rgba(89, 134, 255, 0.61);
}

/* Title */
.lb-title {
  font-family: 'Bungee', sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 52px;
  color: var(--pink);
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
  text-shadow: 0 0 30px rgba(245, 119, 226, 0.3);
}

.lb-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.lb-subtitle a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* CTA Buttons */
.lb-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.lb-rules-btn,
.lb-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 1px;
}

/* Timer Section */
.lb-timer-section {
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

.lb-timer-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.lb-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lb-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.lb-countdown-value {
  font-family: 'Jersey 10', sans-serif;
  font-size: 42px;
  color: var(--text-primary);
  line-height: 1;
}

.lb-countdown-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-top: 4px;
}

.lb-countdown-sep {
  font-family: 'Jersey 10', sans-serif;
  font-size: 36px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.lb-status-text {
  font-family: 'Rubik', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

/* Podium - overrides for leaderboard page */
.lb-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* ============================================
   LEADERBOARD TABLE
   ============================================ */
.lb-table-section {
  padding: 0 20px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.lb-table-container {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

.lb-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 160px 160px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lb-th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.lb-th-user {
  padding-left: 16px;
}

.lb-th-wagered,
.lb-th-prize {
  text-align: center;
}

/* Table Row */
.lb-table-row {
  display: grid;
  grid-template-columns: 80px 1fr 160px 160px;
  padding: 16px 24px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease;
}

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

.lb-table-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.lb-table-row:nth-child(even):hover {
  background: rgba(255, 255, 255, 0.06);
}

.lb-row-rank {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}

.lb-row-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
}

.lb-row-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lb-row-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.lb-row-wagered {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.lb-row-prize {
  font-size: 16px;
  font-weight: 700;
  color: var(--green);
  text-align: center;
}

/* Loading state */
.lb-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  color: var(--text-muted);
  gap: 12px;
}

.lb-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.lb-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   LEADERBOARD HISTORY
   ============================================ */
.lb-history-section {
  padding: 40px 20px 80px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.lb-history-title {
  font-family: 'Rubik', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.lb-history-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.lb-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.lb-history-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.lb-history-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(245, 119, 226, 0.2);
  transform: translateY(-2px);
}

.lb-history-month {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--pink);
  background: rgba(245, 119, 226, 0.12);
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.lb-history-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0 auto 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lb-history-winner {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.lb-history-prize {
  font-size: 13px;
  color: var(--text-muted);
}

.lb-history-prize svg {
  vertical-align: middle;
  margin-right: 4px;
}

/* ============================================
   RULES MODAL
   ============================================ */
.lb-rules-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lb-rules-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lb-rules-modal {
  background: linear-gradient(135deg, #1a1040 0%, #0f0a2a 40%, #1a0a30 100%);
  border: 1px solid rgba(245, 119, 226, 0.15);
  border-radius: 16px;
  padding: 40px;
  max-width: 560px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
}

.lb-rules-close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--text-muted);
  padding: 6px;
  transition: color 0.2s ease;
}

.lb-rules-close:hover {
  color: var(--text-primary);
}

.lb-rules-heading {
  font-family: 'Rubik', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: center;
}

.lb-rules-content ol {
  list-style: decimal;
  padding-left: 24px;
}

.lb-rules-content li {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .lb-hero {
    padding: 90px 16px 40px;
    min-height: auto;
  }

  .lb-prize-amount {
    font-size: 36px;
  }

  .lb-title {
    font-size: 36px;
  }

  .lb-subtitle {
    font-size: 13px;
  }

  .lb-countdown-value {
    font-size: 30px;
  }

  .lb-countdown-unit {
    min-width: 44px;
  }

  .lb-podium {
    gap: 12px;
    flex-wrap: nowrap;
  }

  .podium-card {
    width: 160px;
  }

  .podium-card-inner {
    padding: 24px 12px 16px;
  }

  .podium-avatar {
    width: 48px;
    height: 48px;
  }

  .podium-name {
    font-size: 13px;
  }

  .podium-wagered {
    font-size: 16px;
  }

  .podium-reward {
    font-size: 18px;
    padding: 4px 20px;
  }

  /* Table responsive */
  .lb-table-header {
    grid-template-columns: 50px 1fr 100px 100px;
    padding: 12px 16px;
  }

  .lb-table-row {
    grid-template-columns: 50px 1fr 100px 100px;
    padding: 12px 16px;
  }

  .lb-row-user {
    padding-left: 8px;
  }

  .lb-row-name {
    font-size: 13px;
  }

  .lb-row-wagered,
  .lb-row-prize {
    font-size: 13px;
  }

  .lb-floating-icons {
    display: none;
  }

  .lb-cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .lb-rules-modal {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .lb-podium {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .podium-card {
    width: 100%;
    max-width: 240px;
  }

  .podium-first {
    transform: none;
    order: -1;
  }

  .lb-table-header {
    grid-template-columns: 40px 1fr 80px 80px;
    padding: 10px 12px;
    font-size: 9px;
  }

  .lb-table-row {
    grid-template-columns: 40px 1fr 80px 80px;
    padding: 10px 12px;
  }

  .lb-row-avatar {
    width: 28px;
    height: 28px;
  }

  .lb-row-name {
    font-size: 12px;
  }

  .lb-history-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}
