/* styles.css */
* {
  margin: 0;
  box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #111;
    color: white;  /* Set default text color to white */
  }
  
  .container {
    width: 80%;
    margin: 0 auto;
    margin-top: 50px;
  }
  
  header {
    text-align: center;
    padding: 20px;
  }
  
  h1 {
    font-family: "Arial Black"; 
  }
  
  #search {
    padding: 10px;
    width: 50%;
    font-size: 16px;
    margin-top: 10px;
    color: white;
    background-color: #333;
    border: 2px solid #0275a6;
    border-radius: 10px;
  }
  
  #search::placeholder {
    color: white;
  }
  
  #recommendation-text p {
    font-size: 18px;
    color: white;
  }
  
  .movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
  }
  
  .movie-item {
    position: relative;
  }
  
  .movie-item img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  /* Container for the star and rating */
  .rating-container {
    position: absolute;
    top: 10px;
    left: 5px;
    z-index: 2;
  }
  
  /* Rating styles */
  .rating {
    background-color: rgba(238, 238, 238, 0.123); /* Dark background */
    color: white; /* Default color for text (rating number) */
    font-size: 13px;
    padding: 0px 5px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(8px); /* Apply blur effect */
  }
  
  /* Star icon styling */
  .star {
    color: yellow; /* Make the star yellow */
    margin-right: 1px; /* Space between the star and rating number */
    font-size: 18px; /* Size of the star */
    position: relative;
    top: -3px; /* Move the star a bit higher */
  }
  
  .rating-number {
    color: white; /* Make the number white */
  }
  


  /* Movie item styling */
.movie-item {
    position: relative;
    overflow: hidden; /* Ensures that the poster stays within the bounds of the container */
    border-radius: 8px;
    box-shadow: 0 2px 5px #0296cc;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effect */
  }
  
  /* Hover effect for movie item */
  .movie-item:hover {
    transform: scale(1.05); /* Slightly scale the movie item */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3); /* Enhance the shadow on hover */
  }
  
  /* Movie poster styling */
  .movie-item img {
    width: 100%;
    height: auto; /* Make sure the aspect ratio of the image stays the same */
    border-radius: 8px;
    transition: opacity 0.3s ease; /* Transition for opacity change */
  }
  
  /* Optional: add a fade effect when hovering over the poster */
  .movie-item:hover img {
    opacity: 0.9; /* Make the image slightly transparent when hovered */
  }
  


/* FOR RESPONSIVE NAVIGATION BAR START */
/* Navigation Bar */
    nav {
      width: 100%;
      background: rgba(0, 0, 0, 0); /* Transparent at the top */
      position: fixed;
      top: 0;
      left: 0;
      z-index: 1000;
      padding: 10px 20px;
      transition: background-color 0.3s;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    /* Sticky Header when Scrolling */
    .nav-solid {
      background-color: rgba(0, 0, 0, 1); /* Solid background when scrolled */
    }

    /* Logo Style */
    #logo {
      max-height: 25px;
      display: inline-block;
    }

    /* Navigation Menu (Links) */
    nav ul {
      display: flex;
      justify-content: flex-end;
      margin: 0;
      padding: 0;
      list-style-type: none;
    }

    nav ul li {
      margin-left: 20px;
    }

    nav ul li a {
      color: #fff;
      text-decoration: none;
      font-weight: bold;
      text-transform: uppercase;
      padding: 10px;
      display: inline-block;
      border-radius: 5px;
      transition: background 0.3s;
    }

    nav ul li a:hover,
    nav ul li a.active {
      background-color: #0296cc;
    }

/* Mobile Navigation Bar */
.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: white;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: #1e1e1e;
        width: 100%;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links li {
        padding: 15px 0;
    }
}


/* Mobile Styles (Screen width below 768px) */
    @media (max-width: 768px) {
      /* Navigation links initially hidden on mobile */
      nav ul {
        display: none;  /* Hidden by default */
        flex-direction: column;
        align-items: center;
        background-color: rgba(0, 0, 0, 0.9);
        position: absolute;
        top: 50px; /* To place the menu below the nav bar */
        left: 0;
        right: 0;
        width: 100%;
        padding: 10px 0;
      }
      /* Active state of the menu */
      nav.active ul {
        display: flex; /* Show the menu when active */
      }
      nav ul li {
        width: 100%;
        text-align: center;
        margin: 10px 0;
      }

      nav ul li a {
        padding: 15px;
        width: 100%;
        text-align: center;
      }

      /* Logo will adjust for smaller screens */
      #logo {
        max-height: 20px;
      }

      /* Menu Button visible on mobile */
      .menu-btn {
        color: white;
        font-size: 18px;
        font-weight: bold;
        cursor: pointer;
        background-color: #0296cc;
        padding: 10px 20px;
        border-radius: 5px;
        display: block;  /* Visible on mobile */
      }

      /* Show menu when active */
#menu.active {
    display: flex;
}
    }

    /* Hide the menu button on desktop */
    @media (min-width: 769px) {
      .menu-btn {
        display: none;  /* Hide the menu button on desktop */
      }
    }

/* FOR RESPONSIVE NAVIGATION BAR END */
