/* MONSTERIDLE — Modal de Seleção de Foto de Perfil (Avatar) */

.avatar-modal-box {
  background: var(--vidro-forte, rgba(9, 22, 34, 0.95));
  backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid rgba(79, 216, 232, 0.4);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8), 0 0 35px rgba(34, 211, 238, 0.15);
  width: min(680px, 95vw);
  max-height: min(85vh, 660px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: avatarModalEntrada 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--txt, #f1f5f9);
}

@keyframes avatarModalEntrada {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.avatar-modal-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(12, 28, 40, 0.85);
  border-bottom: 1px solid rgba(79, 216, 232, 0.25);
  flex-shrink: 0;
}

.avatar-modal-tit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--acc2, #22d3ee);
  text-transform: uppercase;
}

.avatar-modal-tit i {
  font-style: normal;
  font-size: 16px;
}

/* Área de prévia com réplica do anel do HUD */
.avatar-modal-preview {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(16, 44, 62, 0.65), rgba(7, 19, 29, 0.85));
  border-bottom: 1px solid rgba(79, 216, 232, 0.2);
  flex-shrink: 0;
}

.avatar-preview-wrap {
  position: relative;
  width: 86px;
  height: 86px;
  flex-shrink: 0;
}

.avatar-preview-wrap .avatar {
  width: 86px;
  height: 86px;
  margin: 0;
  cursor: default;
}

.avatar-preview-wrap .avatar .anel {
  width: 86px;
  height: 86px;
  border-radius: 99px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1e5a8a, #0a2140);
  border: 3px solid #22d3ee;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-preview-wrap .avatar .anel img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  image-rendering: pixelated;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.avatar-preview-wrap .avatar .vip {
  position: absolute;
  left: 50%;
  top: -8px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 99px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
  white-space: nowrap;
}

.avatar-preview-wrap .avatar .vip.oculto {
  display: none !important;
}

.avatar-preview-wrap .avatar .bola {
  position: absolute;
  right: -3px;
  bottom: -2px;
  width: 32px;
  height: 32px;
  border-radius: 99px;
  background: #fff;
  border: 2px solid #061a30;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.avatar-preview-wrap .avatar .bola::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50%;
  background: #e5484d;
}

.avatar-preview-wrap .avatar .bola::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #fff;
  border: 2px solid #061a30;
  transform: translate(-50%, -50%);
}

.avatar-preview-wrap .avatar .bola i {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: #061a30;
  transform: translateY(-50%);
}

