* { 
  box-sizing: border-box;
}

/*Scroll suave*/
html{
    scroll-behavior: smooth;
}


body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top, #1e3a8a, #020617);
  background-attachment: fixed;
  color: #fff;
  height: 100dvh;
}

/* HEADER */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  position: relative;
  flex-wrap: wrap;
  
}

.header h1 {
  flex: 1;
}
.header img {
  width: 90px;
  transform: scale(1.5);
  transition: .4s;
}

.header img:hover {
  transform: scale(1.8);
}



/* overlay escuro */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

/* menu lateral */
/* overlay escuro */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
}

/* menu lateral */
.menu-mobile {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 320px;
  height: 100%;
  background: #1e293b;
  padding: 20px;
  z-index: 999;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* menu aberto */
.menu-mobile.ativo {
  right: 0;
}

/* topo (usuário + fechar) */
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.menu-header button {
  background: #334155;
  border: none;
  font-size: 14px;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* usuário */
.menu-mobile p {
  font-size: 14px;
  color: #e2e8f0;
  margin-bottom: 10px;
  
}

/* separador */
.menu-divider {
  height: 1px;
  background: #334155;
  margin: 15px 0;
}

/* botões de navegação */
.menu-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-links button {
  background: #334155;
  border: none;
  padding: 12px;
  border-radius: 8px;
  color: white;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
}

.menu-links button:hover {
  background: #475569;
}

/* botão sair */
.btn-sair {
  margin-top: auto;
  background: #ef4444;
  border-radius: 8px;
  padding: 12px;
  color: white;
  border: none;
  cursor: pointer;
}


.usuario-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  overflow-wrap: break-word;
}

#usuarioNomeMenu {
  font-weight: bold;
  font-size: 15px;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#usuarioEmailMenu {
  font-size: 12px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}




/* TELAS */
.tela {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}



/* HERO */
.hero {
  text-align: center;
  margin-top: 10px;
}

.hero h1 {
  font-size: 26px;
}

.hero p {
  color: #94a3b8;
  font-size: 14px;
}

/* AÇÕES */
.acoes {
  display: grid;
  gap: 15px;
  margin-top: 30px;
  width: 100%;
  max-width: 400px;
}

.card-acao {
  background: #1e293b;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  animation: fadeUp 0.4s ease;
}

.card-info-home:hover, .card-acao:hover {
  transform: translateY(-5px);
  background: #22c55e;
}

.card-acao h3 {
  margin: 10px 0 5px;
}

.card-acao p {
  font-size: 13px;
  color: #cbd5f5;
}

.card-info-home {
  border: 1px solid #334155;
  background: #1e293b;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  color: #cbd5f5;
  padding: 10px;
}

.card-info-home h3 {
  color: #38bdf8; 
}

.card-info-home p {
  font-size: 13px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* INPUTS */
input, select, textarea {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  margin-top: 10px;
  border-radius: 10px;
  border: none;
  background: #1e293b;
  color: white;
}
textarea{
  height: 90px;
}

/* BOTÕES */
button {
  width: 100%;
  max-width: 400px;
  padding: 12px;
  margin-top: 10px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

.btn-main {
  background: linear-gradient(#22c55e, #16a34a);
}

.voltar {
  background: #22c55e;
  color: #fff;
  transition: .4s;
}

.voltar:hover{
  background-color: #334155;
}

/* FILTROS */
.filtros {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* CARDS */
#listaPets {
  display: grid;
  gap: 15px;
  margin-top: 20px;
  width: 100%;
  max-width: 1000px;
}

.pet {
  background: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.3s;
  max-width: 450px;
}

.pet:hover {
  transform: translateY(-5px);
}

.pet img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  cursor: pointer;
}

.pet-content {
  padding: 10px;
}

/*Botao falar no whats*/
.pet a {
  background: transparent;
  padding: 4px;
  border-radius: 6px;
  color: white;
  text-decoration: none;
  border: 2px solid #22c55e;
  transition: .50s;
}

.pet a:hover{
  background-color: #16a34a;
  box-shadow: 2px 2px 10px #22c55e;
}


/* MODAL */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.ativo {
  display: flex;
  opacity: 1;
}


.modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;

  transform: scale(0.8);
  transition: transform 0.3s ease;
}

/* ZOOM */
.modal.ativo img {
  transform: scale(1);
}

/* PAGINAÇÃO */
#paginacao {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

#paginacao button {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #334155;
  color: white;
}

.msg-sucesso {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #22c55e;
  padding: 12px 20px;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  z-index: 1000;
}

.stats {
  margin-top: 15px;
  font-size: 14px;
  color: #94a3b8;
}

#contadorObs {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 5px;
}

.resultado-busca {
  margin-top: 10px;
  font-size: 14px;
  color: #94a3b8;
}

/* Data */
.data-cadastro {
  color: #22c55e;
  font-size: 13px;
  text-align: end;
  margin: 0;
}

/* destaque recente */
.pet.recente {
  border: 2px solid #22c55e;
  box-shadow: 0 0 15px rgba(34,197,94,0.3);
}


.tipo {
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-block;
}

.tipo.perdido {
  background: #dc2626;
  color: white;
  border: 2px solid #dc2626;
  animation: pulse 2s infinite;
  margin: 0;
}

.tipo.avistado {
  background: #eab308;
  color: #020617;
  margin: 0;
  border: 2px solid #eab308;
}

/* ===================== */
/* LOGIN */
/* ===================== */

#login {
  justify-content: center;
  min-height: 80vh;
}

#login h2 {
  margin-bottom: 20px;
}

#login h3 {
  margin: 20px 0 10px;
  color: #94a3b8;
  font-weight: normal;
}

