*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #FFD166;
  --gold-bright: #FFE599;
  --gold-deep: #C8960C;
  --dark: #0f1117;
  --dark-card: #161b27;
  --white: #FFFFFF;
  --green: #5CDB5C;
}

body {
  background-color: var(--dark);
  font-family: 'Barlow', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 80px;
}

/* ── LOGO ── */
.logo-wrap {
  margin-bottom: 10px;
  animation: fadeDown 0.8s ease both;
}

.logo-wrap img {
  max-width: 420px;
  width: 100%;
  display: block;
}

/* ── LEADERBOARD CONTAINER ── */
.leaderboard {
  position: relative;
  width: 100%;
  max-width: 900px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(200, 150, 12, 0.35), 0 0 0 1px rgba(255, 209, 102, 0.15);
  animation: fadeUp 0.9s 0.2s ease both;
}

/* Stage background image */
.leaderboard-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/Gold_OpenLineBackground.jpeg');
  background-size: cover;
  background-position: center top;
  filter: brightness(0.8) saturate(1.15);
  z-index: 0;
}

/* Dark gradient overlay for readability */
.leaderboard-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(10, 8, 4, 0.30) 0%,
      rgba(10, 8, 4, 0.45) 40%,
      rgba(10, 8, 4, 0.65) 100%);
  z-index: 1;
}

.leaderboard-inner {
  position: relative;
  z-index: 2;
  padding: 48px 40px 52px;
}

/* ── HEADER ── */
.lb-header {
  text-align: center;
  margin-bottom: 36px;
}

.lb-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 10vw, 110px);
  letter-spacing: 0.06em;
  line-height: 0.9;
  background: linear-gradient(180deg, var(--gold-bright) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 24px rgba(255, 209, 102, 0.4));
}

.lb-subtitle {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--white);
  opacity: 0.85;
  margin-top: 4px;
}

.lb-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto 0;
  border-radius: 2px;
}

/* ── ROWS ── */
.lb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-row {
  display: grid;
  grid-template-columns: 56px 1fr 72px 70px;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.08);
  transition: background 0.2s, transform 0.2s;
  animation: slideIn 0.5s ease both;
}

.lb-row:hover {
  background: rgba(255, 209, 102, 0.12);
  transform: translateX(4px);
}

/* Top 3 special styles */
/* Top 3 special styles */
.lb-row.rank-1 {
  border-color: rgba(255, 209, 102, 0.9);
  background: rgba(255, 209, 102, 0.22);
  box-shadow: 0 0 18px rgba(255, 209, 102, 0.22);
}

.lb-row.rank-2 {
  border-color: rgba(216, 216, 216, 0.75);
  background: rgba(216, 216, 216, 0.16);
  box-shadow: 0 0 14px rgba(216, 216, 216, 0.14);
}

.lb-row.rank-3 {
  border-color: rgba(205, 139, 90, 0.8);
  background: rgba(205, 139, 90, 0.16);
  box-shadow: 0 0 14px rgba(205, 139, 90, 0.14);
}

/* Stagger animations */
.lb-row:nth-child(1) {
  animation-delay: 0.3s;
}

.lb-row:nth-child(2) {
  animation-delay: 0.38s;
}

.lb-row:nth-child(3) {
  animation-delay: 0.46s;
}

.lb-row:nth-child(4) {
  animation-delay: 0.54s;
}

.lb-row:nth-child(5) {
  animation-delay: 0.62s;
}

.lb-row:nth-child(6) {
  animation-delay: 0.70s;
}

.lb-row:nth-child(7) {
  animation-delay: 0.78s;
}

.lb-row:nth-child(8) {
  animation-delay: 0.86s;
}

.lb-row:nth-child(9) {
  animation-delay: 0.94s;
}

.lb-row:nth-child(10) {
  animation-delay: 1.02s;
}

.lb-rank {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  text-align: center;
  line-height: 1;
}

.rank-1 .lb-rank {
  color: var(--gold-bright);
  text-shadow: 0 0 20px rgba(255, 229, 153, 0.7);
}

.rank-2 .lb-rank {
  color: #D8D8D8;
}

.rank-3 .lb-rank {
  color: #CD8B5A;
}

.lb-row:not(.rank-1):not(.rank-2):not(.rank-3) .lb-rank {
  color: rgba(255, 255, 255, 0.45);
}

.lb-name {
  font-family: 'Barlow', sans-serif;
  font-size: clamp(16px, 2.5vw, 22px);
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.01em;
}

.rank-1 .lb-name {
  color: var(--gold-bright);
}

.lb-country {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
}

.lb-points {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
}

.lb-points::after {
  content: ' PTS';
  font-size: 0.55em;
  font-weight: 700;
  color: rgba(255, 209, 102, 0.55);
  letter-spacing: 0.1em;
}

.rank-1 .lb-points {
  color: var(--gold-bright);
  filter: drop-shadow(0 0 6px rgba(255, 229, 153, 0.35));
}

/* Crown / medal badges */
.lb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 22px;
  line-height: 1;
  vertical-align: middle;
}

.rank-1 .lb-badge {
  filter: drop-shadow(0 0 6px rgba(255, 209, 102, 0.35));
}

.rank-2 .lb-badge {
  filter: drop-shadow(0 0 4px rgba(216, 216, 216, 0.25));
}

.rank-3 .lb-badge {
  filter: drop-shadow(0 0 4px rgba(205, 139, 90, 0.25));
}

/* ── FOOTER GLOW ── */
.lb-footer {
  text-align: center;
  margin-top: 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 209, 102, 0.35);
}

/* ── ANIMATIONS ── */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .leaderboard-inner {
    padding: 24px 12px 32px;
  }

  .lb-header {
    margin-bottom: 24px;
  }

  .lb-row {
    grid-template-columns: 30px 1fr 38px 60px;
    gap: 8px;
    padding: 10px 10px;
  }

  .lb-rank {
    font-size: 20px;
  }

  .lb-name {
    font-size: 15px;
    line-height: 1.2;
  }

  .lb-badge {
    font-size: 18px;
    margin-right: 4px;
  }

  .lb-country {
    font-size: 10px;
    letter-spacing: 0.04em;
  }

  .lb-points {
    font-size: 18px;
  }

  .lb-points::after {
    font-size: 9px;
    letter-spacing: 0.05em;
  }
}