/* ===== Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden !important;
  font-family: 'Poppins', sans-serif;
  background: #141414;
  color: #fff;
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  background: linear-gradient(90deg, #000000, #1c1c1c);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.logo {
  color: #e50914;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: 0.3s;
}

.logo:hover {
  color: #ff1f1f;
  transform: scale(1.05);
}

/* ===== Search Bar ===== */
.search-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

#searchBar {
  padding: 8px 12px;
  border-radius: 5px;
  border: none;
  outline: none;
  width: 250px;
  background: #222;
  color: #fff;
}

#searchBtn {
  background: #e50914;
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: 0.3s;
}

#searchBtn:hover {
  background: #ff1f1f;
}

/* ===== Trending Section ===== */
.trending {
  margin-top: 20px;
  position: relative;
}

.trending-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.movie-scroll {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding: 1rem 1rem;
  scroll-behavior: smooth;
}

.movie-scroll::-webkit-scrollbar {
  display: none;
}

/* Cards inside Trending */
.trending .card {
  min-width: 180px;
  width: 180px;
  height: 260px;
  flex-shrink: 0;
  background: #222;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: 0.3s;
}

.trending .card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending .card:hover {
  transform: scale(1.07);
}

/* Scroll Buttons (Visible in all devices now) */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  font-size: 1.8rem;
  border-radius: 50%;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 2;
  transition: 0.3s;
}

.scroll-btn:hover {
  background: #e50914;
}

#scrollLeft {
  left: 8px;
}

#scrollRight {
  right: 8px;
}

/* ===== Movie Grid ===== */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 2rem;
}

.card {
  background: #222;
  border-radius: 8px;
  overflow: hidden;
  transition: 0.3s;
  cursor: pointer;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.card-info {
  padding: 8px;
}

.card-info h3 {
  margin: 0;
  font-size: 1rem;
}

.card-info p {
  margin: 4px 0;
  font-size: 0.85rem;
  color: #bbb;
}

/* ===== Genres ===== */
.genre-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
  padding: 0 10px;
}

.genre-buttons button {
  padding: 8px 15px;
  background: #222;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.genre-buttons button:hover {
  background: #e50914;
}

/* ===== Pagination ===== */
.pagination {
  text-align: center;
  margin: 20px 0;
}

.pagination button {
  padding: 8px 15px;
  margin: 0 10px;
  background: #e50914;
  border: none;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.pagination button:hover {
  background: #ff1f1f;
}

/* footer */
.footer {
  background: #0b0b0b;
  color: #ddd;
  padding: 60px 20px 20px;
  font-family: "Poppins", sans-serif;
  margin-top: 25px;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

.footer h2,
.footer h3 {
  color: #fff;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-about p,
.footer-disclaimer p {
  color: #aaa;
  font-size: 14px;
  line-height: 1.6;
}



.footer-links ul li a:hover {
  color: #ff4444;
}

.footer-social .social-icons {
  display: flex;
  gap: 15px;
}

.footer-social .social-icons a {
  color: #bbb;
  font-size: 20px;
  transition: color 0.3s;
}

.footer-social .social-icons a:hover {
  color: #ff4444;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #222;
  margin-top: 40px;
  padding-top: 15px;
  font-size: 14px;
  color: #888;
}

/* Responsive */
@media (max-width: 600px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social .social-icons {
    justify-content: center;
  }
}

/* ===== Details Page ===== */
.details-container {
  display: flex;
  justify-content: center;
  padding: 2rem;
  overflow-x: hidden;
}

.movie-details {
  display: flex;
  flex-wrap: wrap;
  background: #222;
  border-radius: 10px;
  max-width: 900px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

.poster-large {
  width: 100%;
  max-width: 280px;
  object-fit: cover;
}

.info {
  padding: 20px;
  flex: 1;
}

.info h1 {
  font-size: 1.8rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 15px;
}

.links a {
  display: inline-block;
  background: #e50914;
  color: white;
  text-decoration: none;
  padding: 10px 15px;
  border-radius: 5px;
}

.links a:hover {
  background: darkred;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .search-area {
    width: 100%;
    justify-content: center;
  }

  #searchBar {
    width: 70%;
  }

  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 1rem;
  }

  .scroll-btn {
    font-size: 1.6rem;
    padding: 3px 8px;
  }

  .trending .card {
    min-width: 150px;
    width: 150px;
    height: 220px;
  }
}


/* ===== Add Movie Form ===== */
.form-section {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 2rem;
}

.movie-form {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 500px;
  background: #222;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.movie-form label {
  margin-top: 10px;
  font-weight: 600;
}

.movie-form input,
.movie-form select {
  padding: 8px 10px;
  border-radius: 5px;
  border: none;
  outline: none;
  margin-top: 5px;
  background: #333;
  color: white;
}

.movie-form button {
  margin-top: 20px;
  background: #e50914;
  border: none;
  color: white;
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: 0.3s;
}

.movie-form button:hover {
  background: #ff1f1f;
}

#statusMsg {
  margin-top: 10px;
  text-align: center;
  font-size: 1rem;
}


/* ===== Hero Background (Behind Navbar + Trending) ===== */
.hero-section {
  position: relative;
  background: url('bg.jpg') no-repeat center center/cover;
  width: 100%;
  color: white;
  padding-top: 0; /* background starts from very top */
  padding-bottom: 50px;
}

/* Dark overlay to make text readable */
.hero-section .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}

