@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

a {
  text-decoration: none;
  color: white;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: Inter;
  scroll-behavior: smooth;
}

.movie__list__spinner {
  font-size: 48px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  animation: spin 1000ms infinite;
}

@keyframes spin {
  0% {
    rotate: 0deg;
  }
  100% {
    rotate: 360deg;
  }
}

body {
  background-color: rgba(0, 0, 0, 0.86);
}

#header {
  background-image: url(assets/moviebackground2.jpg);
  background-position: center;
  background-size: 100% auto;
  background-attachment: fixed;
}

/* Movie Nav section */
.movie__background__wrapper {
  height: 450px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 60px 50px 0 rgb(5, 5, 5, 0.45);
  background-color: rgba(0, 0, 0, 0.9);
}

.movie__nav {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 0 80px;
  z-index: 1;
}

.movie__background__image {
  opacity: 30%;
}

.nav__left {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav__logo {
  width: 80px;
  margin-right: 32px;
}

.nav__image {
  max-width: 100%;
  filter: invert(0.9);
}

.nav__link {
  margin: 0 16px;
  font-weight: 200;
  font-size: 18px;
  padding-bottom: 4px;
  border-bottom: 1px transparent solid;
  transition:
    color 400ms ease,
    border-bottom-color 400ms ease;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__input__wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.nav__input__text {
  padding: 14px 4px 12px 40px;
  border-radius: 40px;
  width: 0px;
  background-color: transparent;
  color: #fff;
  border: none;

  transition: width 500ms ease;
  cursor: default;
}

.nav__input__text.active {
  width: 250px;
  background-color: transparent;
  border: 2px solid white;
  cursor: text;
}

.nav__input__text:focus {
  outline: none;
  background-color: transparent;
  border: 2px solid white;
}

.nav__search {
  position: absolute;
  right: 10px;
  color: white;
  cursor: pointer;
  font-size: 16px;
}

.nav__search.active {
  left: 15px; /* Position on the left when active */
  right: auto;
}

.nav__settings {
  color: white;
  cursor: pointer;
  font-size: 18px;
}

.nav__link:hover {
  color: red;
  text-decoration: underline;
  text-underline-offset: 8px;
}

/* Movie Background Text */

.movie__background__text {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #fff;
  width: 100%;
  padding: 0 16px;
}

.movie__background__title {
  font-size: 60px;
  font-weight: 200;
  margin-top: 80px;
  margin-bottom: 12px;
}

.span__title {
  color: red;
}

.span__title2 {
  color: red;
}

.movie__background__para {
  font-size: 20px;
  font-weight: 300;
  margin-bottom: 40px;
  width: 100%;
}

.movie__input__wrapper {
  position: relative;
}

.movie__background__input {
  padding: 24px 50px 24px 30px;
  border-radius: 40px;
  background-color: transparent;
  color: #fff;
  border: 2px #fff solid;
  font-size: 20px;
  transition: 400ms ease;
  max-width: 100%;
}

.movie__background__input:focus {
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
  outline: none;
}

.movie__background__search {
  position: absolute;
  font-size: 24px;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  transition: 400ms ease;
  cursor: pointer;
}

/* Movies Section */

.container {
  padding: 80px 0;
}

.row {
  margin: 0 40px;
}

.movies__content {
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.movies__searchbar {
  width: 90%;
  display: flex;
  justify-content: start;
  align-items: center;
}

.movies__title__top {
  font-size: 32px;
  font-weight: 200;
}

.movies__search__result {
  padding: 8px 0;
  margin-left: 24px;
  font-weight: 300;
  text-shadow:
    1px 1px 10px crimson,
    1px 1px 10px crimson;
  color: crimson;
  border-bottom: 1.5px crimson solid;
  font-size: 24px;
  display: none;
}

.movies__list {
  margin-top: 60px;
  width: 90%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  position: relative;
}

.movie {
  width: 198px;
  margin: 24px 8px;
  background-color: #1e1e1e;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 12px 0px rgb(5, 5, 5, 0.45);
  position: relative;
}

.movie__image__wrapper {
  background-color: #1e1e1e;
  width: 100%;
  max-height: 288px;
  overflow: hidden;
  z-index: 1;
}

.movie__image {
  width: 100%;
  max-height: 288px;
  height: 288px;
  transition: all 400ms ease;
  z-index: -2;
}

.movie__info__title {
  position: absolute;
  text-align: left;
  color: #fff;
  font-size: 20px;
  top: 24px;
  left: 16px;
  opacity: 0;
  transition: opacity 400ms ease;
}

.movie__info__list {
  position: absolute;
  top: 45%;
  left: 8px;
  transform: translateY(-50%);
  width: 90%;
  z-index: 1;
  opacity: 0%;
  transition: opacity 200ms;
}

.movie__info:firstchild {
  margin-top: 60px;
}

.movie__info__icon {
  color: white;
}

.movie__info__text {
  font-size: 15px;
  font-weight: 600;
}

.movie__info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  padding: 0 8px;
  color: #fff;
}

.movie__info1 {
  margin-top: 60px;
}

.movie__title {
  font-weight: 200;
  font-size: 14px;
  margin: 8px 0 24px 0;
  padding: 0 8px;
  color: #fff;
  text-align: center;
}

.movie__image__wrapper:hover .movie__image {
  filter: opacity(80%) blur(2px) brightness(60%);
  background-color: #242424;
  scale: 1.05;
}

.movie__image__wrapper:hover .movie__info__list {
  opacity: 100%;
}

.movie__image__wrapper:hover .movie__info__title {
  opacity: 100%;
}

@media (max-width: 640px) {
  /* Title */
  .span__title2,
  .movie__background__para {
    font-size: 18px;
  }

  .movie__background__title,
  .span__title {
    font-size: 40px;
  }

  .movie__background__input {
    padding: 18px 20px 15px 15px;
    font-size: 18px;
  }

  .movie__background__search {
    font-size: 22px;
  }
}

@media (max-width: 640px) {
  /* Nav */

  .nav__logo,
  .nav__search {
    margin-right: 8px;
    display: none;
  }

  .nav__left,
  .nav__right {
    margin-top: 20px;
  }

  .nav__left {
    transform: translateX(-15px);
  }

  .nav__link {
    font-size: 16px;
  }

  /* Movie List */
}

@media (max-width: 768px) {
  .movies__list {
    width: 120%;
  }
  .movie {
    width: 180px;
  }
}
