/* Ranking global */

.ranking-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.ranking-tab {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #1e2233;
  color: #9da3b4;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ranking-tab.ativa {
  background: #2f6fe0;
  color: #fff;
}

.ranking-tab:hover:not(.ativa) {
  background: #252a3d;
  color: #c9ccda;
}

.ranking-tabela {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ranking-linha {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #1e2233;
  border-radius: 8px;
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.ranking-linha:hover {
  border-color: #2f6fe044;
  background: #232840;
}

.ranking-top1 { border-color: #ffd36a66; }
.ranking-top2 { border-color: #adb5c088; }
.ranking-top3 { border-color: #cd7f3288; }

.ranking-pos {
  font-size: 20px;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.ranking-nick {
  flex: 1;
  font-weight: 600;
  font-size: 15px;
  color: #e8eaf2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-valor {
  font-size: 14px;
  font-weight: 700;
  color: #9dc2ff;
  flex-shrink: 0;
  white-space: nowrap;
}

.ranking-valor .loja-moeda-icone {
  font-size: 14px;
}

/* Avatar box (avatar + deco overlay) */
.ranking-avatar-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: visible;
}

.ranking-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.ranking-avatar-inicial {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1c2c4a;
  color: #9dc2ff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ranking-avatar-deco {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  object-fit: contain;
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* Modal de perfil                                                      */
/* ------------------------------------------------------------------ */

.rmodal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}

.rmodal-card {
  position: relative;
  background: #141c30;
  border: 1px solid #26314f;
  border-radius: 16px;
  padding: 28px 24px 24px;
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rmodal-fechar {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: #9da3b4;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.rmodal-fechar:hover {
  color: #e8eaf2;
  background: #1e2233;
}

.rmodal-cabecalho {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #26314f;
}

.rmodal-nick {
  font-size: 20px;
  font-weight: 700;
  color: #e8eaf2;
  text-align: center;
}

.rmodal-username {
  font-size: 13px;
  font-weight: 400;
  color: #7a85a8;
  text-align: center;
  display: block;
  margin-top: 2px;
}

.rmodal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#rmodal-conteudo {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rmodal-stats > span {
  background: #1e2233;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #9dc2ff;
  white-space: nowrap;
}

.rmodal-jogo {
  background: #1a2135;
  border-radius: 10px;
  padding: 12px 14px;
}

.rmodal-jogo h4 {
  font-size: 13px;
  font-weight: 700;
  color: #7a85a8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}

.rmodal-linha {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 4px 0;
  border-bottom: 1px solid #26314f44;
  gap: 8px;
}

.rmodal-linha:last-child {
  border-bottom: none;
}

.rmodal-linha span {
  color: #aeb2c7;
}

.rmodal-linha strong {
  color: #e8eaf2;
  font-weight: 600;
  text-align: right;
}

@media (max-width: 480px) {
  .ranking-tab {
    font-size: 12px;
    padding: 8px 10px;
  }
  .ranking-pos {
    font-size: 18px;
    min-width: 26px;
  }
  .ranking-nick {
    font-size: 13px;
  }
  .ranking-valor {
    font-size: 12px;
  }
  .rmodal-card {
    padding: 22px 16px 18px;
  }
}
