/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Global styles */
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background-color: #121212;
  color: #ffffff;
}

/* Header styles */
header {
  background-color: #1c1c1c;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

nav h1 {
  margin: 0;
  color: #ff5722;
}

.search-bar-icon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Navigation links */
.nav-links {
  list-style: none;
  margin: 1rem 0 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem; /* Adjusted gap */
}

.nav-links li {
  margin: 0.3rem; /* Adjusted margin */
  padding: 0.3rem 0.8rem; /* Adjusted padding */
  border: 2px solid #ff5722;
  border-radius: 5px;
  background-color: #282828;
  transition: background-color 0.3s, color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-links li:hover,
.nav-links li:focus {
  background-color: #ff5722;
  color: white;
}

.nav-links li a {
  color: inherit;
  text-decoration: none;
  width: 100%;
  text-align: center;
}

.nav-links li:focus {
  outline: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 25px;
  height: 25px;
  cursor: pointer;
  padding: 15px 10px 10px 10px;
}

.menu-icon .line {
  width: 100%;
  height: 3px;
  background: white;
  transition: all 0.3s;
}

.nav-links.active {
  display: flex;
}

.search-container {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 600px;
  margin-top: 1rem;
}

nav input {
  padding: 0.5rem;
  border-radius: 4px;
  border: none;
  outline: none;
  flex-grow: 1;
}

nav button {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  outline: none;
  background-color: #ff0000;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
  min-width: 100px;
}

nav button:hover {
  background-color: #800000;
}

#search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  color: #000;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  display: none;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1001;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-item:hover {
  background-color: #d3d3d3;
}

.search-item img {
  width: 50px;
  height: 75px;
  object-fit: cover;
  margin-right: 10px;
}

.search-item h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: normal;
}

/* Category title styles */
.category-title {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ff5722;
  height: 2rem;
}

.category-title .vertical-line {
  width: 5px;
  height: 2rem;
  background: #ff5722;
  margin-right: 10px;
}

/* Content grid styles */
.content-grid {
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8)); /* Enhanced gradient for smooth transition */
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.grid div {
  flex: 0 0 calc(20% - 1rem);
  background-color: #282828;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s;
}

.grid div:hover {
  transform: scale(1.05);
}

.grid div img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #1c1c1c;
  margin-top: 1rem;
}

/* Responsive styles */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center; /* Center the links */
    gap: 0.5rem;
    background-color: #1c1c1c;
    padding: 1rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    box-sizing: border-box; /* Add this line */
  }

  .nav-links li {
    width: 100%; /* Ensure full width */
    margin: 0.2rem 0;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box; /* Add this line */
  }

  .nav-links li a {
    width: 100%; /* Ensure full width for the links */
  }

  .menu-icon {
    display: flex;
  }

  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  nav .search-container {
    margin-top: 0.5rem;
    width: auto;
  }

  nav input,
  nav button {
    width: auto;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .grid div {
    flex: 0 0 calc(100% - 1rem);
  }

  .category-title {
    font-size: 1.2rem;
  }

  nav h1 {
    font-size: 1.5rem;
  }

  footer p {
    font-size: 0.8rem;
  }
}

/* Featured content styles */
.featured-content {
  position: relative;
  width: 100%;
  height: 70vh; /* Adjusted height */
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)); /* Adjusted gradient to match fade colors */
}

.carousel {
  display: flex;
  height: 100%;
  transition: transform 1s ease-in-out;
}

.featured-item {
  position: relative;
  min-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  background-size: cover;
  background-position: center;
}

#featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fade-bottom {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.9)); /* Updated gradient to blend smoothly */
}

.featured-details {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  color: #fff;
}

.rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.rating img {
  width: 50px;
  height: auto;
  margin-right: 0.5rem;
}

.rating span {
  font-size: 1.5rem;
  color: #ff5722;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 2;
}

.carousel-nav button {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  transition: background 0.3s;
}
.carousel-nav button:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Continue watching section styles */
#continue-watching-grid .grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  transition: transform 0.3s;
  cursor: pointer;
}

#continue-watching-grid .grid-item:hover {
  transform: scale(1.05);
}

#continue-watching-grid .grid-item img {
  width: 100%;
  height: auto;
  display: block;
}

#continue-watching-grid .movie-details {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.5rem;
  text-align: center;
  border-radius: 0 0 10px 10px; /* Rounded corners on both sides */
  display: flex;
  justify-content: center;
  align-items: center;
}

#continue-watching-grid .movie-details .title {
  display: none; /* Hide the movie title */
}

#continue-watching-grid .movie-details .position {
  font-size: 0.9rem;
  margin: 0 auto;
  text-align: center;
  flex: 1; /* Ensure text is centered */
  padding-right: 0.9rem; /* Adjustment to center the text */
}

/* Responsive grid for different screen sizes */
#continue-watching-grid {
  display: grid;
  gap: 1rem;
}

@media (max-width: 768px) {
  #continue-watching-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile devices */
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  #continue-watching-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columns on medium-sized screens (e.g., tablets, small laptops) */
  }
}

@media (min-width: 1201px) {
  #continue-watching-grid {
    grid-template-columns: repeat(5, 1fr); /* 5 columns on larger screens (e.g., desktops, large laptops) */
  }
}

/* Cross button styles */
.cross-button {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 87, 34, 0.8);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.cross-button:hover {
  background: rgba(255, 87, 34, 1);
}

.cross-button:focus {
  outline: none;
}

/* Footer Links and Discord Icon */
.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 0.7rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: #ff5722;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: #ff8a50;
}

.banner {
  background-color: #000; /* Black background */
  color: #b4b4b4; /* White text color */
  text-align: center;
  width: 100%;
  height: 5rem;
}

.banner p {
  padding-top: 17px;
}
.banner a {
  color: #ff5722; /* White link color */
  font-weight: bold;
  text-decoration: none; /* Remove underline from links */
}


.dmca-notice {
  display: none;
  background-color: #f8f8f8;
  color: #333;
  padding: 20px;
  text-align: center;
  margin-top: 20px;
}

.dmca-notice.visible {
  display: block;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}