.avatar-preview-detalhes {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.avatar-preview-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--acc2, #22d3ee);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.avatar-preview-nome {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar-preview-desc {
  font-size: 11.5px;
  color: var(--txt2, #94a3b8);
  line-height: 1.4;
}

/* Barra de abas e filtros */
.avatar-modal-filtros {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(10, 24, 35, 0.85);
  border-bottom: 1px solid rgba(79, 216, 232, 0.2);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.avatar-modal-abas {
  display: flex;
  gap: 6px;
}

.avatar-tab-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid var(--linha, rgba(79, 216, 232, 0.25));
  background: rgba(16, 36, 49, 0.7);
  color: var(--txt2, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.avatar-tab-btn:hover {
  border-color: var(--acc2, #22d3ee);
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.avatar-tab-btn.on {
  background: var(--acc2, #22d3ee);
  color: #04222b;
  border-color: var(--acc2, #22d3ee);
  font-weight: 800;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
}

.avatar-modal-controles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-busca-wrap {
  position: relative;
  width: 170px;
}

.avatar-busca-input {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(7, 19, 25, 0.85);
  border: 1px solid var(--linha, rgba(79, 216, 232, 0.3));
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.avatar-busca-input:focus {
  border-color: var(--acc2, #22d3ee);
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.3);
}

.avatar-btn-shiny {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.avatar-btn-shiny:hover {
  background: rgba(251, 191, 36, 0.18);
  border-color: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.avatar-btn-shiny.on {
  background: #fbbf24;
  color: #1e1b4b;
  border-color: #fbbf24;
  font-weight: 800;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.5);
}

/* Grade de Avatares */
.avatar-grade-wrap {
  flex: 1;
  min-height: 220px;
  max-height: 380px;
  overflow-y: auto;
  padding: 14px 18px;
  background: rgba(8, 20, 29, 0.55);
}

.avatar-grade-wrap::-webkit-scrollbar {
  width: 6px;
}

.avatar-grade-wrap::-webkit-scrollbar-thumb {
  background: #1f4356;
  border-radius: 99px;
}

.avatar-grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
}

.avatar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(16, 36, 49, 0.65);
  border: 1px solid rgba(79, 216, 232, 0.2);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-align: center;
}

.avatar-card:hover {
  transform: translateY(-2px);
  border-color: var(--acc2, #22d3ee);
  background: rgba(34, 211, 238, 0.12);
}

.avatar-card.on {
  border-color: var(--acc2, #22d3ee);
  background: rgba(34, 211, 238, 0.2);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.45);
}

.avatar-card-ico {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(7, 19, 25, 0.7);
  border-radius: 10px;
  border: 1px solid rgba(79, 216, 232, 0.2);
  position: relative;
  overflow: hidden;
}

.avatar-card.on .avatar-card-ico {
  border-color: var(--acc2, #22d3ee);
  background: radial-gradient(circle, rgba(34, 211, 238, 0.2), rgba(7, 19, 25, 0.8));
}

.avatar-card-ico img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.avatar-card-nome {
  font-size: 11px;
  font-weight: 700;
  color: var(--txt, #f1f5f9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.avatar-card.on .avatar-card-nome {
  color: #fff;
  font-weight: 800;
}

.avatar-card-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 99px;
  line-height: 1;
}

.avatar-card-badge.shiny {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1e1b4b;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.4);
}

.avatar-card-badge.atual {
  background: #10b981;
  color: #fff;
}

/* Estado vazio */
.avatar-vazio {
  padding: 36px 20px;
  text-align: center;
  color: var(--txt2, #94a3b8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.avatar-vazio i {
  font-style: normal;
  font-size: 28px;
  margin-bottom: 4px;
}

.avatar-vazio b {
  font-size: 14px;
  color: #fff;
}

.avatar-vazio p {
  font-size: 12px;
  max-width: 380px;
  line-height: 1.5;
  margin: 0;
}

/* Rodapé de Ações */
.avatar-modal-rodape {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(12, 28, 40, 0.85);
  border-top: 1px solid rgba(79, 216, 232, 0.25);
  flex-shrink: 0;
}

.avatar-btn-cancelar {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--linha, rgba(79, 216, 232, 0.3));
  background: rgba(16, 36, 49, 0.8);
  color: var(--txt2, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

.avatar-btn-cancelar:hover {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fca5a5;
}

.avatar-btn-salvar {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 800;
  border: none;
  background: var(--acc2, #22d3ee);
  color: #04222b;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.35);
}

.avatar-btn-salvar:hover {
  background: #6fe6f4;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(34, 211, 238, 0.5);
}

/* Botão de edição sutil no hover do HUD e no Perfil */
.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: rgba(4, 34, 43, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #22d3ee;
  font-size: 16px;
  pointer-events: none;
}

.avatar:hover .avatar-edit-overlay {
  opacity: 1;
}

.pf-btn-trocar-foto {
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--acc2, #22d3ee);
  background: rgba(34, 211, 238, 0.12);
  color: var(--acc2, #22d3ee);
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 8px;
  vertical-align: middle;
}

.pf-btn-trocar-foto:hover {
  background: var(--acc2, #22d3ee);
  color: #04222b;
}

.pf-retrato {
  position: relative;
}

.pf-retrato-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 12px;
  background: #0e2a38;
  border: 1px solid #22d3ee;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}


/* ---- Retratos ilustrados (assets/avatares) ----
   São pinturas redondas de 160px, não sprites: preenchem o anel inteiro e são
   reduzidas com suavização (pixelated deixaria o rosto serrilhado). Vale em
   qualquer lugar onde a foto de perfil aparece — HUD, perfil, prévia e grade. */
img[src*="assets/avatares/"]{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50%;
  image-rendering: auto !important;
}
.avatar-card-retrato .avatar-card-ico{
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 2px;
  border: 2px solid rgba(79, 216, 232, 0.45);
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.18);
}
.avatar-card-retrato.on .avatar-card-ico{
  border-color: var(--acc2, #22d3ee);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.6);
}
