/* ==========================================================================
   NOVO SISTEMA VISUAL DE RANKINGS & LEADERBOARD (DIEGÉTICO / PÓDIO / CARDS)
   ========================================================================== */

.leaderboard-view-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* Pódio Top 3 */
.leaderboard-podium-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  padding: 24px 8px 20px;
  perspective: 1000px;
}

.podium-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 220px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.podium-column:hover {
  transform: translateY(-6px);
}

.podium-column.pos-1 {
  order: 2;
  z-index: 3;
}

.podium-column.pos-2 {
  order: 1;
  z-index: 2;
}

.podium-column.pos-3 {
  order: 3;
  z-index: 1;
}

/* Card do Topo do Pódio */
.podium-card {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px 16px 0 0;
  padding: 16px 12px 14px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
}

.podium-column.pos-1 .podium-card {
  border-color: rgba(255, 215, 0, 0.5);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}

.podium-column.pos-2 .podium-card {
  border-color: rgba(192, 192, 192, 0.4);
  background: linear-gradient(180deg, rgba(192, 192, 192, 0.08) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.podium-column.pos-3 .podium-card {
  border-color: rgba(205, 127, 50, 0.4);
  background: linear-gradient(180deg, rgba(205, 127, 50, 0.08) 0%, rgba(15, 23, 42, 0.9) 100%);
}

/* Selo de Coroa / Estrela no Top 1 */
.podium-crown-badge {
  position: absolute;
  top: -12px;
  right: -4px;
  background: #f59e0b;
  color: #1e1b4b;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 0 16px #f59e0b;
  z-index: 10;
  animation: pulseCrown 2s infinite ease-in-out;
}

@keyframes pulseCrown {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.1); filter: brightness(1.25); }
}

/* Avatar do Pódio */
.podium-avatar-wrapper {
  position: relative;
  margin-bottom: 10px;
}

.podium-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  background: #0f172a;
}

.podium-column.pos-1 .podium-avatar {
  width: 82px;
  height: 82px;
  border-color: #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.podium-column.pos-2 .podium-avatar {
  border-color: #e2e8f0;
  box-shadow: 0 0 15px rgba(226, 232, 240, 0.3);
}

.podium-column.pos-3 .podium-avatar {
  border-color: #cd7f32;
  box-shadow: 0 0 15px rgba(205, 127, 50, 0.3);
}

.podium-hero-chip {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #fff;
  object-fit: cover;
  background: #1e293b;
}

.podium-username {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  width: 100%;
  max-width: 204px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 0 4px;
  box-sizing: border-box;
}

.podium-username .account-level-badge {
  flex-shrink: 0;
}

.podium-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  display: inline-block;
}

.podium-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.podium-score {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.35rem;
  color: #ffd700;
  margin-top: 6px;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

.podium-column.pos-2 .podium-score {
  color: #e2e8f0;
  text-shadow: 0 0 10px rgba(226, 232, 240, 0.3);
}

.podium-column.pos-3 .podium-score {
  color: #f97316;
  text-shadow: 0 0 10px rgba(249, 115, 22, 0.3);
}

/* Bloco Base do Pódio */
.podium-pedestal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.6rem;
  color: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: inset 0 4px 10px rgba(255, 255, 255, 0.15), 0 8px 20px rgba(0, 0, 0, 0.4);
  position: relative;
}

.podium-column.pos-1 .podium-pedestal {
  height: 80px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  border: 1.5px solid #fbbf24;
}

.podium-column.pos-2 .podium-pedestal {
  height: 60px;
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  color: #e2e8f0;
  border: 1.5px solid #94a3b8;
}

.podium-column.pos-3 .podium-pedestal {
  height: 45px;
  background: linear-gradient(180deg, #b45309 0%, #78350f 100%);
  color: #fed7aa;
  border: 1.5px solid #ea580c;
}

/* Lista de Cards da Posição 4 em diante */
.leaderboard-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.leaderboard-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  transition: all 0.2s ease;
}

.leaderboard-row-card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.leaderboard-row-card.highlight-top10 {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(30, 41, 59, 0.6);
}

.leaderboard-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.leaderboard-pos-badge {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.05rem;
  color: #94a3b8;
  width: 34px;
  text-align: center;
  flex-shrink: 0;
}

.leaderboard-row-card.highlight-top10 .leaderboard-pos-badge {
  color: #38bdf8;
}

.leaderboard-avatar-box {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.leaderboard-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: #0f172a;
}

.leaderboard-hero-chip {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #fff;
  object-fit: cover;
  background: #1e293b;
}

.leaderboard-player-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.leaderboard-player-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-player-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f8fafc;
}

.leaderboard-player-subtext {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.leaderboard-card-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.leaderboard-score-val {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.2rem;
  color: #fbbf24;
  text-align: right;
}

.leaderboard-extra-meta {
  font-size: 0.8rem;
  color: #64748b;
  text-align: right;
  min-width: 80px;
}

/* Sub-Abas Estilizadas para Prime e Speedruns */
.subtab-navigation-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.subtab-category-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-family: var(--font-title);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subtab-category-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #f1f5f9;
}

.subtab-category-btn.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.subtab-category-btn.speedrun-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.subtab-category-btn.cap-btn.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: #c084fc;
  color: #e9d5ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.records-filter-btn {
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: 16px;
  white-space: nowrap;
}

.records-filter-btn.active {
  background: rgba(251, 191, 36, 0.22);
  border-color: #fbbf24;
  color: #fde047;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.4);
}

.subtab-description-card {
  background: rgba(30, 41, 59, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: #cbd5e1;
  margin-bottom: 16px;
}

/* Responsividade Mobile do Pódio */
@media (max-width: 640px) {
  .leaderboard-podium-wrapper {
    gap: 8px;
  }
  .podium-avatar {
    width: 52px;
    height: 52px;
  }
  .podium-column.pos-1 .podium-avatar {
    width: 64px;
    height: 64px;
  }
  .podium-score {
    font-size: 1.1rem;
  }
  .podium-username {
    font-size: 0.82rem;
    max-width: 100px;
  }
  .leaderboard-row-card {
    padding: 8px 12px;
  }
  .leaderboard-score-val {
    font-size: 1.05rem;
  }
}
