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

body {
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  background: #050816;
  color: #f9fafb;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.leaderboard-wrapper {
  width: 100%;
  max-width: 900px;
  background: radial-gradient(circle at top, #111827 0, #020617 60%);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(148,163,184,.3);
  box-shadow: 0 20px 40px rgba(0,0,0,.65);
}

.lb-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.lb-title { font-size: 1.4rem; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.badge {
  font-size: .7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(56,189,248,.15);
  color: #7dd3fc;
  border: 1px solid rgba(56,189,248,.6);
  text-transform: uppercase;
}

.lb-subtitle { margin-top: 6px; font-size: .85rem; color: #9ca3af; }

.lb-meta { text-align: right; font-size: .78rem; color: #9ca3af; }
.countdown-text { display: block; margin-top: 6px; color: #e5e7eb; }

.lb-switch { margin-top: 10px; display: flex; gap: 8px; }
.switch-btn {
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,.5);
  background: rgba(15,23,42,.9);
  color: #e5e7eb;
  padding: 6px 10px;
  font-size: .78rem;
  cursor: pointer;
}
.switch-btn.active {
  background: rgba(30,64,175,.95);
  border-color: rgba(59,130,246,.9);
  box-shadow: 0 0 12px rgba(37,99,235,.45);
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.lb-table thead { background: rgba(15,23,42,.85); }
.lb-table th, .lb-table td { padding: 10px; text-align: left; }
.lb-table th {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9ca3af;
  border-bottom: 1px solid rgba(55,65,81,.9);
}
.lb-table tbody tr { border-bottom: 1px solid rgba(31,41,55,.6); }

.col-rank { width: 48px; }

.rank-pill {
  display: inline-flex;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .85rem;
  background: rgba(148,163,184,.12);
}

.rank-1 { background: linear-gradient(135deg,#facc15,#f97316); color:#111827; }
.rank-2 { background: linear-gradient(135deg,#e5e7eb,#9ca3af); color:#020617; }
.rank-3 { background: linear-gradient(135deg,#f97316,#fb923c); color:#111827; }

.avatar-name { display: flex; gap: 10px; align-items: center; }
.avatar {
  width: 34px; height: 34px; border-radius: 999px; overflow: hidden;
  background: #1f2937; border: 1px solid rgba(148,163,184,.5);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.username { font-weight: 700; }
.anon-tag { font-size: .7rem; color: #9ca3af; text-transform: uppercase; letter-spacing: .08em; }

.amount { font-variant-numeric: tabular-nums; }

.prize-badge {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  background: rgba(22,163,74,.1);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,.7);
}

.lb-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: .78rem;
  color: #9ca3af;
}

.lb-refresh {
  border-radius: 999px;
  padding: 6px 12px;
  border: 1px solid rgba(148,163,184,.5);
  background: rgba(15,23,42,.9);
  color: #e5e7eb;
  cursor: pointer;
}
.lb-refresh:hover { background: rgba(30,64,175,.9); }

@media (max-width: 640px) {
  .lb-header { flex-direction: column; align-items: flex-start; }
  .lb-meta { text-align: left; }
  .lb-table th:nth-child(4), .lb-table td:nth-child(4) { display: none; }
}

