/* Estilos gerais */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  font-family: 'Poppins', sans-serif;
  align-items: center;
  flex-direction: column;
  background-color: #D9D9D9;
}

h1 {
  font-size: 2.5rem;
  padding: 2.7rem 0 2.7rem 0;
}

.caixa-input {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  width: 100%;
}

input {
  outline: none;
  width: 50%;
  padding: 1.25rem;
  margin: 1rem 0;
  border: none;
  border-radius: 10px;
}

input::placeholder {
  color: #AEAEAE;
  font-size: 17px;
}

.galeria-assuntos {
  padding-top: 2.5rem;
}

.caixa-input button {
  padding: 1.15rem;
  width: 10%;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transform: scale(1);
  transition: all 0.3s;
  background-color: #01C801;
  color: white;
}

.galeria-assuntos ul {
  display: grid;
  grid-template-columns: repeat(4, 180px);
  gap: 2rem;
}

ul {
  list-style: none;
}

ul li {
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  list-style-type: none;
  height: 140px;
  width: 170px;
  padding: 10px;
  background-color: #fff;
  border-radius: 40px;
}

/* Estilo do modal */

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border: none;
  z-index: 1000;
  height: 300px;
  width: 600px;
  max-width: 80%;
  border-radius: 30px;
  padding: 20px;
}

.modal.active {
  display: block;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.modal-header .close-button {
  cursor: pointer;
  outline: none;
  background: none;
  border: none;
  font-weight: bold;
  font-size: 2rem;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

textarea {
  width: 100%;
  height: 150px;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
  resize: none;
  font-family: 'Poppins', sans-serif;
  outline: none;
}

textarea:focus {
  border-color: #01C801;
  box-shadow: 0 0 5px rgba(1, 200, 1, 0.5);
}

textarea::placeholder {
  color: #AEAEAE;
  font-size: 1rem;
}

.modal-overlay {
  display: none;
  position: fixed;
  opacity: 0;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.836);
  pointer-events: none;
  z-index: 999;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* Estilos para o modo escuro */
body.dark-mode {
  background-color: #181818;
  color: #f1f1f1;
}

body.dark-mode h1 {
  color: #f1f1f1;
}

body.dark-mode .caixa-input input {
  background-color: #333;
  color: #f1f1f1;
  border: 1px solid #555;
}

body.dark-mode  button {
  color: #fff;
}

body.dark-mode .galeria-assuntos li {
  background-color: #333;
  color: #f1f1f1;
}

body.dark-mode .modal {
  background-color: #222;
  color: #f1f1f1;
}

body.dark-mode textarea {
  background-color: #333;
  color: #f1f1f1;
  border: 1px solid #555;
}

body.dark-mode .modal-header .close-button {
  color: #f1f1f1;
}

/* Para o botão de alternância */
#dark-mode-toggle {
  position: absolute;
  top: 47px;
  right: 25px;
  font-size: 5rem;
  border: none;
  background: none;
  cursor: pointer;
}

/* Media Queries para responsividade */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
    padding: 1.5rem 0;
  }

  .caixa-input {
    flex-direction: column;
    gap: 0.5rem;
  }

  input {
    width: 80%;
  }

  .caixa-input button {
    width: 80%;
  }

  .galeria-assuntos ul {
    grid-template-columns: repeat(2, 1fr); /* Duas colunas em telas menores */
    gap: 1rem;
  }

  ul li {
    width: 120px; /* Ocupa 100% da largura da coluna */
    height: 120px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
    padding: 1rem 0;
  }

  .galeria-assuntos ul {
    grid-template-columns: repeat(2, 1fr); /* Mantém duas colunas em celulares */
  }

  ul li {
    width: 120px; /* Ocupa 100% da largura da coluna */
    height: 120px;
  }
}