/* ✅ Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #111;
  color: white;
  line-height: 1.6;
  transition: background 0.3s ease-in-out;
}

/* ✅ Headings */
h2 {
  text-align: left;
  margin: 10px 30px;
  font-size: 1.8rem;
}

/* ✅ Navbar */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  transform: translateY(0); /* default visible */
  background-color: transparent;
}
.nav.scrolled {
  background-color: black;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav__logo {
  width: auto;
  height: 70px;
  object-fit: contain;
}
.nav__logo,
.nav__avatar {
  transition: transform 0.2s ease;
}

.nav__logo:hover,
.nav__avatar:hover {
  transform: scale(1.05);
}

/* ✅ Profile Avatar & Dropdown */
.nav__profile {
  position: relative;
  display: inline-block;
  top: 0;
}

.nav__avatar {
  width: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  width: 100%;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 🔍 SEARCH BAR CONTAINER */

.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  display: none; /* Only show on mobile */
}

.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 300px;
  width: 100%;
  margin-left: 20px;
}

/* 🔎 INPUT FIELD */
.search-bar input {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 20px;
  outline: none;
  transition: border-color 0.2s ease;
  background-color: #fff;
}

.search-bar input:focus {
  border-color: #999;
}
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 999;
  display: none;
}

#overlay.show {
  display: block;
}

/* 🧠 DROPDOWN SUGGESTIONS */
.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  max-height: 250px;
  overflow-y: auto;
  color: black;
}

.suggestions.hidden {
  display: none;
}

.suggestions div {
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: black;
}

.suggestions div:hover,
.suggestions div.highlighted {
  background-color: #f0f0f0;
}
/* ✅ Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  margin-top: 10px;
  right: 0;
  background: black;
  border-radius: 5px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  width: 180px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  z-index: 1000;
}

/* ✅ Show dropdown */
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ✅ Dropdown Links */
.dropdown-menu a {
  text-decoration: none;
  color: white;
  padding: 12px 15px;
  display: block;
  font-size: 14px;
  transition: background 0.3s ease;
}

.dropdown-menu a:hover {
  background: #444;
}

/* ✅ Close Button */
.close-dropdown {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
  color: white;
  background: red;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-dropdown:hover {
  background: #ccc;
}
.custom-toast {
  position: fixed;
  top: 30px;
  right: 30px;
  background-color: #222;
  color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.custom-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ✅ Banner */

.banner {
  position: relative;
  z-index: 2;
  background-size: cover;
  background-position: center center;
  height: 448px;
  display: flex;
  padding: 20px;
  background-color: transparent;
  pointer-events: auto;
}

.bannerContents {
  margin-left: 50px;
  margin-top: 170px;
  height: auto;
}

.bannerTitle {
  font-size: 3rem;
  font-weight: 800;
}

.bannerButtons {
  margin-top: 10px;
}

.bannerButton {
  cursor: pointer;
  color: #fff;
  border: none;
  font-weight: 700;
  padding: 10px 20px;
  background-color: #daa520;
  border-radius: 5px;
}

.bannerButton:hover {
  background-color: #e6e6e6;
  color: #000;
}

.bannerDescription {
  margin-top: 2rem;
  font-size: 1rem;
  max-width: 45rem;
  line-height: 1.3;
}

.sectionHeading {
  font-size: 1rem;
  font-weight: 800;
  margin-left: 0;
}
.backArrow {
  display: inline-block;
  margin: 20px 0;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
  margin-top: 80px;
}
#backToTop {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 100;
  display: none;
  background: #333;
  color: #fff;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
}
#backToTop:hover {
  background: #444;
}

/* ✅ Carousel */
.carousel-container {
  width: 95%;
  margin: auto;
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px 0;
}

.carousel::-webkit-scrollbar {
  display: none;
}

/* ✅ Movie Cards */
.movieCard,
.continueWatchingCard {
  display: inline-block;
  width: 250px;
  height: auto;
  flex-shrink: 0;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 0;
  background: #111;
  padding-bottom: 10px;
  vertical-align: top;
}

.movieCard:hover,
.continueWatchingCard:hover {
  transform: scale(1.05);
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.5);
}

.movieCard img,
.continueWatchingCard img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px 10px 0 0;
}

/* ✅ Continue Watching Section */
.continueWatching {
  background-size: cover;
  background-position: center center;
  text-align: center;
  height: 150px;
}
.continueWatchingCard h3 {
  font-size: 1.2rem;
  margin-top: 60px;
}
.resume {
  margin-top: 35%;
  color: #fff;
}

.downloadButtons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.downloadTitle {
  text-align: center;
  margin-top: 10px;
  font-size: 1rem;
  font-weight: bold;
  color: white;
}
/* ✅ Progress Bar */
.progress-bar {
  width: 90%;
  height: 5px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
}

.progress {
  height: 100%;
  background: #ffcc00;
  transition: width 0.5s ease-in-out;
}

/* ✅ Buttons */
button {
  background: #ffcc00;
  color: black;
  padding: 10px 15px;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

button:hover {
  background: #e6b800;
}
#downloadProgressContainer {
  margin-top: 15px;
  padding: 10px;
  background: #111;
  border-radius: 5px;
  color: white;
  text-align: center;
}

.progressWrapper {
  width: 100%;
  height: 8px;
  background: #555;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 5px;
}

.progressBar {
  width: 0%;
  height: 100%;
  background: #ffcc00;
  transition: width 0.3s ease;
}


