/* public/css/leaderboard.css */

body.lb-body { min-height: 100vh; }

.lb-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

/* ---- Header ---- */
.lb-header {
  text-align: center;
  margin-bottom: 32px;
}

.lb-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.lb-header h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin-bottom: 14px;
}

.lb-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 24px;
}

.lb-season {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
}
.lb-season-label {
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 10px;
}
.lb-season-time {
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}

/* ---- Loading ---- */
.lb-loading {
  text-align: center;
  padding: 60px 24px;
}
.lb-loading.hidden { display: none; }
.lb-loading p {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 14px;
}
.lb-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-2);
  border-top-color: var(--green);
  border-radius: 50%;
  margin: 0 auto;
  animation: lbSpin 0.9s linear infinite;
}
@keyframes lbSpin { to { transform: rotate(360deg); } }

/* ---- Disabled state ---- */
.lb-disabled {
  text-align: center;
  padding: 60px 28px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 520px;
  margin: 0 auto;
}
.lb-disabled-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}
.lb-disabled h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}
.lb-disabled p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* ============================================================ */
/*  "ME" STATUS CARD                                             */
/* ============================================================ */

.lb-me {
  max-width: 520px;
  margin: 0 auto 28px;
}

.lb-me-card {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 18px 20px;
}

.lb-me-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lb-me-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-dim), #0d1017);
  border: 1px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--green);
  text-transform: uppercase;
  flex-shrink: 0;
}

.lb-me-info {
  flex: 1;
  min-width: 0;
}

.lb-me-username {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-me-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  font-family: var(--font-mono);
}

.lb-me-rank {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.lb-me-rank.dim { color: var(--text-dim); font-size: 14px; }
.lb-me-rank small { font-size: 12px; color: var(--text-dim); font-weight: 700; margin-left: 2px; }

/* Progress */
.lb-me-progress {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.lb-me-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 8px;
}

#lb-me-progress-text {
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

#lb-me-progress-hint {
  color: var(--text-dim);
  font-size: 11px;
}

.lb-me-progress-bar {
  height: 6px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
}

.lb-me-progress-fill {
  height: 100%;
  background: var(--green);
  width: 0%;
  border-radius: 3px;
  transition: width 0.4s ease-out;
}

/* Qualified message */
.lb-me-qualified {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.lb-me-qualified-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.15);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.lb-me-qualified-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}

.lb-me-qualified-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================ */
/*  TABLE                                                        */
/* ============================================================ */

.lb-table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.lb-table-header,
.lb-row {
  display: grid;
  grid-template-columns: 70px 1fr 160px;
  align-items: center;
  padding: 14px 20px;
}

.lb-table-header {
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.lb-col-balance { text-align: right; }

.lb-table-body .lb-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.lb-table-body .lb-row:last-child { border-bottom: none; }
.lb-table-body .lb-row:hover { background: rgba(255, 255, 255, 0.02); }

/* Top 3 */
.lb-row.rank-1 { background: linear-gradient(90deg, rgba(74,222,128,0.08), transparent); }
.lb-row.rank-2 { background: linear-gradient(90deg, rgba(203,213,225,0.05), transparent); }
.lb-row.rank-3 { background: linear-gradient(90deg, rgba(251,146,60,0.05), transparent); }

.lb-rank {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
  color: var(--text-dim);
}
.lb-row.rank-1 .lb-rank { color: var(--green); }
.lb-row.rank-2 .lb-rank { color: #cbd5e1; }
.lb-row.rank-3 .lb-rank { color: #fb923c; }

.lb-player {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lb-username {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-row.you .lb-username { color: var(--green); }

.lb-short {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.lb-balance {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  text-align: right;
}

.lb-empty {
  padding: 40px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}

/* Footnote */
.lb-footnote {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 20px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .lb-main { padding: 80px 16px 40px; }
  .lb-header h1 { font-size: 28px; }
  .lb-table-header,
  .lb-row {
    grid-template-columns: 50px 1fr 110px;
    padding: 12px 14px;
  }
  .lb-balance { font-size: 13px; }
  .lb-username { font-size: 13px; }
  .lb-me-top { gap: 10px; }
  .lb-me-avatar { width: 38px; height: 38px; font-size: 14px; }
  .lb-me-rank { font-size: 18px; }
}