#login input {
  max-width: 300px;
  background: #1e293b;
  transition: 0.3s;
}

#login input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #22c55e;
}

#login .btn-login {
  max-width: 300px;
  background: linear-gradient(#22c55e, #16a34a);
  color: white;
  font-weight: bold;
  transition: 0.3s;
}

#login .btn-cadastro {
  width: 100px;
  background-color: transparent;
  color: white;
  font-weight: bold;
  transition: 0.3s;
  padding: 0;
  margin: 0;
}


#login .btn-login:hover{
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

#login .btn-cadastro:hover{
  transform: translateY(-2px);
}




#cadastroUsuario .btn-cadastrar{
  max-width: 300px;
  background: linear-gradient(#22c55e, #16a34a);
  color: white;
  font-weight: bold;
  transition: 0.3s;
}

#cadastroUsuario .btn-cadastrar:hover{
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(34, 197, 94, 0.3);
}

/*Botao google*/
.btn-google {
  max-width: 300px;
  padding: 12px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #1f2937;
}

.btn-google img {
  width: 18px;
  height: 18px;
}

.btn-google:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.1);
}

.divider-google{
  text-align: center;
  margin: 15px 0;
  color: #94a3b8;
  font-size: 14px;
}

.criar-conta{
  margin-top: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.criar-conta p{
  margin: 10px;
}

.link-recuperar{
  color: white;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  font-size: 14px;
}

.link-recuperar:hover{
  transform: translateY(-2px);
  text-decoration:underline;
  text-underline-offset: 5px;
  
}



.area-usuario {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
}

.area-usuario span {
  font-size: 12px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.area-usuario button {
  padding: 6px 10px;
  font-size: 12px;
  background: #dc2626;
  border-radius: 6px;
}

.area-usuario button:hover {
  background: #b91c1c;
}

.escondido {
  display: none;
}

.area-usuario span {
  font-size: 12px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.area-usuario button {
  padding: 6px 10px;
  font-size: 12px;
  background: #dc2626;
  border-radius: 6px;
}

.area-usuario button:hover {
  background: #b91c1c;
}

.escondido {
  display: none;
}



.toast {
  position: fixed;
  bottom: 90%;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

/* aparecer */
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
}

/* variações */
.toast.sucesso {
  background: #22c55e;
}

.toast.erro {
  background: #dc2626;
}

.toast.aviso {
  background: #eab308;
  color: #020617;
}

/*Input de salvar foto*/
#foto{
  cursor: pointer;
}

/*Modal tela de confirmar remoção de anuncio*/
/* modal escondido por padrão */
.modal-confirmar {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; /* 👈 mantém */
  justify-content: center;
  align-items: center;
  z-index: 9999;

  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-confirmar.ativo {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
}

.box-confirmar {
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 300px;
  text-align: center;
}

.box-confirmar select {
  width: 100%;
  margin-top: 10px;
}

.botoes {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

.botoes button {
  flex: 1;
}


.card-orientacao {
  max-width: 420px;
  margin: 80px auto;
  background: #1e293b;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.card-orientacao h2 {
  text-align: center;
  margin-bottom: 10px;
}

.concluido {
  text-align: center;
  margin-bottom: 10px;
  color: #22c55e;
}

.divider {
  height: 1px;
  background: #334155;
  margin: 20px 0;
}

.card-orientacao h3 {
  margin-bottom: 10px;
}

.card-orientacao ul {
  padding-left: 18px;
  margin-bottom: 10px;
}

.card-orientacao li {
  margin-bottom: 8px;
  font-size: 14px;
}

.info {
  font-size: 14px;
  color: #e2e8f0;
  margin-bottom: 20px;
}

.btn-continuar {
  width: 100%;
  padding: 12px;
  background: #22c55e;
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
}


/* Estilo info especie */
.badge-especie {
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #334155;
  width: 115px;
}

/* Limpar filtros */
.btn-limpar {
  background: #334155;
  border: none;
  padding: 10px;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  margin-top: 10px;
}

.btn-limpar:hover {
  background: #475569;
}


/* Botao encontrado */
.btn-encontrado {
  width: 100%;
  margin-top: 20px;
  padding: 12px;
  background: transparent;
  border: solid 2px #22c55e;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-encontrado:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(34,197,94,0.4);
}

/*Imagem tela meus anuncios*/
.img-thumb {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}


.container-tela-anuncio{
  border-radius: 10px;
  border: solid 2px #22c55e;
  background-color: #1e293b;
  padding: 10px 10px;
}



/* INPUT e TEXTAREA */
input.input-erro,
textarea.input-erro {
  border: 2px solid #ef4444 !important;
  background: rgba(239, 68, 68, 0.05);
}


input.input-erro::placeholder{
  color: #ce4c4c;
}



@keyframes pulse {
  0% { box-shadow: 0 0 0px #dc2626; }
  50% { box-shadow: 0 0 15px #dc2626; }
  100% { box-shadow: 0 0 0px #dc2626; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* RESPONSIVO */
@media (min-width: 600px) {
  #listaPets { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));}
}

@media (max-width: 400px) {
  .area-usuario {
    width: 100%;
  }
  .area-usuario button {
    width: 100px;
  }

}

/* ===================== */
/* MOBILE */
/* ===================== */
@media (max-width: 600px) {

  /* esconde área do usuário no header */
  .area-usuario {
    display: none !important;
  }

  /* botão ☰ começa escondido (JS controla quando aparece) */
  .btn-menu {
    display: none;
  }

  /* corrige layout do header */
  .header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* ajusta tamanho do título */
  .header h1 {
    font-size: 20px;
  }

}
