/* ============================================
   ExamConnect — Leaderboard Page (Real Data)
   Brand: #327b74 Teal | #0F4C81 Navy | #F59E0B Amber
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

.ec-lb-page, .ec-lb-page * {
  font-family: 'Poppins', sans-serif !important;
  box-sizing: border-box;
}

.ec-lb-page {
  background: #fafbfc;
  padding: 24px 0 60px;
}
.ec-lb-page .container-lb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Hide gray default title bar */
.container-fluid[style*="dee2e6"]:has(+ .ec-lb-page) { display: none !important; }

/* === BREADCRUMB === */
.ec-lb-breadcrumb { font-size: 11px; color: #64748b; margin-bottom: 14px; }
.ec-lb-breadcrumb a { color: #327b74; text-decoration: none; font-weight: 500; }
.ec-lb-breadcrumb b { color: #0F4C81; font-weight: 600; }
.ec-lb-breadcrumb .sep { margin: 0 6px; color: #cbd5e1; }

/* === HERO === */
.ec-lb-hero {
  background: linear-gradient(135deg, #0F4C81 0%, #327b74 100%);
  border-radius: 14px;
  padding: 32px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
  text-align: center;
}
.ec-lb-hero::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: rgba(245, 158, 11, 0.15);
  border-radius: 50%;
}
.ec-lb-hero::after {
  content: '🏆';
  position: absolute; bottom: -15px; left: 25px;
  font-size: 80px; opacity: 0.08;
}
.ec-lb-hero-content { position: relative; z-index: 1; }
.ec-lb-hero-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  color: #FAC775;
  padding: 5px 16px;
  border-radius: 18px;
  font-size: 11px; font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}
.ec-lb-hero-title {
  font-size: 30px !important;
  font-weight: 800 !important;
  margin: 0 0 8px !important;
  color: #fff !important;
}
.ec-lb-hero-title b {
  background: linear-gradient(135deg, #F59E0B, #FAC775);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.ec-lb-hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 16px;
}
.ec-lb-hero-stats {
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.ec-lb-hero-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 16px;
  border-radius: 16px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}
.ec-lb-hero-stat b { color: #FAC775; font-weight: 700; }

/* === EXAM FILTER === */
.ec-lb-filter {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ec-lb-filter label {
  font-size: 13px;
  font-weight: 700;
  color: #0F4C81;
  margin: 0;
}
.ec-lb-filter select {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  min-width: 260px;
  cursor: pointer;
}
.ec-lb-filter-btn {
  background: #327b74;
  color: #fff;
  border: none;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.ec-lb-filter-btn:hover { background: #245c57; }
.ec-lb-filter-reset {
  font-size: 11px;
  color: #64748b;
  text-decoration: none;
}
.ec-lb-filter-reset:hover { color: #327b74; }

/* === SECTION TITLE === */
.ec-lb-section-title {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0F4C81 !important;
  margin: 0 0 4px !important;
  text-align: center;
}
.ec-lb-section-sub {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  margin: 0 0 20px;
}

/* === PODIUM === */
.ec-lb-podium-wrap {
  background: linear-gradient(135deg, #f0faf9 0%, #e1f5ee 100%);
  border-radius: 14px;
  padding: 28px 22px;
  margin-bottom: 22px;
}
.ec-lb-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
}
.ec-lb-place {
  background: #fff;
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  position: relative;
  transition: all 0.2s;
}
.ec-lb-place:hover { transform: translateY(-5px); }
.ec-lb-place.first {
  width: 175px;
  padding-bottom: 30px;
  border: 2px solid #F59E0B;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.22);
}
.ec-lb-place.second {
  width: 150px;
  border: 2px solid #cbd5e1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.ec-lb-place.third {
  width: 150px;
  border: 2px solid #d4a574;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}
.ec-lb-crown {
  position: absolute; top: -16px; left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
}
.ec-lb-medal { font-size: 30px; margin-bottom: 8px; }
.ec-lb-place.first .ec-lb-medal { font-size: 40px; }
.ec-lb-avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.ec-lb-place.first .ec-lb-avatar {
  width: 66px; height: 66px; font-size: 22px;
  background: linear-gradient(135deg, #F59E0B, #d97706);
}
.ec-lb-place.second .ec-lb-avatar { background: linear-gradient(135deg, #94a3b8, #64748b); }
.ec-lb-place.third .ec-lb-avatar { background: linear-gradient(135deg, #d4a574, #b8845a); }
.ec-lb-place-name {
  font-size: 13px; font-weight: 700; color: #0F4C81;
  margin-bottom: 3px;
}
.ec-lb-place-exam { font-size: 10px; color: #64748b; margin-bottom: 8px; }
.ec-lb-place-score-box { background: #f0faf9; border-radius: 8px; padding: 6px; }
.ec-lb-place-score { font-size: 16px; font-weight: 800; color: #0F6E56; }
.ec-lb-place-score small { font-size: 10px; color: #64748b; font-weight: 500; }
.ec-lb-place-rank {
  background: #0F4C81; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 3px 10px; border-radius: 10px;
  display: inline-block; margin-top: 8px;
}
.ec-lb-place.first .ec-lb-place-rank { background: linear-gradient(135deg, #F59E0B, #d97706); }

/* === RANKINGS TABLE === */
.ec-lb-table-wrap {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 22px;
  overflow-x: auto;
}
.ec-lb-table {
  width: 100%;
  border-collapse: collapse;
}
.ec-lb-table thead th {
  background: linear-gradient(135deg, #0F4C81, #327b74);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 11px 12px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.ec-lb-table thead th:first-child { border-radius: 8px 0 0 0; text-align: center; }
.ec-lb-table thead th:last-child { border-radius: 0 8px 0 0; }
.ec-lb-table tbody td {
  padding: 11px 12px;
  font-size: 12px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.ec-lb-table tbody tr:hover { background: #f0faf9; }
.ec-lb-table tbody tr:last-child td { border-bottom: none; }

.ec-lb-rank {
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  color: #64748b;
}
.ec-lb-rank.top1 { color: #F59E0B; }
.ec-lb-rank.top2 { color: #94a3b8; }
.ec-lb-rank.top3 { color: #d4a574; }
.ec-lb-rank .medal { font-size: 16px; }

.ec-lb-student {
  display: flex; align-items: center; gap: 9px;
}
.ec-lb-student-av {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #327b74, #0F4C81);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  flex-shrink: 0;
}
.ec-lb-student-name { font-weight: 700; color: #0F4C81; }
.ec-lb-student-city { font-size: 10px; color: #94a3b8; }

.ec-lb-exam-badge {
  background: #e1f5ee;
  color: #0F6E56;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  display: inline-block;
}
.ec-lb-score-val {
  font-weight: 800;
  color: #0F4C81;
  font-size: 14px;
}
.ec-lb-correct {
  color: #10b981;
  font-weight: 700;
}

/* === EMPTY STATE === */
.ec-lb-empty {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 44px 20px;
  text-align: center;
}
.ec-lb-empty-icon {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #e1f5ee, #f0faf9);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 28px;
}
.ec-lb-empty-title {
  font-size: 16px; font-weight: 700; color: #0F4C81;
  margin: 0 0 6px;
}
.ec-lb-empty-text {
  font-size: 12px; color: #64748b; margin: 0;
}

/* === CTA === */
.ec-lb-cta {
  background: linear-gradient(135deg, #fff8e6, #fef3c7);
  border-radius: 14px;
  padding: 28px 22px;
  text-align: center;
}
.ec-lb-cta-title {
  font-size: 20px; font-weight: 800; color: #92400e;
  margin: 0 0 6px;
}
.ec-lb-cta-sub {
  font-size: 12px; color: #b45309; margin: 0 0 16px;
}
.ec-lb-cta-btn {
  background: linear-gradient(135deg, #F59E0B, #d97706);
  color: #fff;
  padding: 11px 28px;
  border-radius: 8px;
  font-size: 12px; font-weight: 700;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}
.ec-lb-cta-btn:hover { color: #fff; transform: translateY(-2px); }

/* === MOBILE === */
@media (max-width: 767px) {
  .ec-lb-hero { padding: 24px 18px; }
  .ec-lb-hero-title { font-size: 22px !important; }
  .ec-lb-podium { flex-wrap: wrap; }
  .ec-lb-place.first, .ec-lb-place.second, .ec-lb-place.third {
    width: 100%; max-width: 240px;
  }
  .ec-lb-filter select { min-width: 100%; }
  .ec-lb-table thead th, .ec-lb-table tbody td { padding: 8px; font-size: 10px; }
  .ec-lb-student-city { display: none; }
}