/* ===== RESET E CONFIGURAÇÕES GLOBAIS ===== */
*,
*:before,
*:after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  background: linear-gradient(135deg, rgb(90, 52, 9) 0%, rgb(66, 3, 61) 100%);
  color: white;
  font-size: 16px;
  display: flex;
  flex-direction: column;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
main {
  color: white;
  text-align: center;
  flex: 1;
  position: relative;
  margin: 10px;
}

/* ===== SEÇÕES PRINCIPAIS ===== */
.bloco-secao {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: appear 5s linear;
  animation-timeline: view();
  animation-range: entry 0% cover 40%;
}

.secao-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 100%;
  height: 80%;
  background: rgba(26, 26, 26, 1);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.membros-table-container {
  overflow-x: auto;
}

/* ===== CABEÇALHO DA SEÇÃO ===== */
.contato-container {
  text-align: center;
  margin-bottom: 20px;
}

.contato-container h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: white;
  text-shadow: none;
  animation: fade-up 1s ease;
}

.contato-container p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #e0e0e0;
  text-shadow: none;
  max-width: 500px;
  margin: 0 auto 30px auto;
  animation: fade-up 1s ease 0.3s both;
}

/* ===== FORMULÁRIO DE CADASTRO ===== */
.formulario-contato {
  max-width: 600px;
  margin: 0 auto;
  animation: fade-up 1s ease 0.6s both;
}

.form-grupo {
  margin-bottom: 20px;
}

.form-grupo input,
.form-grupo textarea {
  width: 100%;
  padding: 15px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-grupo input::placeholder,
.form-grupo textarea::placeholder {
  color: #aaa;
}

.form-grupo input:focus,
.form-grupo textarea:focus {
  outline: none;
  border-color: purple;
  box-shadow: 0 0 0 2px rgba(128, 0, 128, 0.2);
}

.btn-enviar {
  background: purple;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.btn-enviar:hover {
  background: darkmagenta;
}

/* ===== SEÇÃO DE LISTAGEM ===== */
h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 40px 0 30px 0;
  color: white;
  text-align: center;
  text-shadow: none;
  animation: fade-up 1s ease;
}

/* ===== TABELA DE MEMBROS ===== */
table {
  width: 90%;
  max-width: 1000px;
  margin: 30px auto;
  border-collapse: collapse;
  background: rgba(26, 26, 26, 0.8);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: appear 1s ease 0.3s both;
}

th,
td {
  padding: 16px 20px;
  text-align: left;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
  background: rgba(26, 26, 26, 0.8);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

tr:nth-child(even) {
  background: rgba(66, 3, 61, 0.2);
}

tr:hover {
  background: rgba(90, 52, 9, 0.2);
  transition: background 0.3s ease;
}

/* ===== SEÇÃO DE BUSCA ===== */
section {
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  padding: 40px 20px;
  background: rgba(26, 26, 26, 1);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: appear 1s ease 0.6s both;
}

section h2 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: white;
  text-align: center;
  text-shadow: none;
  animation: fade-up 1s ease;
}

/* ===== FORMULÁRIO DE BUSCA ===== */
#buscar-membro-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
}

#buscar-membro-form label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e0e0e0;
  margin-right: 10px;
}

#buscar-membro-form input[type="text"] {
  padding: 15px;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: white;
  font-size: 1rem;
  min-width: 250px;
  transition: border-color 0.3s ease;
}

#buscar-membro-form input[type="text"]:focus {
  outline: none;
  border-color: purple;
  box-shadow: 0 0 0 2px rgba(128, 0, 128, 0.2);
}

#buscar-membro-form input[type="text"]::placeholder {
  color: #aaa;
}

#buscar-membro-form button {
  background: purple;
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#buscar-membro-form button:hover {
  background: darkmagenta;
}

/* ===== RESULTADO DA BUSCA ===== */
#resultado-busca {
  margin-top: 20px;
  padding: 20px;
  background: rgba(26, 26, 26, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
  animation: fade-up 1s ease;
}

/* ===== NOVAS CLASSES E AJUSTES ===== */
.membros-form-container {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  background: rgba(26, 26, 26, 0.95);
  border-radius: 25px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 420px;
  justify-content: center;
}

.membros-form-header {
  margin-bottom: 32px;
}

.membros-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.membros-table {
  width: 90%;
  max-width: 1000px;
  margin: 30px auto 0 auto;
  border-collapse: collapse;
  background: rgba(26, 26, 26, 0.8);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  animation: appear 1s ease 0.3s both;
}

.membros-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 24px auto 40px auto;
  width: 100%;
  max-width: 600px;
}

.btn-membro {
  min-width: 160px;
  max-width: 220px;
  width: 100%;
  padding: 14px 0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-cadastrar,
.btn-buscar {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
}

.btn-cadastrar:hover,
.btn-buscar:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.btn-editar {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
}

.btn-editar:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.btn-excluir {
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
}

.btn-excluir:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
}

.btn-relatorio {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
}

.btn-relatorio:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.membros-search {
  width: 100%;
  max-width: 800px;
  margin: 40px auto;
  padding: 40px 20px;
  background: rgba(26, 26, 26, 1);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: appear 1s ease 0.6s both;
}

.membros-search h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 30px;
  color: white;
  text-align: center;
  animation: fade-up 1s ease;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1024px) {
  .contato-container h2,
  h2 {
    font-size: 2.4rem;
  }

  .secao-container {
    width: 95%;
  }
}

@media (max-width: 768px) {
  .bloco-secao,
  section {
    border-radius: 20px;
    margin: 20px 10px;
    padding: 30px 15px;
  }

  .secao-container {
    flex-direction: column !important;
    padding: 30px 20px;
    height: auto;
    min-height: 80vh;
  }

  .contato-container h2,
  h2 {
    font-size: 2rem;
  }

  .contato-container p {
    font-size: 1rem;
  }

  th,
  td {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  #buscar-membro-form {
    flex-direction: column;
    align-items: stretch;
  }

  #buscar-membro-form input[type="text"] {
    min-width: auto;
    width: 100%;
  }

  .membros-form-container {
    padding: 24px 8px;
    min-height: 340px;
  }
  .membros-actions {
    flex-direction: column;
    gap: 16px;
    max-width: 90vw;
  }
  .btn-membro {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .bloco-secao,
  section {
    border-radius: 15px;
    margin: 15px 5px;
    padding: 20px 10px;
  }

  .secao-container {
    padding: 20px 15px;
  }

  .contato-container h2,
  h2 {
    font-size: 1.8rem;
  }

  .contato-container p {
    font-size: 0.9rem;
  }

  th,
  td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }

  .form-grupo input,
  .form-grupo textarea {
    padding: 12px;
    font-size: 0.9rem;
  }

  .btn-enviar,
  button {
    padding: 12px 20px;
    font-size: 1rem;
  }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fade-down {
  0% {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 0.5;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
