/* General styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden; /* Prevents body from scrolling */
}

.container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 80%; /* Adjust width to 80% of viewport */
  max-width: 800px; /* Adjust max-width for better readability on larger screens */
  max-height: 90vh; /* Set max height to 90% of the viewport height */
  overflow-y: auto; /* Make container scrollable if content exceeds max height */
  margin: 20px; /* Add margin for space around container */
  z-index: 2;
}

input,
button {
  padding: 10px;
  margin: 10px 0;
  width: 80%;
  max-width: 300px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 10px 0; /* Add margin for spacing between list items */
}

button {
  background-color: #007bff;
  color: white;
  cursor: pointer;
  margin: 0 5px; /* Adds some space between buttons */
}

button:hover {
  background-color: #0056b3;
}

/* Search results list styles */
li {
  margin-bottom: 12px;
  padding: 12px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

li:hover {
  background-color: #f2f2f2;
}

li h3 {
  margin: 0;
  font-size: 18px;
  font-weight: bold;
  color: #333333;
}

li p {
  margin-top: 6px;
  font-size: 14px;
  color: #666666;
}

li .release-date {
  font-size: 12px;
  color: #999999;
}

li .movie-poster {
  width: 60px;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 12px;
}

li .details {
  display: flex;
  align-items: center;
}

#search-results {
  margin-top: 20px;
}

#movie-details,
#similar-movies {
  margin-top: 20px;
}

.movie-poster {
  max-width: 100%;
  max-height: 350px; /* Adjust the maximum height to a reasonable value */
  height: auto;
  margin-top: 10px;
  border: solid black 1px;
}

#new-search-btn {
  display: block;
  margin: 20px auto;
}

#back-btn {
  display: block;
  margin: 20px auto;
}

#new-search-container {
  margin-top: 20px;
}

/* Add margin and padding to list items for better spacing */
li {
  margin-bottom: 8px;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 4px;
  cursor: pointer; /* Change cursor to pointer for clickable items */
}

/* Change cursor to pointer when hovering over list items */
li:hover {
  background-color: #f0f0f0;
}

#button-container {
  display: flex;
  justify-content: space-between;
  margin-top: 20px; /* Adds space above the button container */
  gap: 10px; /* Adds space between buttons */
}

#button-container button {
  flex: 1;
  flex-basis: 45%; /* Sets a base size for the buttons */
  max-width: 200px; /* Ensures buttons do not exceed a specific width */
}

/*ANIMATION STYLES*/

/* Moving background animation */
body {
  background: linear-gradient(45deg, #2c3e50, #99a1aa, #2c3e50);
  background-size: 100% 100%;
}
/* Starfall animation styles */
@keyframes starfall {
  0% {
    transform: translate(0, 100vh); /* Start from bottom-left */
    opacity: 1;
  }
  100% {
    transform: translate(100vw, -100vh); /* Move to top-right */
    opacity: 0;
  }
}

.star {
  position: fixed;
  top: 0;
  width: 2px;
  height: 2px;
  background-color: white;
  border-radius: 50%;
  animation: starfall linear infinite;
  opacity: 0;
}

/* Comet animation */
@keyframes comet {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  100% {
    transform: translate(100vw, -100vh) scale(1);
    opacity: 0;
  }
}

.comet {
  position: fixed;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, white 30%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  box-shadow: 0 0 15px 15px white, 0 0 30px 30px rgba(255, 255, 255, 0.5);
  opacity: 0;
  pointer-events: none;
  animation: comet 2s ease-out;
}
