/* General Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #1e1e2f, #2a2a40);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center the slider container */
}

/* Navbar */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 1138px; /* Match slider container width */
  margin: 0 auto; /* Center the navbar */
  position: relative; /* Ensure the navbar is positioned relative */
  z-index: 1000; /* Ensure the navbar is above other elements */
}

nav .logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

/* Menu Button */
.menu-button {
  display: none; /* Hidden by default */
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Navigation Links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 16px;
  border-radius: 10px;
  transition: background 0.3s ease;
}

.nav-links li a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Slider Container */
.slider-container {
  width: 1138px; /* Fixed width for 640p */
  height: 640px; /* Fixed height for 640p */
  position: relative;
  overflow: hidden;
  border-radius: 20px; /* Curved edges */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  margin: 20px auto; /* Center the slider container */
}

.slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  height: 100%;
}

.slide {
  min-width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Ensures the image is fully visible */
  border-radius: 20px; /* Curved edges */
}

/* Gradient overlay for better text visibility */
.slide::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%; /* Adjust the height of the gradient */
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  pointer-events: none; /* Ensures the overlay doesn't interfere with clicks */
}

.slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Ensures no collision on small screens */
  gap: 10px; /* Adds spacing between items */
  z-index: 1; /* Ensures the info bar is above the gradient overlay */
}

.slide-info h3 {
  margin: 0;
  font-size: 1.5rem;
  flex: 1 1 100%; /* Ensures the title takes full width on small screens */
}

.slide-info p {
  margin: 0;
  font-size: 1rem;
  flex: 1 1 auto; /* Allows items to wrap on small screens */
}

.stars {
  color: gold;
}

/* Spotlight Section */
.spotlight {
  text-align: center;
  margin: 40px auto;
  width: 90%;
  max-width: 1138px; /* Match slider container width */
}

.spotlight h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.spotlight iframe {
  width: 100%;
  height: 50vh; /* Responsive height based on viewport */
  border: none;
  border-radius: 20px;
}

/* Media Queries for Responsiveness */
@media (max-width: 1138px) {
  /* Adjust slider container for smaller screens */
  .slider-container {
    width: 90%; /* Responsive width */
    height: 56.25vw; /* Maintain 16:9 aspect ratio (640p) */
    max-width: 1138px; /* Limit maximum width */
    max-height: 640px; /* Limit maximum height */
  }
}

@media (max-width: 768px) {
  /* Hide nav links and show menu button */
  .nav-links {
    display: none; /* Hide nav links by default on smaller screens */
    flex-direction: column;
    position: absolute;
    top: 60px; /* Adjust based on navbar height */
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 10px;
    padding: 10px;
    z-index: 1001; /* Ensure the dropdown is above the slider */
  }

  .nav-links.active {
    display: flex; /* Show nav links when menu is active */
  }

  .menu-button {
    display: block; /* Show menu button on smaller screens */
  }

  /* Slider adjustments for smaller screens */
  .slider-container {
    height: 56.25vw; /* Maintain 16:9 aspect ratio */
  }

  .slide-info {
    padding: 8px; /* Reduce padding for smaller screens */
  }

  .slide-info h3 {
    font-size: 1.2rem; /* Smaller font size for smaller screens */
  }

  .slide-info p {
    font-size: 0.9rem; /* Smaller font size for smaller screens */
  }

  /* Spotlight adjustments for smaller screens */
  .spotlight h2 {
    font-size: 1.5rem;
  }

  .spotlight iframe {
    height: 40vh; /* Smaller height on mobile */
  }
}

@media (max-width: 480px) {
  /* Navbar adjustments for very small screens */
  nav {
    padding: 10px;
  }

  .nav-links {
    top: 50px; /* Adjust based on navbar height */
  }

  /* Slider adjustments for very small screens */
  .slider-container {
    height: 56.25vw; /* Maintain 16:9 aspect ratio */
  }

  .slide-info {
    padding: 5px; /* Further reduce padding for very small screens */
  }

  .slide-info h3 {
    font-size: 1rem; /* Smaller font size for very small screens */
  }

  .slide-info p {
    font-size: 0.8rem; /* Smaller font size for very small screens */
  }

  /* Spotlight adjustments for very small screens */
  .spotlight h2 {
    font-size: 1.2rem;
  }

  .spotlight iframe {
    height: 30vh; /* Even smaller height on very small screens */
  }
  /* Explore Movies Button */
  explore-button-container {
    text-align: center;
    margin: 20px auto;
  }
  
  .explore-button {
    background: linear-gradient(135deg, #e50914, #ff0000); /* Gradient background */
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1.2rem;
    border-radius: 30px; /* Rounded corners */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4); /* Shadow for depth */
    position: relative;
    overflow: hidden;
  }
  
  .explore-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) rotate(45deg);
    transition: all 0.5s ease;
    z-index: 0;
  }
  
  .explore-button:hover::before {
    width: 0;
    height: 0;
  }
  
  .explore-button span {
    position: relative;
    z-index: 1;
  }
  
  .explore-button:hover {
    transform: translateY(-3px); /* Slight lift on hover */
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6); /* Enhanced shadow on hover */
  }
  
  .explore-button:active {
    transform: translateY(0); /* Reset lift on click */
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4); /* Reset shadow on click */
  }
  
  /* Loading Animation */
  .loading-animation {
    margin-top: 10px;
  }
  
  .loading-animation img {
    width: 50px; /* Adjust size as needed */
    height: 50px; /* Adjust size as needed */
    display: block; /* Ensure the GIF is centered */
    margin: 0 auto; /* Center the GIF horizontally */
  }
  /* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 40px;
  width: 100%;
}

footer p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}
}