/* ==================== FONTS & COLORS ==================== */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@100..900&family=Unbounded:wght@600&display=swap");

:root {
  --first-color: hsl(265, 75%, 48%);
  --second-color: hsl(18, 88%, 58%);
  --title-color: hsl(220, 20%, 8%);
  --text-color: hsl(220, 8%, 35%);
  --white-color: #fff;
  --container-color: #fff;
  --body-color: hsl(220, 4%, 99%);

  --body-font: "Montserrat", sans-serif;
  --second-font: "Unbounded", sans-serif;
}

/* ==================== LAYOUT ==================== */
body {
  margin: 0;
  background: var(--body-color);
  font-family: var(--body-font);
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.5rem;
  padding: 6rem 2rem 3rem;
}

/* ==================== SIDEBAR ==================== */
.leaderboard-sidebar {
  background: var(--container-color);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  height: fit-content;
  position: sticky;
  top: 90px;
}

.sidebar-title {
  font-family: var(--second-font);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--title-color);
}

.sidebar-category {
  margin: 1rem 0 .3rem;
  font-size: .9rem;
  color: var(--first-color);
  font-weight: 600;
}

.sidebar-links {
  list-style: none;
  padding: 0;
}

.sidebar-links li {
  margin-bottom: .4rem;
}

.sidebar-links a {
  display: block;
  padding: .6rem .8rem;
  border-radius: .6rem;
  text-decoration: none;
  color: var(--text-color);
  font-size: .95rem;
  transition: .3s;
}

.sidebar-links a:hover,
.sidebar-links a.active {
  background: var(--first-color);
  color: var(--white-color);
  transform: translateX(4px);
}

/* ==================== CONTENT AREA ==================== */
.leaderboard-content {
  padding: 1rem;
}

.leaderboard-title {
  font-family: var(--second-font);
  font-size: 1.8rem;
  color: var(--title-color);
}

.leaderboard-description {
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.leaderboard-box {
  background: var(--container-color);
  border-radius: 1rem;
  padding: 2rem;
  min-height: 300px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .leaderboard-layout {
    grid-template-columns: 1fr;
  }

  .leaderboard-sidebar {
    position: relative;
    top: 0;
  }
}


.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.lb-table thead {
  background: var(--first-color);
  color: var(--white-color);
}

.lb-table th,
.lb-table td {
  padding: .75rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  text-align: left;
}

.lb-table tr:nth-child(even) td {
  background: rgba(0,0,0,0.02);
}

.lb-table tr:hover td {
  background: rgba(0,0,0,0.05);
}

.lb-logo {
  width: 200px;
  height: 50px;
  object-fit: contain;   /* Keeps full image visible */
  border-radius: 10px;
}

/* ===================== REPEATING SCROLL FADE ===================== */

.scroll-fade {
  opacity: 0;
  transform: translateY(50px);
  filter: blur(10px);
  transition:
    opacity 1s cubic-bezier(0.25, 1, 0.3, 1),
    transform 1s cubic-bezier(0.25, 1, 0.3, 1),
    filter 1s cubic-bezier(0.25, 1, 0.3, 1);
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger delay system */
.delay-1 { transition-delay: .15s; }
.delay-2 { transition-delay: .30s; }
.delay-3 { transition-delay: .45s; }
.delay-4 { transition-delay: .60s; }

/* Mobile tuning */
@media (max-width: 768px) {
  .scroll-fade {
    transform: translateY(30px);
    filter: blur(6px);
  }
}

/* ===================== REPEATING SCROLL FADE ===================== */

.scroll-fade {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(10px);
  transition:
    opacity 1s cubic-bezier(0.25, 1, 0.3, 1),
    transform 1s cubic-bezier(0.25, 1, 0.3, 1),
    filter 1s cubic-bezier(0.25, 1, 0.3, 1);
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.delay-1  { transition-delay: .15s; }
.delay-2  { transition-delay: .30s; }
.delay-3  { transition-delay: .45s; }
.delay-4  { transition-delay: .60s; }
.delay-5  { transition-delay: .75s; }
.delay-6  { transition-delay: .90s; }
.delay-7  { transition-delay: 1.05s; }
.delay-8  { transition-delay: 1.20s; }
.delay-9  { transition-delay: 1.35s; }
.delay-10 { transition-delay: 1.50s; }
.delay-11 { transition-delay: 1.65s; }
.delay-12 { transition-delay: 1.80s; }
.delay-13 { transition-delay: 1.95s; }
.delay-14 { transition-delay: 2.10s; }
.delay-15 { transition-delay: 2.25s; }
.delay-16 { transition-delay: 2.40s; }
.delay-17 { transition-delay: 2.55s; }
.delay-18 { transition-delay: 2.70s; }
.delay-19 { transition-delay: 2.85s; }
.delay-20 { transition-delay: 3.00s; }
.delay-21 { transition-delay: 3.15s; }
.delay-22 { transition-delay: 3.30s; }

/* Mobile optimization */
@media (max-width: 768px) {
  .scroll-fade {
    transform: translateY(25px);
    filter: blur(6px);
  }
}
