/* ===== BASE ===== */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}
@media (min-width: 768px) {
  html { font-size: 16px; }
}
body {
  margin-bottom: 60px;
  background-color: #f5f6f8;
  color: #212529;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== NAVBAR ===== */
.bg-navbar {
  background-color: #1b1f23;
}

/* ===== GOLD ACCENT ===== */
.text-gold { color: #b8860b !important; }
.bg-gold { background-color: #d4a843 !important; color: #fff !important; font-weight: 600; }

.btn-gold {
  background-color: #d4a843;
  color: #fff;
  border: none;
  font-weight: 600;
  transition: all 0.2s ease;
}
.btn-gold:hover {
  background-color: #c49a38;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,168,67,0.35);
}
.btn-outline-gold {
  color: #b8860b;
  border-color: #d4a843;
  transition: all 0.2s ease;
}
.btn-outline-gold:hover {
  background-color: #d4a843;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,168,67,0.25);
}

/* ===== SECTION CARDS ===== */
.section-card {
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}
.section-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}
.section-title {
  color: #212529;
  font-size: 1.3rem;
  font-weight: 700;
}
.section-title-sm {
  color: #212529;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ===== STAT CARDS (HERO) ===== */
.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #faf8f4 100%);
  border: 1px solid #e8e0d0;
  border-radius: 10px;
  padding: 1.25rem 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.72rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
  font-weight: 500;
}

/* ===== FIGHTER AVATARS ===== */
.fighter-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dee2e6;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.ranking-row:hover .fighter-avatar {
  border-color: #d4a843;
}
.fighter-avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5edd8, #f0e6d0);
  border: 2px solid #e0d5c0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #b8860b;
  flex-shrink: 0;
}
.fighter-avatar-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #d4a843;
  box-shadow: 0 4px 12px rgba(212,168,67,0.2);
}
.fighter-avatar-placeholder-lg {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5edd8, #f0e6d0);
  border: 3px solid #d4a843;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2.5rem;
  color: #b8860b;
  box-shadow: 0 4px 12px rgba(212,168,67,0.2);
}

/* ===== RANKINGS TABLE ===== */
.ranking-row {
  transition: background-color 0.15s ease;
}
.ranking-row:hover {
  background-color: #faf8f4 !important;
}
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  background-color: #e9ecef;
  color: #6c757d;
  transition: transform 0.2s ease;
}
.ranking-row:hover .rank-badge {
  transform: scale(1.1);
}
.rank-top3 {
  background: linear-gradient(135deg, #d4a843, #c49a38);
  color: #fff;
  box-shadow: 0 2px 6px rgba(212,168,67,0.3);
}
.score-pill {
  display: inline-block;
  padding: 3px 12px;
  background: linear-gradient(135deg, #f5edd8, #f0e6d0);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #b8860b;
  border: 1px solid #e8dcc0;
}

/* ===== FIGHT RESULT CARDS ===== */
.fight-card {
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}
.fight-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #d0d0d0;
}
.fight-card-title {
  border-left: 3px solid #d4a843;
}
.fight-card-date {
  font-size: 0.7rem;
  color: #adb5bd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 500;
}
.fight-card-body {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.fight-card-fighter {
  flex: 1;
  font-size: 0.88rem;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fight-card-winner {
  color: #212529;
  font-weight: 600;
}
.fight-card-w {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #28a745;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}
.fight-card-vs {
  color: #ced4da;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.fight-card-footer {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== METHODOLOGY ===== */
.methodology-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.method-item {
  background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.method-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.method-pct {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
}
.method-label {
  font-size: 0.72rem;
  color: #6c757d;
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ===== CHART LEGENDS ===== */
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #6c757d;
  font-weight: 500;
}
.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ===== DIVISION CHIPS (Horizontal scroll) ===== */
.division-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: #ced4da transparent;
}
.division-scroll::-webkit-scrollbar {
  height: 6px;
}
.division-scroll::-webkit-scrollbar-thumb {
  background: #ced4da;
  border-radius: 3px;
}
.division-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 115px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #ffffff 0%, #faf8f4 100%);
  border: 1px solid #e0d8cc;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.division-chip:hover {
  border-color: #d4a843;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(212,168,67,0.15);
  background: linear-gradient(135deg, #faf8f4 0%, #f5edd8 100%);
}
.division-chip-name {
  color: #212529;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.division-chip-info {
  color: #6c757d;
  font-size: 0.7rem;
  margin-top: 3px;
  font-weight: 500;
}
.division-chip-count {
  color: #b8860b;
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: 6px;
}

/* ===== WEIGHT CLASS / FIGHTER CARDS ===== */
.fighter-card {
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.fighter-card:hover {
  border-color: #d4a843 !important;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ===== FOCUS OVERRIDE ===== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #d4a843, 0 0 0 0.25rem rgba(212,168,67,0.25);
}

/* ===== PROGRESS BARS (Rankings) ===== */
.table .progress {
  height: 6px;
}

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1050;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 350px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  color: #212529;
  transition: background-color 0.15s;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background-color: #f8f9fa;
}

/* ===== CARD OVERRIDES FOR LIGHT THEME ===== */
.card {
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border-radius: 10px;
}

/* ===== TABLE OVERRIDES ===== */
.table {
  --bs-table-bg: #ffffff;
  --bs-table-hover-bg: #faf8f4;
  --bs-table-striped-bg: #f8f9fa;
}
.table thead th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  color: #495057;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.table td {
  border-color: #f0f0f0;
  vertical-align: middle;
}

/* ===== FOOTER ===== */
footer {
  background-color: #ffffff;
  border-top-color: #dee2e6 !important;
}

/* ===== GENDER TABS ===== */
#genderTabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  padding: 12px 20px;
}
#genderTabs .nav-link:hover {
  color: #b8860b !important;
}
