/* ===============================
   Estilos gerais do site
   =============================== */
body {
  font-family: Arial, sans-serif;
  background: #111;
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===============================
   Cabeçalho
   =============================== */
header {
  padding: 20px;
  background: #222;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-movie{
  height: 60px;
  width: 60px;
  margin: 0 auto 10px;
  display: flex;
  justify-content: center;
}

/* ===============================
   Barra de pesquisa
   =============================== */
input {
  padding: 10px;
  border-radius: 5px;
  border: none;
  width: 250px;
  max-width: 80%;
  outline: none;
}

button {
  padding: 10px 15px;
  margin-left: 5px;
  border-radius: 5px;
  border: none;
  background: #e50914;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

button:hover {
  background: #b20710;
}

/* ===============================
   Container dos filmes
   =============================== */
#movieContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 20px;
}

/* ===============================
   Cartão do filme
   =============================== */
.movie-card {
  background: #1c1c1c;
  padding: 10px;
  border-radius: 10px;
  text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.movie-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.movie-card img {
  max-width: 100%;
  border-radius: 5px;
  margin-bottom: 10px;
}

.movie-card h3 {
  font-size: 18px;
  margin: 5px 0;
  color: #e50914;
}

.movie-card p {
  font-size: 14px;
  line-height: 1.4;
}

/* ===============================
   Estilo modal
   =============================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.mostrar {
  opacity: 1;
  pointer-events: auto;
}

.modal-conteudo {
  background-color: #222;
  padding: 20px;
  border-radius: 10px;
  max-width: 700px;
  width: 90%;
  color: #fff;
  text-align: left;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(-50px);
  transition: transform 0.3s;
}

.modal.ativo .modal-conteudo {
  transform: translateY(0);
}

.modal-conteudo iframe {
  margin-top: 15px;
  border-radius: 5px;
  width: 100%;
  height: 300px;
}


.fechar {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* ===============================
   Footer
   =============================== */
footer {
  background: #1c1c1c;
  color: #bbb;
  text-align: center;
  padding: 15px;
  font-size: 14px;
  margin-top: 20px;
}

footer a {
  color: #ff0000;
  text-decoration: none;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}

/* ===============================
   Responsividade
   =============================== */
@media (max-width: 768px) {
  #movieContainer {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    padding: 15px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p {
    font-size: 13px;
  }

  input {
    width: 180px;
  }
}

@media (max-width: 480px) {
  #movieContainer {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px;
  }

  header {
    padding: 15px;
  }

  input {
    width: 140px;
  }

  button {
    padding: 8px 12px;
    margin-left: 3px;
  }

  .movie-card h3 {
    font-size: 14px;
  }

  .movie-card p {
    font-size: 12px;
  }

  .modal-conteudo {
    width: 95%;
    padding: 15px;
  }

  .modal-conteudo iframe {
    height: 200px;
  }
}
