/* Base */
* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: #1d203d;
  font-family: "Poppins", sans-serif;
}

a {
  color: #ebe5e2;
  text-decoration: none;
}

/* Navbar */
.navbar {
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  -webkit-box-pack: justify;
          justify-content: space-between;
  width: 100%;
  background-color: #2c2f53;
}

@media (max-width: 450px) {
  .navbar {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
            flex-direction: column;
  }
}

.navbar__logo {
  margin-left: 20px;
}

@media (max-width: 450px) {
  .navbar__logo {
    margin-left: 0;
    margin-bottom: 10px;
    font-size: 3rem;
  }
}

@media (max-width: 320px) {
  .navbar__logo {
    font-size: 2.5rem;
  }
}

.navbar__searchbar {
  padding: 10px 20px;
  margin: 20px;
  color: #2c2f53;
  background-color: #ebe5e2;
  border-color: #1d203d;
  border-radius: 20px;
  border-style: solid;
  outline: none;
  font-family: "Poppins", sans-serif;
}

@media (max-width: 450px) {
  .navbar__searchbar {
    margin: 0;
    margin-bottom: 20px;
  }
}

.navbar__searchbar::-webkit-input-placeholder {
  color: #2c2f53;
}

.navbar__searchbar::-ms-input-placeholder {
  color: #2c2f53;
}

.navbar__searchbar::placeholder {
  color: #2c2f53;
}

/* Main */
.main {
  display: grid;
  grid-template-columns: repeat(auto-fill, 300px);
  -webkit-box-pack: center;
          justify-content: center;
  gap: 0 50px;
}

@media (max-width: 320px) {
  .main {
    grid-template-columns: repeat(auto-fill, 220px);
  }
}

.card {
  margin: 20px 0;
  background-color: #2c2f53;
  border-radius: 8px;
  -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.22);
          box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.22);
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  cursor: pointer;
}

.card:hover {
  opacity: 0.9;
  -webkit-box-shadow: 0 10px 10px rgba(0, 0, 0, 0.4), 0 6px 6px rgba(0, 0, 0, 0.44);
          box-shadow: 0 10px 10px rgba(0, 0, 0, 0.4), 0 6px 6px rgba(0, 0, 0, 0.44);
}

.card__img {
  max-width: 100%;
  width: 300px;
  height: 450px;
  border-radius: 8px 8px 0 0;
  pointer-events: none;
}

@media (max-width: 320px) {
  .card__img {
    height: 320px;
  }
}

.card__info {
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
          align-items: center;
  margin: 0 20px 10px;
  pointer-events: none;
}

.card__title {
  width: 100%;
  color: #ebe5e2;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 320px) {
  .card__title {
    font-size: 0.8rem;
  }
}

.card__rating {
  padding: 5px;
  background-color: #1d203d;
  border-radius: 5px;
  font-weight: bold;
}

.card__rating--green {
  color: greenyellow;
}

.card__rating--orange {
  color: orange;
}

.card__rating--red {
  color: orangered;
}

/* Modal */
.modal {
  position: relative;
  max-width: 80%;
  display: -webkit-box;
  display: flex;
  -webkit-box-align: center;
          align-items: center;
  color: #ebe5e2;
  background-color: #1d203d;
  border-radius: 8px;
  -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.22);
          box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 6px 6px rgba(0, 0, 0, 0.22);
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.3rem;
  font-weight: 800;
  cursor: pointer;
}

.modal__close:hover {
  color: #708ed2;
}

.modal__img {
  width: 400px;
  border-radius: 8px 0 0 8px;
}

@media (max-width: 1017px) {
  .modal__img {
    display: none;
  }
}

.modal__info {
  padding: 0 50px;
}

@media (max-width: 450px) {
  .modal__info {
    padding: 0 20px;
    font-size: 0.8rem;
  }
}

.modal__title {
  max-width: 22ch;
  font-size: 1.7rem;
  margin-right: 20px;
}

@media (max-width: 450px) {
  .modal__title {
    font-size: 1.3rem;
  }
}

.modal__genre {
  margin-bottom: 60px;
  color: #708ed2;
  font-weight: 500;
}

@media (max-width: 1017px) {
  .modal__genre {
    margin-bottom: 30px;
  }
}

.modal__desc {
  max-width: 40ch;
  max-height: 230px;
  margin-bottom: 30px;
  font-weight: 300;
  overflow: hidden;
}

.modal__duration, .modal__release {
  color: #708ed2;
  font-weight: 300;
}

.modal__duration strong, .modal__release strong {
  font-weight: 500;
}

.modal__background {
  position: fixed;
  top: 0;
  left: 0;
  display: -webkit-box;
  display: flex;
  -webkit-box-pack: center;
          justify-content: center;
  -webkit-box-align: center;
          align-items: center;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  -webkit-transition: visibility 0s, opacity 0.5s;
  transition: visibility 0s, opacity 0.5s;
}

.modal__background--active {
  visibility: visible;
  opacity: 1;
}
