body {
  font-family: Arial, sans-serif;
  background-color: #111;
  color: #fff;
  margin: 0;
  padding: 0;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #222;
  padding: 15px;
  flex-wrap: wrap;
}

header h1 {
  flex-basis: 100%;
  text-align: center;
  margin-bottom: 10px;
  color: #e50914;
}

header input, header button, header select {
  padding: 8px;
  border-radius: 5px;
  border: none;
  font-size: 14px;
}

header input {
  width: 200px;
}

header button {
  cursor: pointer;
  background: #e50914;
  color: white;
  transition: background 0.3s;
}

header button:hover {
  background: #b20710;
}

.movie-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  padding: 20px;
}

.movie-card {
  background: #222;
  padding: 10px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.movie-card:hover {
  transform: scale(1.05);
}

.movie-card img {
  width: 100%;
  border-radius: 8px;
}

#backBtn {
  background: #444;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  margin: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

#backBtn:hover {
  background: #e50914;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  background: #222;
  margin: auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 800px;
  color: white;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #fff;
}

.modal-content img {
  width: 200px;
  float: left;
  margin-right: 20px;
  border-radius: 10px;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content p {
  line-height: 1.5;
}
