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

:root {
  --color-primary: #020d18;
  --color-secondary: #f1c40f;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--color-primary);
  color: #fff;
  position: relative;
  overflow-x: hidden;
}
a {
  color: #fff;
  text-decoration: none;
}

.header {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-block: 1rem;
}
@media screen and(max-width:450px) and (min-width: 300px) {
  .header .logo {
    margin: 0 auto 0 0;
  }
  .header-a {
    margin-inline: 0.8rem;
    font-size: 14px;
  }
  .swiper-slide {
    padding: 1rem;
  }
}
.header a {
  margin-left: 1.5rem;
}
.header a:hover {
  color: #f1c40f;
}
.logo {
  margin: 0 auto 0 2rem;
  font-weight: 800;
}
.header-a {
  margin: 0 2rem 0 auto;
}

.now-playing {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: url(showcase-bg.jpg) no-repeat center center/cover;
  width: 100vw;
  height: 100%;
}
.now-playing h2 {
  margin-inline: auto;
  margin-block: 2rem;
}
.search {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}
.search-radio label {
  margin-right: 1rem;
}
.search-radio {
  margin-bottom: 0.6rem;
}
.search-radio input {
  margin-left: 0.5rem;
}
.search-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.search-flex input {
  flex: 6;
  width: 100%;
  background: transparent;
  border: 1px solid #fff;
  padding: 1rem;
  padding-right: 10rem;
  border-radius: 5px;
  color: #fff;
  height: 3rem;
  margin-right: 0.7rem;
}
.search-flex input::placeholder {
  color: #fff;
}
.search-flex input:focus {
  outline: none;
}
.text-primary {
  color: var(--color-secondary);
}

.text-secondary {
  color: var(--color-secondary);
}
.btn {
  background-color: var(--color-secondary);
  padding: 1rem;
  border-radius: 99999px;
  cursor: pointer;
  padding: 0.8rem;
  color: #000;
}
.btn:hover {
  background-color: transparent;
  color: black;
  outline: none;
}
.btn:disabled {
  border-color: #ccc;
  cursor: not-allowed;
}

.btn:disabled:hover {
  background: transparent;
  color: #fff;
}
.popular-movies,
.popular-shows,
#search-results {
  width: 80vw;
  text-align: center;
  margin: 0 auto;
  background: linear-gradient(
    21deg,
    rgb(51, 41, 41),
    rgb(105, 78, 78),
    #050505
  );
  padding: 2rem;
  margin-top: 1rem;
  margin-inline: auto;
  border-radius: 1rem;
}
.popular-movies h2,
.popular-shows h2 {
  margin-top: 1rem;
  margin-inline: auto;
}

.footer {
  display: flex;
  justify-content: space-around;
  margin-top: 1.2rem;

  width: 90vw;
  font-size: 20px;
  margin-inline: auto;
}
.social-links {
  margin-right: 2rem;
}

.back-to {
  margin-top: 3rem;
  margin-bottom: 1rem;
  margin-inline: auto;
  background-color: var(--color-primary);
  border: 1px solid var(--color-secondary);
  width: fit-content;
  color: #fff;
}
.back-to:hover {
  /* transform: scale(0.9); */
  background-color: var(--color-secondary);
  border: 1px solid var(--color-primary);
  color: #020d18;
}
.active {
  color: var(--color-secondary);
  font-weight: 700;
}

.card {
  position: relative;
  background: transparent;
  padding: 0.3rem;
  margin-top: 2rem;
  max-height: 550px;
  max-width: 350px;
  object-fit: cover;
  /* z-index: -1; */
  overflow-y: hidden;
  overflow-x: hidden;
}

/* .card img {
  width: 100%;
  height: 100%;
  min-width: fit-content;
} */

.card .card-body {
  position: absolute;
  bottom: -6rem;
  padding: 10px;
  width: 100%;
  background: linear-gradient(rgba(37, 37, 37, 0.6), rgba(0, 0, 0, 0.7));
  /* padding-bottom: 20px; */
  font-size: 20px;
  background: transparent;
  text-align: center;
  margin: 0;
  height: 6rem;
  border-radius: 5px;
}

.card:hover .card-body {
  transform: translateY(-80px);
  transition: all 0.5s ease-in-out;
  background: rgba(21, 17, 17, 0.8);
}

.card .card-img-top {
  width: 100%;
  height: 100%;
  margin-right: 60px;
  object-fit: cover;
  background: #708ba5;
  padding: 0.3rem;
  max-height: fit-content;
  z-index: 1;
  border-radius: 6px;
}

.card-img-top:hover {
  transform: scale(0.95);
  box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24),
    0 17px 50px 0 rgba(0, 0, 0, 0.19);
  transition: all 0.5s ease-in-out;
}
.grid {
  /* display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center; */

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 20px;
}
.details-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 0;
}
.movie-details,
.show-details {
  width: 80vw;
  margin-inline: auto;

  border-radius: 1rem;
  /* background: #06012d; */
  padding: 1.5rem;
  /* border: 0.5rem solid var(--color-secondary); */
  /* overflow-y: hidden; */
}
.show-details .card-img-top,
.movie-details .card-img-top {
  border: 6px solid black;
  margin-right: 60px;
}
.details {
  width: 21rem;
  height: 90%;
}

.details-middle {
  width: 100%;
  height: auto;
}

@media (max-width: 700px) {
  .details-top {
    display: block;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: #ccc solid 1px;
  }
}

.details-top p {
  margin: 20px 0;
}

.button {
  height: 3rem;
  margin-top: 2rem;
  padding: 1rem;
  width: fit-content;
  color: #020d18;
}
.button:hover {
  transform: scale(0.9);
  color: #fff;
  border: 1px solid rgb(253, 249, 255);
  box-shadow: 0 12px 16px 0 rgba(0, 0, 0, 0.24),
    0 17px 50px 0 rgba(0, 0, 0, 0.19);
}

.details-bottom li {
  margin: 1rem 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #fff;
  border-color: rgba(255, 255, 255, 0.1);
}
.details-bottom {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
}
.details-bottom h2 {
  margin-inline: auto;
}

#search-results-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-block-start: 2rem;
}

.swiper {
  width: 100%;
  height: 50%;
}

.swiper-slide {
  text-align: center;
  font-size: 18px;
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-block-end: 4rem;
  background: transparent;
  border: 4px solid black;
  /* max-width: 350px; */
}
.swiper-slide:hover {
  transform: scale(0.9);
  transition: all 0.5s ease-in-out;
}

.swiper-slide img {
  display: block;
  margin-top: 2rem;
  max-height: 360px;
  width: 100%;
  height: 80%;
  object-fit: cover;
}

.swiper-rating {
  padding: 10px;
}

.alert {
  padding: 10px 20px;
  margin-bottom: 20px;
  border-radius: 5px;
  text-align: center;
}
#alert {
  width: auto;
}

.success {
  background: green;
}

.error {
  background: red;
}
#pagination {
  display: flex;
  justify-content: center;
}
.page-counter {
  margin-top: 1rem;
  text-align: center;
}
