/* style.css */

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

header {
  background-color: rebeccapurple;
  height: 10vh;
  padding: 20px;
  text-align: center;
  animation: fadeIn 1s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#search-container {
  margin-top: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#search-input {
  padding: 15px;
  font-size: 18px;
  flex: 1;
  max-width: 500px;
  border: none;
  background-color: #fff;
  color: #000;
}

#search-button {
  padding: 15px 30px;
  font-size: 18px;
  background-color: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#search-button:hover {
  background-color: #d30c11;
}

#results-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}

.movie-card {
  position: relative;
  margin: 20px;
  padding: 20px;
  width: 200px;
  border: none;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  background-color: rebeccapurple;
  text-align: center;
  transition: transform 0.3s ease;
  color: #fff; /* Changed text color to white */
}

.movie-card:hover {
  transform: translateY(-5px);
}

.movie-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.movie-card h3,
.movie-card p {
  position: relative;
  z-index: 1;
  margin: 10px 0; /* Added some margin for better readability */
}

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

.view-details-button {
  height: 40px; /* Reduced height for better fit */
  width: 100%;
  border-radius: 8px;
  margin-top: 10px;
  padding: 8px 16px;
  font-size: 14px;
  background-color: #000;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.view-details-button:hover {
  background-color: transparent;
  border: 1px solid black;
}

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  max-width: 800px;
  background-color: #333;
  border: 2px solid rebeccapurple;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  color: #999;
  font-weight: 900;
}

.modal-content {
  margin-top: 20px;
  text-align: center;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
}


#scroll-to-top-button {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background-color: rebeccapurple;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 999;
  transition: opacity 0.3s ease;
}

#scroll-to-top-button:hover {
  opacity: 0.8;
}

@media screen and (min-width: 374px) and (max-width: 415px) {
  .movie-card {
    width: 270px;
    height: auto;
  }
}