/* 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;
  }
  
  /* 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: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1000;
  }
  
  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);
  }
  
  /* Search Box */
  .search-container {
    text-align: center;
    margin: 20px auto;
    width: 90%;
    max-width: 800px;
  }
  
  #search-box {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
  }
  
  #search-box::placeholder {
    color: rgba(255, 255, 255, 0.5);
  }
  
  /* Movies Grid */
  .movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .movie-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
  }
  
  .movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
  }
  
  .movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  }
  
  .movie-details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .movie-card:hover .movie-details,
  .movie-card:focus .movie-details {
    opacity: 1;
  }
  
  .movie-details h3 {
    margin: 0;
    font-size: 1.2rem;
  }
  
  .movie-details p {
    margin: 5px 0;
    font-size: 0.9rem;
  }
  
  .movie-details .stars {
    color: gold;
  }
  
  .movie-details .buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
  }
  
  .movie-details .buttons a {
    padding: 5px 10px;
    background: #e50914;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
  }
  
  .movie-details .buttons a:hover {
    background: #ff0000;
  }
  
  /* 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);
  }
  
  /* Media Queries for Responsiveness */
  @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 */
    }
  
    /* Movies Grid adjustments for smaller screens */
    .movies-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
  
    .movie-details h3 {
      font-size: 1rem;
    }
  
    .movie-details p {
      font-size: 0.8rem;
    }
  }
  
  @media (max-width: 480px) {
    /* Navbar adjustments for very small screens */
    nav {
      padding: 10px;
    }
  
    .nav-links {
      top: 50px; /* Adjust based on navbar height */
    }
  
    /* Movies Grid adjustments for very small screens */
    .movies-grid {
      grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
  
    .movie-details h3 {
      font-size: 0.9rem;
    }
  
    .movie-details p {
      font-size: 0.7rem;
    }
  }