
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #121212;
  color: #fff;
  min-height: 100vh;
  padding: 20px;
}

header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

header h1 {
  flex-basis: 100%;
  text-align: center;
  font-size: 2rem;
  margin-bottom: 10px;
  color: #ffcc00;
}

header input,
header select,
header button {
  padding: 8px 12px;
  border-radius: 5px;
  border: none;
  outline: none;
}

header input {
  flex: 1 1 200px;
  max-width: 250px;
}

header select {
  background-color: #222;
  color: #fff;
}

header button {
  background-color: #ffcc00;
  color: #121212;
  cursor: pointer;
  transition: 0.2s;
}

header button:hover {
  background-color: #e6b800;
}


#movie-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}


.movie-card {
  background-color: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  position: relative;
  transition: transform 0.2s;
}

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

.movie-card img {
  width: 100%;
  display: block;
  border-bottom: 1px solid #333;
}


.img-wrapper {
  position: relative;
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  padding: 5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, transform 0.2s;
}

.img-wrapper:hover .fav-btn {
  opacity: 1;
}

.fav-btn:hover {
  transform: scale(1.2);
}


.movie-card h3 {
  margin: 10px 5px 5px 5px;
  font-size: 1rem;
  color: #ffcc00;
}

.movie-card p {
  margin-bottom: 10px;
  color: #ccc;
}


.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgba(0,0,0,0.85);
  padding: 20px;
}

.modal-content {
  background-color: #1e1e1e;
  margin: 50px auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 800px;
  color: #fff;
  position: relative;
}

.modal-content h2 {
  color: #ffcc00;
  margin-bottom: 10px;
}

.modal-content p, .modal-content div {
  margin-bottom: 10px;
  line-height: 1.4;
}

.close {
  color: #ffcc00;
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.close:hover {
  color: #fff;
}

#modal-trailer iframe {
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
}


@media (max-width: 1024px) {
  .modal-content {
    margin: 40px 20px;
    padding: 15px;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
  }
  header input, header select, header button {
    width: 100%;
  }
  .movie-card h3 {
    font-size: 0.95rem;
  }
  .movie-card p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .movie-card {
    font-size: 0.8rem;
  }
  .close {
    font-size: 1.5rem;
    top: 10px;
    right: 15px;
  }
  .modal-content {
    margin: 30px 10px;
    padding: 10px;
  }
}




#filter-toggle {
  display: none;
  background-color: #ffcc00;
  border: none;
  border-radius: 5px;
  padding: 8px 12px;
  margin-bottom: 5px;
  cursor: pointer;
  font-weight: bold;
}


.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}


@media (max-width: 768px) {
  #filter-toggle {
    display: inline-block;
  }

  .filter-group {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .filter-group.show {
    display: flex;
  }

  header input,
  header button,
  .filter-group select {
    flex: 1 1 100%;
    max-width: 100%;
  }
}
