/* Modal (fundo escuro) */
.modal {
  display: none; /* começa escondido */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.6);
  z-index: 1000;
}

/* Quando modal estiver ativo */
.modal.active {
  display: block;
}

/* Conteúdo branco centralizado */
.modal-content {
  background: #fff;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 0 10px rgba(0,0,0,0.25);
  overflow-y: auto; /* caso o conteúdo ultrapasse a altura */
  max-height: 80vh;
}

/* Botão fechar (X) no topo direito */
.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}
.close-modal:hover {
  color: red;
}

/* Estilo dos cards dos personagens */
.character-card {
  cursor: pointer;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s ease;
}

.character-card:hover {
  background-color: #f0f0f0;
}

.character-card img {
  width: 48px;
  height: 48px;
  border-radius: 4px;
}

/* === RESPONSIVO === */
@media (max-width: 600px) {
  .modal-content {
    width: 95%;      /* quase toda largura da tela */
    margin: 5% auto; /* menor margem vertical para aproveitar espaço */
    padding: 15px;
    max-width: none; /* remove limite fixo */
    max-height: 90vh; /* ocupa até 90% da altura da tela */
    border-radius: 0; /* cantos retos para parecer app mobile */
  }
  .character-card img {
    width: 36px;
    height: 36px;
  }
  .character-card {
    padding: 8px;
    font-size: 14px;
  }
  .close-modal {
    font-size: 24px;
    top: 5px;
    right: 10px;
  }
}
