* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #0f0f23;
}

header {
  background-color: rgb(19, 19, 45);
  height: 80px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navigation-container {
  width: 100%;
  margin: 0 100px;
  /* padding: 0 20px; */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  color: #ffffff;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 1.5px;
  display: flex;
  align-items: center;
}

.nav-menu ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-menu li {
  font-size: 18px;
  font-weight: 600;
  color: #b3b3b3;
  cursor: pointer;
  transition: color 0.3s ease;
}

.nav-menu li:hover {
  color: #ffffff;
}

.nav-menu li.active {
  color: #ffffff;
  position: relative;
}

.search-wrapper {
  display: flex;
  align-items: center;
}

.search-input {
  height: 40px;
  width: 300px;
  padding: 0 20px;
  border-radius: 20px;
  border: 1px solid transparent;
  background-color: rgb(51, 51, 81);
  color: white;
  font-size: 16px;
  outline: none;
  transition: all 0.3s ease;
}

.search-input::placeholder {
  color: #b3b3b3;
}

.search-input:focus {
  background-color: #3e3e63;
  border-color: #b3b3b3;
}

.content {
  color: white;
}

.tvTab__link {
  text-decoration: none;
  color: #b3b3b3;
}

/* hero */

.hero {
  margin: 0 100px;
  font-family: "Poppins", sans-serif;
  padding: 2rem;
}

.hero__title {
  color: #fff;
  font-size: 3.2rem;
  font-weight: 600;
  margin-top: 2rem;
}
.hero__subtitle {
  color: #868686;
  font-size: 2.2rem;
  font-weight: 400;
}

.hero {
  padding: 30px 100px;
  color: #fff;
}

.hero__title {
  font-size: 40px;
  margin-bottom: 10px;
}

.hero__subtitle {
  font-size: 18px;
  margin-bottom: 30px;
  color: #b3b3b3;
}

.hero__container {
  position: relative;
  height: 500px;
}

.hero__slide {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 24px;
  background-size: cover;
  background-position: center;
}

.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2));
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 50%;
}

.hero__movie-title {
  font-size: 24px;
  margin-bottom: 8px;
}

.hero__movie-description {
  font-size: 14px;
  color: #d0d0d0;
}

.hero__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}

.hero__nav--prev {
  left: 16px;
}

.hero__nav--next {
  right: 16px;
}

/* popular moives */

.movie-content,
.tvshows-content {
  margin: 0 150px;
  margin-top: 100px;
}

.tvshows-content {
  margin-bottom: 30px;
}

.popular {
  font-size: 2.5rem;
  font-weight: 600;
  color: #e5e5e5;
  border-left: 4px solid #e50914;
  padding-left: 10px;
  margin-bottom: 30px;
  margin-top: 40px;
}

.movies,
.tvs {
  display: flex;
}

.movie-props {
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.movie-props:hover {
  transform: scale(1.01);
  z-index: 2;
}

.movie-img {
  width: 100%;
  height: auto;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.movie-name {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #b3b3b3;
  transition: color 0.3s;
  padding-left: 0;
  width: 100%;
}

.movie-props:hover .movie-name {
  color: white;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  width: 300px;
  flex-shrink: 0;
}

.swiper-button-next,
.swiper-button-prev {
  color: white;
  background-color: #0f0f23;
  height: 80px;
  width: 80px;
  border-radius: 40px;
  opacity: 0.6;
  transition: opacity 0.25s;
  margin-left: 10px;
  margin-right: 10px;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  opacity: 0.9;
}

.main-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  margin-bottom: 50px;
}

.page-btn {
  padding: 12px 18px;
  background: #313163;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 16px;
  margin: 0 30px;
  transition: all 0.3s;
}

.page-btn:hover {
  background-color: white;
  color: #313163;
}

.page-numbers {
  display: flex;
  gap: 6px;
}

.page-number {
  padding: 6px 12px;
  background-color: #0f0f23;
  color: #fff;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s;
}

.page-number:hover {
  background-color: white;
  color: #313163;
  border-radius: 20px;
}

.page-number.active {
  background: #1e1e5c;
  border-radius: 30px;
}

.hide {
  display: none;
}

.details-card {
  max-width: 900px;
  margin: 60px auto;
  padding: 30px;
  background: #1a1a1a;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.details-card img {
  width: 320px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.details-card h1 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #ffdd57;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
}

.details-card p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 10px 0;
  color: #ccc;
}

.details-card strong {
  color: #ffdd57;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tvseries-container {
  padding: 4rem;
}

.related-section {
  max-width: 1000px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

.related-section h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #ffdd57;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}

.related-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
  padding-bottom: 10px;
}

.related-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.related-card h3 {
  font-size: 0.95rem;
  margin: 8px;
  color: #ffffff;
}

.related-card p {
  font-size: 0.85rem;
  color: #ffdd57;
  margin-bottom: 6px;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

@media only screen and (max-width: 50em) {
  /* body {
    background-color: red;
  } */
  header {
    height: 14rem;
  }

  .navigation-container {
    flex-direction: column;
    gap: 1rem;
    margin: 0;
  }
  .hero {
    margin: 0;
    padding: 2rem;
  }

  .hero__title {
    font-size: 3rem;
    font-weight: 600;
    margin-top: 2rem;
  }
  .hero__subtitle {
    font-size: 2rem;
  }
  .swiper-slide {
    width: 300px;
  }

  .movies-swiper,
  .tvs-swiper {
    padding: 0.5rem 0.25rem;
  }

  /* swiper wrapper */
  .swiper-wrapper {
    align-items: stretch;
  }

  .swiper-slide.movie-props {
    width: 9.5rem; /* KEY: controls slidesPerView:auto */
    border-radius: 0.875rem;
    overflow: hidden;
    transition: transform 0.2s ease;
  }

  .swiper-slide.movie-props:active {
    transform: scale(0.96);
  }

  /* image */
  .movie-img {
    width: 100%;
    height: 14rem;
    object-fit: cover;
    border-radius: 0.875rem;
    display: block;
  }

  /* title */
  .movie-name {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: center;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* swiper arrows smaller */
  .swiper-button-next,
  .swiper-button-prev {
    transform: scale(0.8);
  }

  /* pagination closer */
  .swiper-pagination {
    bottom: 0.25rem;
  }
  .swiper-button-next,
  .swiper-button-prev {
    height: 40px;
    width: 40px;
    border-radius: 40px;
    margin-left: 10px;
    margin-right: 10px;
  }

  .movie-content,
  .tvshows-content {
    margin: 2rem;
    margin-top: 100px;
  }
}
