:root {
  --black: #000814;
  --darkBlue: #001d3d;
  --lightBlue: #003566;
  --yellow: #ffc300;
  --fadedYellow: #ffd60a;
  --white: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Merriweather", serif;
}

body {
  color: white;
  line-height: 1.6;
}

header {
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-heading {
  font-size: 2.5rem;
}

.logo-image {
  width: 130px;
}

/* Responsive logo */
@media (max-width: 870px) {
  .logo-heading {
    font-size: 1.8rem;
  }
}

@media (max-width: 500px) {
  .logo-heading {
    font-size: 1.4rem;
  }
}

/* Search bar */
.search {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 550px;
  background: #cfcdcd;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

.search input {
  flex: 1;
  min-width: 100px;
  padding: 0.5rem;
  border: none;
  outline: none;
  background: #cfcdcd;
}

.search button {
  padding: 0.5rem 1rem;
  background: var(--yellow);
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.search-icon {
  margin-left: 0.5rem;
  color: #666;
}

/* Navbar */
nav {
  position: relative;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 999;
}

.bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  background: var(--black);
  transition: all 0.3s ease;
}

.menu {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.menu li a {
  text-decoration: none;
  color: var(--black);
  font-size: 1.1rem;
  padding: 4px 12px;
  border-radius: 20px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.menu li a:hover,
.menu li a.active {
  color: var(--lightBlue);
  background: var(--fadedYellow);
  border: 2px solid var(--black);
}

.auth {
  margin-left: 0.5rem;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: var(--fadedYellow);
  color: var(--black);
  font-size: 1rem;
}

.auth:hover {
  background: #f9e166;
}

@media (max-width: 1065px) {
  #sign-up {
    display: none;
  }
}

/* Mobile menu */
@media (max-width: 955px) {
  .menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    width: 220px;
    padding: 2rem 1.5rem;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
  }

  .menu.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

@media (max-width: 1360px) {
  .search {
    max-width: 500px;
  }

  .logo-image {
    width: 120px;
  }
}

@media (max-width: 1290px) {
  .menu li a {
    padding: 2px 6px;
  }

  .search {
    margin-right: 20px;
  }
}

@media (max-width: 850px) {
  .search {
    max-width: 400px;
  }

  .logo-image {
    width: 110px;
  }

  header {
    padding: 0.5rem 1rem;
  }
}

@media (min-width: 400px) and (max-width: 650px) {
  .search {
    max-width: 200px;
  }

  .logo-image {
    width: 100px;
  }

  header {
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 379px) {
  .logo-image {
    width: 80px;
  }

  header {
    padding: 0.125rem 0.25rem;
  }
}

/* Profile */
.user-profile-container {
  position: relative;
  display: inline-block;
  margin-left: 15px;
}

/* Circle user icon */
.user-profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ccc center/cover no-repeat;
  background-image: url("images/Sample_User_Icon.png"); /* default icon */
  cursor: pointer;
  overflow: hidden;
}

/* Remove broken image icon issue */
.user-profile-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Dropdown styling */
.user-dropdown {
  display: none;
  position: absolute;
  top: 50px;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  width: 230px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  z-index: 100;
}

.user-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 600;
  font-size: 15px;
  color: #000;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-email {
  font-size: 13px;
  color: #777;
}

.user-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.user-menu li {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.2s;
}

.user-menu li:hover {
  background: #f5f5f5;
}

.user-menu i {
  width: 18px;
  text-align: center;
}

.user-profile-container.active .user-dropdown {
  display: block;
}

/* Force correct image after login */
.user-profile-icon.logged-in {
  background-image: url("images/user_logged.png") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Show dropdown on active */
.user-profile-container.active .user-dropdown {
  display: block;
}


/* Default circle */
.user-profile-icon,
.user-avatar {
  border-radius: 50%;
  object-fit: cover;
}

/* Remove border-radius after login */
.user-profile-container.logged-in .user-profile-icon,
.user-profile-container.logged-in .user-avatar {
  border-radius: 0; /* makes the image normal rectangle */
}

/* Mobile Search */
.mobile-search {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #cfcdcd;
  border: 1px solid #ccc;
  overflow: hidden;
  position: sticky;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem;
  border: none;
  outline: none;
  background: #cfcdcd;
}

.mobile-search button {
  padding: 0.5rem 1rem;
  background: var(--yellow);
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.mobile-search .search-icon {
  margin-left: 0.5rem;
  color: #666;
}

@media (max-width: 400px) {
  header .search {
    display: none;
  }

  .mobile-search {
    display: flex;
    margin-bottom: 20px;
  }
}

/* Extra small screen tweaks */
@media (max-width: 465px) {
  .user-profile-container {
    margin-left: 15px;
  }
}

@media (max-width: 400px) {
  .menu-toggle {
    margin-left: 170px;
  }
}

@media (max-width: 340px) {
  .menu-toggle {
    margin-left: 130px;
  }
}

@media (max-width: 302px) {
  .menu-toggle {
    margin-left: 100px;
  }
}

@media (max-width: 265px) {
  .menu-toggle {
    margin-left: 80px;
  }
}

@media (max-width: 245px) {
  .menu-toggle {
    margin-left: 0;
  }
}


/* Carousel Section */
.carousel {
  position: relative;
  height: 550px;
  /* Adjust height */
  width: 100%;
  background: url("images/hero-image.jpg") no-repeat center center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.carousel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.55);
  /* dark overlay */
  border-radius: 10px;
}

.carousel-overlay {
  position: relative;
  text-align: center;
  color: #fff;
  z-index: 1;
  padding: 0 1rem;
}

.carousel-overlay h1 {
  font-size: 2.2rem;
  font-family: "Merriweather", serif;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.carousel-overlay span {
  color: #ffd700;
  /* gold/yellow highlight */
}

.carousel-overlay p {
  font-size: 1.1rem;
  font-family: "Open Sans", sans-serif;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}
.carousel-overlay h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-family: "Merriweather", serif;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.carousel-overlay p {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  font-family: "Open Sans", sans-serif;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.show-genre-banner {
  max-width: 100%;
  height: auto;
}
/* GENRE STYLING */
.genre-title {
  font-weight: 700;
  font-size: 50px;
  text-align: center;
  /* padding: 2rem; */
  margin-bottom: 20px;
}
.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  transition: transform 0.6s ease;
}
.first-genre-card {
  margin-left: 10px;
}

.genre-card {
  position: relative;
  min-width: 220px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.genre-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(70%);
  transition: transform 0.3s ease;
}

.genre-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.genre-text {
  position: absolute;
  bottom: 15px;
  left: 15px;
  font-size: 1.5rem;
  font-weight: bold;
  z-index: 2;
  color: white;
}

.genre-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.genre-card:hover img {
  transform: scale(1.1);
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background 0.3s;
}

.arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.arrow.left {
  left: 10px;
}
.arrow.right {
  right: 10px;
}
/* BANNER  */
.banner-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 20px auto;
}

.banner-image {
  width: 80%; /* main banner size */
  max-width: 1200px;
  height: auto;
  z-index: 2; /* stay above background */
  position: relative;
}

/* background that matches the height of .banner-image */
.banner-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* exactly same height as wrapper (which follows banner-image) */
  background: url("images/banner-background.png") center/cover no-repeat;
  z-index: 1; /* behind the banner image */
}

/* change this */
.movies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.movies img {
  width: 100%;
  height: 280px;
  /* control height */
  object-fit: cover;
  /* keep proportions, crop neatly */
  border-radius: 10px;
}

.movie {
  /* background: var(--lightBlue); */
  width: 230px;
  padding: 0.7rem;
  border-radius: 10px;
  overflow: hidden;
}

/* .movie img {
      width: 100%;
      border-radius: 10px;
      
    } */
.movie h3 {
  font-family: "Poppins", sans-serif;
  color: rgb(0, 0, 0);
  font-weight: 700;
  margin: 0.5rem 0;
  font-size: 1rem;
  font-size: 16px;
}

.movie p {
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  color: #666666;
}
.movie button {
  font-family: "Merriweather", sans-serif;
  background: var(--yellow);
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
}

footer {
  background-color: var(--black);
  color: #fff;
  padding: 40px 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
  justify-content: space-between;
}

.footer-section {
  flex: 1 1 220px;
  margin: 10px;
}

.footer-section h3 {
  font-size: 16px;
  margin-bottom: 15px;
  color: #f1c40f;
  text-transform: uppercase;
}

.footer-section p,
.footer-section a {
  font-size: 14px;
  color: #ddd;
  line-height: 1.8;
  text-decoration: none;
}

.footer-section a:hover {
  color: #f1c40f;
}

.footer-bottom {
  border-top: 1px solid #444;
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  font-size: 13px;
  color: #aaa;
}

/* Social Icons */
.social-icons {
  margin-top: 15px;
  text-align: center;
}

.social-icons a {
  display: inline-block;
  margin: 0 8px;
  width: 35px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  background: var(--lightBlue);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  transition: 0.3s;
}

.social-icons a:hover {
  background: var(--fadedYellow);
  color: #2c3e50;
}


/* //after filterin out  */
.movies {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
/* //hide  */
.hide {
  display: none;
}


/* new changes to mobile search can be changed optional  */
/* Reduce gaps and adjust movie card size on smaller screens */
@media (max-width: 670px) {
  .movies {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem; /* reduce spacing between cards */
    padding: 0.5rem;
  }

  .movie {
    width: 100%;
    padding: 0.5rem;
  }

  .movies img {
    height: 230px; /* slightly shorter for better fit */
  }

  .movie h3 {
    font-size: 14px;
  }

  .movie p {
    font-size: 11px;
  }

  .movie button {
    padding: 0.25rem 0.5rem;
    font-size: 12px;
  }
}








/* Fix image cropping issue by zooming out slightly */
@media (max-width: 670px) {
  .movies {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .movie {
    width: 100%;
    padding: 0.5rem;
  }

  .movies img {
    width: 100%;
    height: 230px;
    object-fit: contain; /* ✅ shows full image, including borders */
    object-position: center;
    background-color: #000; /* optional — gives contrast if image has transparent edges */
    border-radius: 10px;
  }

  .movie h3 {
    font-size: 14px;
  }

  .movie p {
    font-size: 11px;
  }

  .movie button {
    padding: 0.25rem 0.5rem;
    font-size: 12px;
  }
}










/* making some changes in mobile serach of index.html  */

/* making some changes for error free in searching */
/* Fullscreen No Movies Image */
.no-movies-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100%;
}

.no-movies-big {
  width: 80%;
  max-width: 700px;
  height: auto;
  cursor: pointer;
  border-radius: 16px;
  /* transition: transform 0.4s ease, filter 0.4s ease; */
}



@media (max-width: 600px) {
  .no-movies-big {
    width: 95%;
    max-width: 400px;
  }
}
