* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, input, a, textarea {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
  user-select: none;
}

button {
  touch-action: manipulation;
}

body {
  font-family: Arial, sans-serif;
  background-image: url('../imagens/fundo2.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100dvh;
  padding: 20px;
}

/* ==== Menu ==== */
.container-menu {
  position: absolute;
  top: 45px;
  right: 40px;
}

.estiloBotao {
  background: none;
  border: none;
  cursor: pointer;
}

.menu-Opcoes {
  list-style: none;
  background: linear-gradient(45deg, #FFB6C1, #FFC0CB);
  right: 0;
  margin: 0;
  border-radius: 12px;
  position: absolute;
  padding: 8px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  transform: translateY(-40px);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-Opcoes.ativo {
  opacity: 1;
  transform: translateY(10px);
  pointer-events: all;
}

.menu-Opcoes li {
  padding: 8px 15px;
}

.menu-Opcoes li button {
  background: none;
  border: none;
  text-align: center;
  color: black;
  font-weight: bold;
  transition: color 0.3s;
}

.menu-Opcoes li button:hover {
  color: white;
}

/* ===== Container ===== */
.container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 95dvh;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 15px;
  display: flex;
  flex-direction: column;
}

.estiloLogo {
  position: absolute;
  top: -55px;      /* sobe a logo um pouco pra fora da caixa */
  left: -30px;      /* encosta um pouco na lateral esquerda */
  width: 220px;
  height: 220px;
  z-index: 2;
}

/* ===== Top e Bottom Bar ===== */
.top-bar,
.bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.top-bar button,
.bottom-bar button {
  padding: 8px 12px;
  border: none;
  background: linear-gradient(45deg, #8B4513,#D2691E);
  color: white;
  font-size: 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.top-bar button:hover,
.bottom-bar button:hover {
  background: linear-gradient(45deg, #8B4513,#D2691E);
}

/* Indicador de posição */
#indicador {
  font-weight: bold;
  font-size: 14px;
}

/* ===== Galeria ===== */
.galeria {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  overflow-y: auto;
  padding: 10px;
}

.item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.item img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid #ccc;
}

.item p {
  margin-bottom: 8px;
  font-size: 24px;
  text-align: center;
}

.item button {
  padding: 6px 10px;
  font-size: 13px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background-color: #dc3545;
  color: white;
  transition: background-color 0.2s ease;
}

.item button:hover {
  background-color: #a71d2a;
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-conteudo {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 90%;
  width: 320px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Botão fechar modal */
.fechar-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

/* Inputs do modal */
.modal-conteudo input[type="text"],
.modal-conteudo input[type="password"],
.modal-conteudo input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* Botões do modal */
.modal-conteudo button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

#salvarItem {
  background-color: #28a745;
  color: white;
}

#salvarItem:hover {
  background-color: #1e7e34;
}

#cancelarAdicionar,
#cancelarExcluir {
  background-color: #6c757d;
  color: white;
}

#cancelarAdicionar:hover,
#cancelarExcluir:hover {
  background-color: #495057;
}

#confirmarExcluir {
  background-color: #dc3545;
  color: white;
}

#confirmarExcluir:hover {
  background-color: #a71d2a;
}

/* ===== Responsividade ===== */
@media (max-width: 768px) {
  .top-bar button,
  .bottom-bar button {
    font-size: 17px;
    padding: 6px 10px;
  }

  .modal-conteudo {
    width: 90%;
  }

  .item img {
    height: 400px;
    max-height: 600px;
  }
  
  .menu-Opcoes li button:active {
    color: white;
  }
  
  .top-bar button:active,
  .bottom-bar button:active {
    background-color: #0056b3;
  }
  
  .item button:active {
    background-color: #a71d2a;
  }
  
  #salvarItem:active {
    background-color: #1e7e34;
  }
  
  #cancelarAdicionar:active,
  #cancelarExcluir:active {
    background-color: #495057;
  }

  #confirmarExcluir:active {
    background-color: #a71d2a;
  }
}

@media (max-width: 480px) {
  .top-bar,
  .bottom-bar {
    flex-direction: column;
    gap: 10px;
  }

  .item img {
    height: 300px;
    max-height: 500px;
  }
  
  .menu-Opcoes li button:active {
    color: white;
  }
  
  .top-bar button:active,
  .bottom-bar button:active {
    background-color: #0056b3;
  }
  
  .item button:active {
    background-color: #a71d2a;
  }
  
  #salvarItem:active {
    background-color: #1e7e34;
  }
  
  #cancelarAdicionar:active,
  #cancelarExcluir:active {
    background-color: #495057;
  }
  
  #confirmarExcluir:active {
   background-color: #a71d2a;
  }
}
