/* ── Base ── */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #0a0a2e;
}

/* ── Hero ── */
.leaderboard-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 3rem;
  background: linear-gradient(135deg, #0a0a2e 0%, #1a1a3e 50%, #0a0a2e 100%);
}

.leaderboard-hero-content h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 3rem;
  letter-spacing: 0.2em;
  color: #ffffff;
  margin-bottom: 1rem;
}

.leaderboard-hero-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #ffc837;
  margin-top: 1rem;
}

/* ── Section ── */
.leaderboard-section {
  padding: 3rem 0 6rem;
  flex: 1;
  background: linear-gradient(180deg, #0a0a2e 0%, #0d0d24 100%);
}

.leaderboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

/* ── Director Note Banner ── */
.lb-director-note {
  max-width: 1200px;
  margin: 0 auto 1.5rem;
  padding: 0.85rem 2rem;
  text-align: center;
}

.lb-director-note a {
  color: #ffc837;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.lb-director-note a:hover {
  color: #ffe08a;
  text-decoration: underline;
}

/* ── Tabs ── */
.lb-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
}

.lb-tab {
  flex: 1;
  padding: 1rem 1.25rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s;
  text-align: center;
  text-transform: uppercase;
}

.lb-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.lb-tab.active {
  color: #ffc837;
  border-bottom-color: #ffc837;
}

/* ── Panels ── */
.lb-panel {
  display: none;
  padding: 2rem 1.5rem;
}

.lb-panel.active {
  display: block;
}

/* ── Vendor Table ── */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
}

.leaderboard-table thead th {
  font-family: 'Oswald', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.3);
}

.leaderboard-table thead th.num-cell,
.leaderboard-table thead th.score-cell,
.leaderboard-table thead th.rank-cell {
  text-align: center;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s;
}

.leaderboard-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.rank-cell {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #cd7f32;
  padding: 0.9rem 1rem;
  width: 60px;
}

.name-cell {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  padding: 0.9rem 1rem;
}

.num-cell {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.9rem 1rem;
}

.score-cell {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #ffc837;
  padding: 0.9rem 1rem;
}

/* Medal row highlights — uniform color */
.rank-gold .rank-cell,
.rank-silver .rank-cell,
.rank-bronze .rank-cell {
  color: #cd7f32;
}

.rank-gold,
.rank-silver,
.rank-bronze {
  background: transparent;
}

/* ── Vendor Description ── */
.lb-vendor-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #ffc837;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.lb-vendor-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.5rem;
}

/* ── Disclosure ── */
.lb-disclosure {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 200, 55, 0.2);
  border-radius: 6px;
  background: rgba(255, 200, 55, 0.05);
}

.lb-disclosure p {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

/* ── Additional Participants ── */
.lb-participants {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-participants-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.lb-participants-list {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
}

/* ── Side-by-side grid for Missions & Components ── */
.lb-grid {
  display: grid;
  gap: 0;
}

.lb-grid-2 {
  grid-template-columns: 1fr 1fr;
}

.lb-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.lb-grid .lb-mission-block {
  padding: 1.75rem 1.25rem;
  border-bottom: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-grid .lb-mission-block:last-child {
  border-right: none;
}

/* ── Mission Blocks (Tab 2) ── */
.lb-mission-block {
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-mission-block:last-child {
  border-bottom: none;
}

.lb-mission-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #ffc837;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.lb-mission-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.25rem;
}

/* ── Selected for Orders badge ── */
.selected-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.6rem;
  font-family: 'Oswald', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffc837;
  background: rgba(255, 200, 55, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  vertical-align: middle;
}

.star-icon {
  width: 0.75rem;
  height: 0.75rem;
  color: #ffc837;
  flex-shrink: 0;
}

.tie-badge {
  font-size: 0.6rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  vertical-align: super;
  margin-left: 1px;
}

/* ── TBD States ── */
.lb-tbd-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 2rem;
  text-align: center;
}

.lb-tbd-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}

.lb-tbd-banner p {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
}

.lb-tbd-inline {
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.35);
  padding: 1rem 0;
}

/* ── Two-column layout for Component & Mission tabs ── */
.lb-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2rem;
}

.lb-two-col .lb-category-block {
  border-bottom: none;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 2rem;
}

.lb-two-col .lb-category-block:last-child {
  border-right: none;
  padding-right: 0;
  padding-left: 0;
}

/* Stack podium cards vertically inside columns */
.lb-two-col .lb-podium {
  flex-direction: column;
}

.lb-two-col .lb-podium .podium-card {
  max-width: 100%;
}

/* ── Category Blocks (Component & Mission tabs) ── */
.lb-category-block {
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lb-category-block:last-child {
  border-bottom: none;
}

.lb-category-title {
  font-family: 'Oswald', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.lb-category-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
  max-width: 720px;
  margin-bottom: 1.25rem;
}

.lb-top3-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 0.75rem;
}

/* ── Podium Cards ── */
.lb-podium {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.podium-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  min-width: 200px;
  flex: 1;
  max-width: 300px;
}

.podium-card.gold {
  border-color: rgba(255, 255, 255, 0.15);
  background: transparent;
}
.podium-card.silver {
  border-color: rgba(255, 255, 255, 0.15);
  background: transparent;
}
.podium-card.bronze {
  border-color: rgba(255, 255, 255, 0.15);
  background: transparent;
}

.podium-rank-num {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

.podium-card.gold .podium-rank-num {
  color: #ffd700;
}
.podium-card.silver .podium-rank-num {
  color: #c0c0c0;
}
.podium-card.bronze .podium-rank-num {
  color: #cd7f32;
}

.podium-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  flex: 1;
  line-height: 1.3;
}

.podium-rank-label {
  font-family: 'Oswald', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .leaderboard-hero-content h1 {
    font-size: 2rem;
  }

  .leaderboard-container {
    padding: 0 1rem;
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .lb-tabs {
    flex-direction: column;
  }

  .lb-tab {
    border-bottom: none;
    border-left: 2px solid transparent;
    text-align: left;
    padding: 0.85rem 1rem;
  }

  .lb-tab.active {
    border-left-color: #ffc837;
    border-bottom-color: transparent;
  }

  .leaderboard-table thead th {
    font-size: 0.7rem;
    padding: 0.6rem 0.5rem;
  }

  .rank-cell,
  .num-cell,
  .score-cell,
  .name-cell {
    padding: 0.75rem 0.5rem;
    font-size: 0.8rem;
  }

  .lb-two-col {
    grid-template-columns: 1fr;
  }

  .lb-grid-2,
  .lb-grid-3 {
    grid-template-columns: 1fr;
  }

  .lb-grid .lb-mission-block {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .lb-grid .lb-mission-block:last-child {
    border-bottom: none;
  }

  .lb-two-col .lb-category-block {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0;
  }

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