/* Specific styles for Leaderboard.html (Mobile First) */

#leaderboard-container {
  max-width: 520px;
  width: 100%;
}

.subtitle {
  color: var(--text-muted);
  font-size: clamp(10px, 3vw, 12px);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 20px;
  font-family: var(--font-title);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  table-layout: auto;
}

th,
td {
  padding: 8px 6px;
  text-align: left;
  vertical-align: middle;
}

@media (min-width: 400px) {
  th,
  td {
    padding: 12px 14px;
  }
}

th {
  font-size: clamp(9.5px, 2.8vw, 11px);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tr:last-child {
  border-bottom: none;
}

.rank {
  font-weight: bold;
  width: 36px;
  font-family: var(--font-title);
  font-size: clamp(12px, 3.2vw, 15px);
}

@media (min-width: 400px) {
  .rank {
    width: 48px;
  }
}

.username {
  color: var(--neon-cyan);
  font-weight: 600;
  font-size: clamp(12.5px, 3.5vw, 15px);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  word-break: break-word;
}

.score {
  text-align: right;
  font-weight: 800;
  color: var(--neon-yellow);
  font-family: var(--font-title);
  font-size: clamp(13px, 3.5vw, 16px);
  white-space: nowrap;
}

.no-scores {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: 20px 0;
}

@keyframes glitter-glow {
  0% {
    text-shadow: 0 0 4px currentColor, 0 0 10px currentColor;
    opacity: 0.9;
  }
  50% {
    text-shadow: 0 0 12px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
    opacity: 1;
  }
  100% {
    text-shadow: 0 0 4px currentColor, 0 0 10px currentColor;
    opacity: 0.9;
  }
}

tr:nth-child(1) .rank,
tr:nth-child(1) .username {
  color: #ffd700;
  animation: glitter-glow 2s infinite ease-in-out;
  font-weight: 900;
}

tr:nth-child(2) .rank,
tr:nth-child(2) .username {
  color: #c0c0c0;
  animation: glitter-glow 2.5s infinite ease-in-out;
}

tr:nth-child(3) .rank,
tr:nth-child(3) .username {
  color: #cd7f32;
  animation: glitter-glow 3s infinite ease-in-out;
}

.badge-dev {
  background: linear-gradient(45deg, var(--neon-pink), var(--neon-yellow));
  color: #fff;
  font-size: 8.5px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.8px;
  text-shadow: 0 0 5px rgba(255, 0, 127, 0.5);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.3);
  display: inline-block;
  line-height: 1;
  font-family: var(--font-title);
}

.badge-helper {
  background: linear-gradient(45deg, var(--neon-green), var(--neon-cyan));
  color: #fff;
  font-size: 8.5px;
  font-weight: 900;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.8px;
  text-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
  box-shadow: 0 0 10px rgba(46, 204, 113, 0.3);
  display: inline-block;
  line-height: 1;
  font-family: var(--font-title);
}
