/* ─── Leaderboard page ──────────────────────────────────────────────────── */

.lb-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px 80px;
}

/* Header */
.lb-hero {
  text-align: center;
  margin-bottom: 56px;
}

.lb-hero-tag {
  display: inline-block;
  background: rgba(191, 255, 96, 0.12);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(191, 255, 96, 0.2);
  margin-bottom: 20px;
}

.lb-hero-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  color: var(--fg);
  margin: 0 0 16px;
  line-height: 1.15;
}

.lb-hero-title span {
  color: var(--lime);
}

.lb-hero-sub {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--fg-dim);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.lb-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lime);
  color: #080808;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .15s;
}

.lb-hero-cta:hover { opacity: .85; }

/* Grade badge */
.lb-grade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.lb-grade-A { background: #4DFF88; color: #080808; }
.lb-grade-B { background: #BFFF60; color: #080808; }
.lb-grade-C { background: #FFD84D; color: #080808; }
.lb-grade-D { background: #FF9D4D; color: #080808; }
.lb-grade-F { background: #FF4D4D; color: #ffffff; }

/* Score pill */
.lb-score {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.lb-score-low  { background: rgba(77,255,136,0.12); color: #4DFF88; }
.lb-score-med  { background: rgba(255,216,77,0.12);  color: #FFD84D; }
.lb-score-high { background: rgba(255,157,77,0.12);  color: #FF9D4D; }
.lb-score-crit { background: rgba(255,77,77,0.12);   color: #FF4D4D; }

/* Hall of Fame / Shame strips */
.lb-halls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

@media (max-width: 700px) { .lb-halls { grid-template-columns: 1fr; } }

.lb-hall {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 20px;
}

.lb-hall-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 16px;
}

.lb-hall-fame .lb-hall-title { color: #4DFF88; }
.lb-hall-shame .lb-hall-title { color: #FF4D4D; }

.lb-hall-empty {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-dim);
  font-style: italic;
}

.lb-hall-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.lb-hall-row:last-child { border-bottom: none; }

.lb-hall-repo {
  flex: 1;
  min-width: 0;
}

.lb-hall-repo-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  text-decoration: none;
}

.lb-hall-repo-name:hover { color: var(--lime); }

.lb-hall-finds {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  white-space: nowrap;
}

/* Main table */
.lb-table-section {
  margin-bottom: 40px;
}

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

.lb-table-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}

.lb-table-count {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg-dim);
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-2);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}

.lb-table th {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fg-dim);
  padding: 12px 16px;
  text-align: left;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.lb-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.lb-table tr:last-child td { border-bottom: none; }

.lb-table tr:hover td { background: rgba(255,255,255,0.02); }

.lb-rank {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  width: 40px;
}

.lb-repo-cell {
  min-width: 200px;
}

.lb-repo-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}

.lb-repo-name {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.lb-repo-link:hover .lb-repo-name { color: var(--lime); }

.lb-repo-host {
  font-size: 11px;
  color: var(--fg-dim);
}

.lb-critical-count {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.lb-critical-zero { color: var(--fg-dim); }
.lb-critical-nonzero { color: #FF4D4D; }

.lb-findings-total {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-dim);
}

.lb-date {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--fg-dim);
  white-space: nowrap;
}

.lb-actions-cell {
  width: 90px;
}

.lb-view-btn {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--lime);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(191,255,96,0.25);
  border-radius: 5px;
  white-space: nowrap;
  transition: background .15s;
  display: inline-block;
}

.lb-view-btn:hover {
  background: rgba(191,255,96,0.1);
}

/* Empty state */
.lb-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--fg-dim);
}

.lb-empty-icon { font-size: 40px; margin-bottom: 16px; }

.lb-empty-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 8px;
}

.lb-empty-sub {
  font-size: 14px;
  margin: 0 0 24px;
}

/* Pagination */
.lb-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.lb-page-btn {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  transition: border-color .15s, background .15s;
}

.lb-page-btn:hover {
  border-color: var(--lime);
  background: rgba(191,255,96,0.06);
}

.lb-page-btn.active {
  background: var(--lime);
  color: #080808;
  border-color: var(--lime);
  font-weight: 700;
}

.lb-page-btn.disabled {
  opacity: .3;
  pointer-events: none;
}

/* Submit CTA */
.lb-submit-cta {
  margin-top: 48px;
  background: linear-gradient(135deg, rgba(191,255,96,0.06) 0%, rgba(191,255,96,0.02) 100%);
  border: 1px solid rgba(191,255,96,0.15);
  border-radius: 14px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 700px) { .lb-submit-cta { flex-direction: column; align-items: flex-start; } }

.lb-submit-text {}

.lb-submit-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 6px;
}

.lb-submit-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--fg-dim);
  margin: 0;
}

.lb-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lime);
  color: #080808;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .15s;
  flex-shrink: 0;
}

.lb-submit-btn:hover { opacity: .85; }

/* Responsive: hide less-important columns on small screens */
@media (max-width: 600px) {
  .lb-table th.hide-sm,
  .lb-table td.hide-sm {
    display: none;
  }
}

/* ─── Badge button in table ───────────────────────────────────────────────── */

.lb-badge-cell { text-align: center; }

.lb-badge-btn {
  background: rgba(191, 255, 96, 0.1);
  border: 1px solid rgba(191, 255, 96, 0.25);
  border-radius: 5px;
  color: var(--lime, #BFFF60);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

.lb-badge-btn:hover {
  background: rgba(191, 255, 96, 0.2);
  border-color: rgba(191, 255, 96, 0.45);
}
