/* OVERLAY */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

/* MODAL */


/* ===== MODO CLARO ===== */

body:not(.dark) .modal {
  background: rgba(230, 230, 230, 0.871);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.06);
}     

  body:not(.dark) .modal-overlay {
  background: rgba(15, 15, 15, 0.18);
  backdrop-filter: blur(8px);
}   

  body:not(.dark) .modal-links a {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

body:not(.dark) .modal-links a:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

/* ===== MODO DARK ===== */

.modal {
  background: #2a2a2a;
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 420px;

  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);

  animation: modalIn 0.3s ease;
  position: relative;
}

/* ANIMAÇÃO */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* BOTÃO FECHAR */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;

  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: none;
  border: none;
  color: var(--texto);
  font-size: 22px;
  cursor: pointer;
  transform: scale(1);
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  background: rgb(218, 218, 218);
  color: #2a2a2a;
  border-radius: 100%;
  transform: scale(1.05);
}

/* TÍTULO */
.modal h3 {
  margin-bottom: 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--texto);
}

/* LINKS INTERNOS */
.modal-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-links a {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: var(--texto);
  font-size: 14px;

  transition: background 0.3s ease, transform 0.3s ease;
}

.modal-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.modal-links img {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
