/* Ranking — UX alinhada ao OTP highscores */
#highscores {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.45;
}
#highscores *, #highscores *::before, #highscores *::after { box-sizing: border-box; }
#highscores label {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  font-weight: inherit;
}
#highscores i { float: none !important; }

#highscores .ca-hero {
  padding: 18px 20px;
  border-radius: 12px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e6f2;
  margin-bottom: 14px;
}
#highscores .ca-hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #243478;
}
#highscores .ca-hero p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #666;
}

#highscores .ca-card {
  padding: 4px 18px 18px;
  background: #fff;
  border: 1px solid #e2e6f2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(36, 52, 120, 0.07);
  margin-bottom: 14px;
}
#highscores .ca-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e9edf7;
  font-size: 15px;
  font-weight: 700;
  color: #243478;
  flex-wrap: wrap;
}
#highscores .ca-legend > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#highscores .ca-legend > i,
#highscores .ca-legend span > i { color: #4a5da8; }
#highscores .ca-legend-hint {
  font-size: 12px;
  font-weight: 600;
  color: #9099b5;
}

#highscores .ca-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
#highscores .ca-field { margin-bottom: 4px; }
#highscores .ca-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #243478;
}
#highscores .ca-label i { color: #4a5da8; }

#highscores .ca-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#highscores .ca-pick {
  flex: 1 1 calc(25% - 6px);
  min-width: 100px;
  text-decoration: none !important;
  color: inherit !important;
}
#highscores .ca-pick-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 12px;
  background: #f7f8fd;
  border: 2px solid #dfe3f2;
  border-radius: 10px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
#highscores .ca-pick:hover .ca-pick-box {
  border-color: #b9c2e5;
  background: #eef1fb;
}
#highscores .ca-pick.is-on .ca-pick-box {
  border-color: #243478;
  background: #eef1fb;
  box-shadow: 0 1px 5px rgba(36, 52, 120, 0.18);
}
#highscores .ca-pick-name {
  font-size: 13px;
  font-weight: 700;
  color: #243478;
}
#highscores .ca-pick-box > i { color: #4a5da8; }
#highscores .ca-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.08);
}

#highscores .hs-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#highscores .hs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e9e2d0;
  border-radius: 10px;
  padding: 8px 12px;
}
#highscores .hs-row:hover { border-color: #d0d7ec; }
#highscores .hs-row--1 {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.14), #fff 55%);
  border-color: #e6d28a;
}
#highscores .hs-row--2 {
  background: linear-gradient(90deg, rgba(192, 192, 192, 0.18), #fff 55%);
  border-color: #d0d0d0;
}
#highscores .hs-row--3 {
  background: linear-gradient(90deg, rgba(205, 127, 50, 0.14), #fff 55%);
  border-color: #d9b48a;
}

#highscores .hs-medal,
#highscores .hs-rank {
  flex: none;
  width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  color: #6b7289;
}
#highscores .hs-medal { font-size: 18px; line-height: 1; }
#highscores .hs-medal--1 { color: #d4a017; }
#highscores .hs-medal--2 { color: #8e98a8; }
#highscores .hs-medal--3 { color: #b87333; }

#highscores .hs-outfit {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  background: transparent;
}

#highscores .hs-pinfo { flex: 1; min-width: 0; }
#highscores .hs-name {
  font-size: 14px;
  font-weight: 800;
  color: #16204e !important;
  text-decoration: none !important;
}
#highscores .hs-name:hover { text-decoration: underline !important; }
#highscores .hs-meta {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #6b6480;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
#highscores .hs-meta i { font-size: 9px; }

#highscores .hs-val {
  flex: none;
  font-weight: 800;
  color: #243478;
  font-size: 14px;
  background: #eef1fb;
  border: 1px solid #d8def3;
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}

#highscores .hs-empty {
  padding: 24px 16px;
  text-align: center;
  color: #666;
  font-weight: 600;
}

@media (max-width: 640px) {
  #highscores .ca-pick { flex: 1 1 calc(50% - 4px); min-width: 0; }
  #highscores .hs-row { flex-wrap: wrap; }
  #highscores .hs-val { margin-left: auto; }
}
