* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
body {
  background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #1c1c1c);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: #fff;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

header {
  text-align: center;
  padding: 2rem 1rem;
}
header h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 20px;
  color: #f5f5f5;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}
.form-container {
  display: flex;
  justify-content: center;
}
input[type="text"] {
  padding: 10px;
  width: 250px;
  border-radius: 5px;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

input::placeholder {
  color: #ccc;
}
input[type="text"]:focus {
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 5px #38bdf8;
}

button {
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  background-color: #38bdf8;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
}

button:hover {
  background-color: #0ea5e9;
}
.movies-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.movie-card {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.movie-card:hover {
  transform: translateY(-10px);
}

.movie-card h3 {
  color: #fff;
  margin: 10px 0 5px;
  font-size: 1.1rem;
}

.movie-card p {
  color: #ddd;
  font-size: 0.9rem;
}

.movie-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.5rem;
  }
  input[type="text"] {
    width: 180px;
  }
  .movie-card img {
    height: auto;
    max-height: 400px;
  }
}

.movie-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.movie-popup.hidden {
  display: none;
}
.popup-content {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  padding: 20px;
  border-radius: 14px;
  width: 80%;
  max-width: 600px;
  color: #fff;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 80vh;
}

.popup-content::-webkit-scrollbar {
  width: 8px;
}

.popup-content::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #0f2027, #203a43);
  border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
  border-radius: 10px;
}

.popup-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #7dd3fc, #38bdf8);
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}
.popup-content h2 {
  margin-bottom: 10px;
}
.popup-content p {
  margin: 5px 0;
}
.popup-content img {
  background-size: cover;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}
.popup-content a {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #38bdf8;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
.popup-content a:hover {
  background-color: #0ea5e9;
}
