/* Leaderboard — compact toolbar + galaxy backdrop */
.lb-page {
  min-height: 100vh;
  color: #e5e7eb;
  background:
    linear-gradient(180deg, rgba(6, 10, 20, 0.7) 0%, rgba(6, 10, 20, 0.82) 45%, rgba(6, 10, 20, 0.92) 100%),
    url(/images/galaxy-backdrop.jpg) center / cover no-repeat fixed;
}

.lb-page > nav {
  background: rgba(8, 12, 24, 0.75) !important;
}

.lb-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.lb-hero {
  text-align: center;
  margin-bottom: 1.25rem;
}

.lb-kicker {
  font-family: Outfit, system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #00e5c3;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.lb-hero h1 {
  font-family: Outfit, system-ui, sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  color: #f5deb3;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.lb-lead {
  max-width: 520px;
  margin: 0 auto 0.75rem;
  color: #c4c9d4;
  font-size: 0.92rem;
  line-height: 1.5;
}

.lb-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 195, 0.35);
  background: rgba(0, 229, 195, 0.1);
  color: #00e5c3;
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}

.lb-status.is-error {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

/* Compact toolbar card */
.lb-controls {
  max-width: 720px;
  margin: 0 auto 1.25rem;
}

.lb-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  border: 1px solid rgba(100, 160, 255, 0.18);
  background: rgba(10, 15, 31, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.lb-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
}

.lb-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(6, 10, 20, 0.55);
  border: 1px solid rgba(100, 160, 255, 0.12);
}

.lb-tab {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #9ca3af;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

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

.lb-tab.is-active {
  color: #060a14;
  background: linear-gradient(90deg, #00e5c3, #00b4d8);
  border-color: transparent;
  box-shadow:
    0 0 0 1px rgba(0, 229, 195, 0.35),
    0 0 14px rgba(0, 229, 195, 0.35);
}

.lb-tab:active,
.lb-era:active {
  transform: scale(0.97);
}

.lb-eras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
}

.lb-era {
  border: 1px solid rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.1);
  color: #fdba74;
  border-radius: 999px;
  padding: 0.32rem 0.7rem;
  cursor: pointer;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.75rem;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.lb-era.is-active {
  background: linear-gradient(90deg, #f97316, #ef4444);
  color: #fff;
  border-color: transparent;
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.4),
    0 0 12px rgba(249, 115, 22, 0.35);
}

.lb-eras[hidden],
.lb-season-wrap[hidden],
.lb-empty[hidden],
.lb-podium[hidden] {
  display: none !important;
}

.lb-season-wrap,
.lb-search-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(6, 10, 20, 0.55);
  border: 1px solid rgba(100, 160, 255, 0.18);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  color: #9ca3af;
  font-size: 0.72rem;
  min-height: 2rem;
  box-sizing: border-box;
}

.lb-search-row {
  display: flex;
  justify-content: center;
}

.lb-search-wrap {
  width: auto;
  max-width: none;
}

.lb-search-wrap svg {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.lb-season-wrap select,
.lb-search-wrap input {
  background: transparent;
  border: 0;
  color: #f3f4f6;
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  outline: none;
  min-width: 0;
  line-height: 1;
  padding: 0;
}

.lb-search-wrap input {
  width: 8.5rem;
}

.lb-search-wrap input::placeholder {
  color: #9ca3af;
  font-weight: 600;
}

.lb-season-wrap select {
  min-width: 5.5rem;
}

.lb-season-wrap select option {
  background: #0a0f1f;
  color: #f3f4f6;
}

.lb-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.lb-card {
  background: rgba(10, 15, 31, 0.72);
  border: 1px solid rgba(100, 160, 255, 0.18);
  border-radius: 0.9rem;
  padding: 1rem 0.85rem 0.9rem;
  text-align: center;
  min-height: 140px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.lb-card:hover {
  border-color: rgba(100, 160, 255, 0.4);
}

.lb-card.is-first {
  min-height: 170px;
  order: 2;
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 10px 32px rgba(249, 115, 22, 0.15);
}

.lb-card.is-second { order: 1; }
.lb-card.is-third { order: 3; }

.lb-medal {
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.lb-card h3 {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

.lb-card p {
  color: #9ca3af;
  font-size: 0.85rem;
}

.lb-table-wrap {
  background: rgba(10, 15, 31, 0.75);
  border: 1px solid rgba(100, 160, 255, 0.18);
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.lb-table-head {
  padding: 1rem 1.15rem 0.35rem;
}

.lb-table-head h2 {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.lb-table-head p {
  color: #9ca3af;
  font-size: 0.85rem;
}

.lb-scroll {
  overflow-x: auto;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.lb-table th,
.lb-table td {
  text-align: left;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid rgba(100, 160, 255, 0.08);
}

.lb-table th {
  font-family: Outfit, system-ui, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00e5c3;
}

.lb-table tbody tr:hover {
  background: rgba(0, 229, 195, 0.07);
}

.lb-rank {
  font-family: Outfit, system-ui, sans-serif;
  font-weight: 700;
  width: 72px;
}

.lb-rank.is-1 { color: #fbbf24; }
.lb-rank.is-2 { color: #e5e7eb; }
.lb-rank.is-3 { color: #fb923c; }

.lb-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: #9ca3af;
}

.lb-privacy {
  margin-top: 1.25rem;
  text-align: center;
  color: rgba(156, 163, 175, 0.9);
  font-size: 0.82rem;
}

.lb-privacy a {
  color: #00e5c3;
  text-decoration: none;
}

.lb-privacy a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .lb-page {
    background-attachment: scroll;
  }

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

  .lb-card.is-first,
  .lb-card.is-second,
  .lb-card.is-third {
    order: 0;
    min-height: 0;
  }
}