/* Navbar on top of the overlay */
.navbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  background: transparent; /* transparent to see background */
  box-shadow: none;
}

/* Navbar text + search */
.logo {
  color: #fff;
  font-size: 1.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}
.logo:hover { color: #ff1f1f; transform: scale(1.05); }

/* ===== Better Search Bar Visibility ===== */
.search-area {
  display: flex;
  align-items: center;
  gap: 10px;
  /* backdrop-filter: blur(6px); adds soft blur behind */
  /* background: rgba(0, 0, 0, 0.35); semi-transparent black container */
  padding: 6px 10px;
  border-radius: 8px;
}

#searchBar {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 240px;
  font-size: 1rem;
  transition: 0.3s;
}
#searchBar::placeholder {
  color: rgba(255, 255, 255, 0.8);
}
#searchBar:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: #e50914;
}

#searchBtn {
  background: #e50914;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  font-weight: 600;
}
#searchBtn:hover {
  background: #ff1f1f;
  transform: scale(1.05);
}


/* Trending inside hero background */
.trending {
  position: relative;
  z-index: 5;
  margin-top: 50px;
}

.trending h2 {
  margin-left: 25px;
  font-size: 1.6rem;
  color: white;
}

.trending-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-top: 10px;
}

.movie-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 1rem 1.5rem;
  scroll-behavior: smooth;
}
.movie-scroll::-webkit-scrollbar { display: none; }

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  font-size: 1.8rem;
  border-radius: 50%;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 6;
}
.scroll-btn:hover { background: #e50914; }
#scrollLeft { left: 8px; }
#scrollRight { right: 8px; }

/* Fade-out at bottom to blend hero into next section */
.hero-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to bottom, rgba(20,20,20,0), #141414);
  z-index: 2;
}

/* Genres + Movies appear below hero */
.genres, .all-movies {
  position: relative;
  z-index: 3;
}

/* Mobile responsive fix */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 10px;
  }
  #searchBar { width: 70%; }
  .trending h2 { font-size: 1.3rem; }
}


/* ===== Navbar Logo Image ===== */
.logo-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10;
}

.logo-container:hover {
  transform: scale(1.05);
}

.logo-img {
  height: 150px;      /* adjust as needed */
  width: auto;       /* keeps image ratio*/
}

/* Optional: adjust size for mobile */
@media (max-width: 768px) {
  .logo-img {
    height: 160px;
  }
}

/* ===== Highlight Selected Genre ===== */
.genre-buttons button.active-genre {
  background: #e50914;   /* Netflix red highlight */
  color: white;
  border: none;
  transform: scale(1.05);
}
.anuj{
    text-decoration: none;
    color: inherit;
}