/* ✅ Forms */
input,
textarea,
select {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* ✅ Video Player */
video {
  width: 100%;
  max-width: 800px;
  display: block;
  margin: 20px auto;
  border-radius: 10px;
}

/* ✅ Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: hidden;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #222;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 600px;
  text-align: center;
}

.modal h2 {
  margin: 10px 0;
  color: #ffcc00;
}

.modal p {
  color: white;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: white;
}

/* ✅ Footer */
footer {
  text-align: center;
  padding: 15px;
  background: #222;
  color: white;
  width: 100%;
}

/* ✅ Comments */
#comments-section {
  max-width: 600px;
  margin: auto;
  padding: 15px;
  background: #222;
  border-radius: 10px;
}

.comment {
  background: #333;
  padding: 10px;
  margin: 10px auto;
  border-radius: 5px;
}

.comment strong {
  color: #ffcc00;
}
.movieGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18%, 1fr));
  gap: 20px;
  padding: 10px 0;
}

.viewAllContainer {
  text-align: center;
  margin-top: 20px;
}
.progress-circle {
  width: 60px;
  height: 60px;
  position: relative;
  margin-top: 10px;
}
svg {
  width: 100%;
  height: 100%;
}
.circle-bg {
  fill: none;
  stroke: #eee;
  stroke-width: 3.8;
}
.circle {
  fill: none;
  stroke: #00b894;
  stroke-width: 3.8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
}
.percentage {
  fill: #333;
  font-size: 0.5em;
  text-anchor: middle;
}
.hidden {
  display: none;
}

/* ✅ Responsive Design */
@media (min-width: 1120px) {
  .search-icon-button {
    display: none !important;
  }

  .search-bar {
    display: flex !important;
    margin-left: 20px;
  }
}
@media (min-width: 600px) and (max-width: 1199px) {
  .nav {
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px 15px;
  }

  .nav__logo {
    height: 40px;
  }

  .nav__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
  }

  .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
  }

  .search-container {
    display: flex;
    align-items: center;
  }

  .search-icon-button {
    display: block;
    font-size: 1.6rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
  }

  .search-bar {
    display: none;
    position: fixed;
    top: 60px; /* below navbar */
    left: 0;
    right: 0;
    width: 100%;
    padding: 15px;
    background: #000;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 0;
  }

  .search-bar.active {
    display: flex;
    justify-content: center;
  }

  .search-bar input {
    width: 100%;
    max-width: 90%;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 25px;
    border: none;
  }

  h2 {
    font-size: 1.5rem;
  }

  .banner {
    height: auto;
    padding: 10px;
    display: flex;
  }

  .bannerContents {
    margin: auto;
    margin-top: 100px;
  }

  .bannerTitle {
    font-size: 1.2rem;
    font-weight: 800;
  }

  .bannerButtons {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .bannerButton {
    padding: 5px 10px;
    font-size: 1rem;
    background-color: #daa520;
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    border: none;
    cursor: pointer;
  }

  .bannerDescription {
    margin-top: 1rem;
    font-size: 1rem;
  }

  .movieCard,
  .continueWatchingCard {
    width: 200px;
    height: 250px;
  }

  .movieCard img,
  .continueWatchingCard img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
  }

  .continueWatchingCard h3 {
    font-size: 1rem;
    margin-top: 150px;
    background-color: #daa520;
  }

  .resume {
    padding: 5px 10px;
    font-size: 1rem;
    color: #fff;
    margin-top: 95%;
  }

  .modal-content {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    width: 95%;
    text-align: center;
  }

  .modal-content video {
    max-height: 200px;
    width: 100%;
  }
  .movieGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .viewAllContainer {
    text-align: center;
    margin-top: 20px;
    gap: 24px; /* spacing between columns AND rows */
    padding: 10px 0;
    justify-content: center;
  }
}
@media (max-width: 599px) {
  .nav {
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 10px 15px;
  }

  .nav__logo {
    height: 40px;
  }

  .nav__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
  }

  .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
  }

  .search-container {
    display: flex;
    align-items: center;
  }

  .search-icon-button {
    display: block;
    font-size: 1.6rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
  }

  .search-bar {
    display: none;
    position: fixed;
    top: 60px; /* below navbar */
    left: 0;
    right: 0;
    width: 100%;
    padding: 15px;
    background: #000;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border-radius: 0;
  }

  .search-bar.active {
    display: flex;
    justify-content: center;
  }

  .search-bar input {
    width: 100%;
    max-width: 90%;
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 25px;
    border: none;
  }

  h2 {
    font-size: 1.5rem;
  }

  .banner {
    height: auto;
    padding: 10px;
    display: flex;
  }

  .bannerContents {
    margin: auto;
    margin-top: 100px;
  }

  .bannerTitle {
    font-size: 1.2rem;
    font-weight: 800;
  }

  .bannerButtons {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .bannerButton,
  .modalButton {
    padding: 5px 10px;
    font-size: 1rem;
    background-color: #daa520;
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    border: none;
    cursor: pointer;
  }

  .bannerDescription {
    margin-top: 1rem;
    font-size: 1rem;
  }

  .movieCard,
  .continueWatchingCard {
    width: 200px;
    height: 250px;
  }

  .movieCard img,
  .continueWatchingCard img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
  }

  .continueWatchingCard h3 {
    font-size: 1rem;
    margin-top: 150px;
    background-color: #daa520;
  }

  .resume {
    padding: 5px 10px;
    font-size: 1rem;
    color: #fff;
    margin-top: 95%;
  }

  .modal-content {
    background: #222;
    padding: 20px;
    border-radius: 10px;
    width: 95%;
    text-align: center;
    position: relative;
    z-index: 2;
  }

  .modal-content video {
    max-width: 100%;
    max-height: 250px;
    border-radius: 10px;
    display: block;
    margin: auto;
    object-fit: contain;
    z-index: 2;
  }
  .modalButton {
    margin-top: 10px;
  }
  .movieGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 10px 0;
  }

  .viewAllContainer {
    text-align: center;
    margin-top: 20px;
  }
}
