@import url('https://fonts.googleapis.com/css2?family=Mulish&display=swap');

body {
  font-family: 'Mulish', sans-serif;

  background-origin: center;
  background-repeat: no-repeat;
  position: relative;
  background-size: cover;
  overflow-x: hidden;
}

.body-overlay {
  z-index: -1;
  display: block;
  position: absolute;
  background-image: url(../img/bg-9531.png);
  background-size: cover;
  height: 70vh;
  width: 100%;
}

.body-overlay-movie {
  position: absolute;
  width: 100%;
  height: 60vh;
  /* margin-top: 80px; */
  background-position: top;
  background-size: cover;
}
.body-overlay-movie:after {
  content: '';
  position: absolute;
  display: inline-block;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0.6;
}

.navbar {
  z-index: 10;
  background-color: rgba(0, 0, 0, 0.8);
  margin-bottom: 50px;
}

.navbar-brand {
  display: inline-block;
  width: 170px;
  height: 65px;
  background-image: url('../img/filmi.png');
  background-size: 75%;
  background-repeat: no-repeat;
  background-position: center;
}

.navbar-nav {
  flex-direction: row;
}

.navbar-nav li:not(:first-child) {
  padding-right: 0;
  padding-left: 20px;
}

.navbar-nav li a {
  color: white;
  text-decoration: none;
}

.jumbotron {
  background-color: transparent !important;
}

.movies {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

@media (max-width: 992px) {
  .movie .img-box img {
    margin-top: 40px;
    width: 95%;
  }

  .movie h3 {
    color: white;
    font-size: 35px;
  }
}

@media (max-width: 768px) {
  .movie .img-box img {
    display: none;
  }
}
@media (width: 768px) {
  .movie .img-box img {
    margin-top: 20px;
    margin-bottom: 20px;
    width: 90%;
  }
}

@media (max-width: 554px) {
  .navbar .container {
    justify-content: center;
  }

  .navbar-brand {
    background-size: 100%;
    background-repeat: no-repeat;
    background-position: center left;
    margin-right: 0 10px 0 0;
    width: 100px;
  }

  .movie h3 {
    font-size: 25px;
  }
}

@media (max-width: 390px) {
  .navbar {
    padding-bottom: 20px;
  }
  .navbar-nav {
    width: 100%;
    justify-content: center;
  }
  .navbar-brand {
    margin-bottom: 10px;
  }
}

#search-form {
  position: relative;
}

.search-btn {
  position: absolute;
  top: 0;
  height: 100%;
  width: 40px;
  right: 0;
  z-index: 100;
  background-color: #fff;
  border: 0;
  outline: 0;
  cursor: pointer;
  border-radius: 4px;
}

.search-btn:focus {
  border: 0;
  outline: 0;
  cursor: pointer;
  box-shadow: none;
}

.search-btn span {
  color: rgba(0, 0, 0, 0.9);
}

.movies .item img {
  width: 100%;
}

.movies .item {
  position: relative;
  display: flex;
  justify-self: center;
}

.movies .title-box {
  position: absolute;
  text-align: center;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: all 0.2 ease;
  display: grid;
  justify-content: center;
  justify-items: center;
  align-content: center;
  align-items: center;
}

.movies .item:hover .title-box {
  opacity: 1;
  transition: all 0.2 ease;
}

.movies .item .overlay {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: black;
  opacity: 0;
  transition: all 0.2 ease;
}

.movies .item:hover .overlay {
  opacity: 0.5;
  transition: all 0.2 ease;
}
.movies .title-box .btn-blue-normal {
  background-color: skyblue;
  border-radius: 10%;
  color: white;
  width: 40px;
  height: 40px;
  text-decoration: none;
  display: block;
  display: grid;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.watchlist .title-box,
.favlist .title-box {
  text-align: center;
  opacity: 1;
  transition: all 0.2 ease;
  background-color: transparent;
  width: 100%;
  height: 100%;
  bottom: 0;
  left: 0;
  position: absolute;
}

.watchlist .title-box .select-remove,
.favlist .title-box .select-remove {
  width: 100%;
  background-color: darkgray;
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: max-content;
  justify-content: space-around;
  position: absolute;
}

.watchlist .item:hover .title-box,
.favlist .item:hover .title-box {
  opacity: 1;
}

.watchlist .title-box .btn-blue,
.favlist .title-box .btn-blue {
  background-color: rgba(10, 20, 43, 0.7);
  width: 40px;
  height: 40px;
  border-radius: 0 0 50% 0;
  border: 0;
  position: absolute;
  display: inline-block;
  color: white;
  display: grid;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.watchlist .title-box .btn-red,
.favlist .title-box .btn-red {
  background-color: rgba(10, 20, 43, 0.7);
  width: 40px;
  height: 40px;
  border-radius: 0 0 0 50%;
  position: absolute;
  color: white;
  display: inline-block;
  display: grid;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  justify-self: right;
}

.watchlist .title-box .btn-blue,
.favlist .title-box .btn-red {
  font-size: 18px;
}
.watchlist .title-box .btn-red .favlist .title-box .btn-red {
  outline: 0 !important;
  font-size: 20px;
}

.watchlist .title-box .btn-red:hover,
.favlist .title-box .btn-red:hover {
  background-color: #e84a5f;
}
.watchlist .title-box .btn-blue:hover,
.favlist .title-box .btn-blue:hover {
  background-color: #3fc5f0;
}

/* MOVIE */

#item-rating {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}

#item-rating span {
  display: flex;
  margin-bottom: 10px;
}

#item-rating span.imdb::before {
  margin-right: 5px;
  content: '';
  width: 50px;
  height: 20px;
  background-image: url(../img/imdb.png);
  background-repeat: no-repeat;
  background-size: 70%;
  background-position: center;
  display: inline-block;
}

#item-rating span.RT::before {
  margin-right: 5px;
  content: '';
  width: 50px;
  height: 20px;
  display: inline-block;
  background-size: 45%;
  background-image: url(../img/rotten-tomatoes.png);
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
}

#item-rating span.metacritic::before {
  margin-right: 5px;
  content: '';
  width: 50px;
  height: 20px;
  background-image: url(../img/metacritic.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
}

#item-rating span.tmdb:before {
  margin-right: 5px;
  content: '';
  width: 50px;
  height: 20px;
  background-size: 70%;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  background-image: url(../img/tmdb.png) !important;
}

#item-rating span.animelist:before {
  margin-right: 5px;
  content: '';
  width: 50px;
  height: 20px;
  background-size: 70%;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  background-image: url(../img/mal-logo.jpg) !important;
}

#item-rating span.kitsu:before {
  margin-right: 5px;
  content: '';
  width: 50px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
  background-size: 80%;
  background-image: url(../img/kitsu.png) !important;
}

.list-group-item {
  background-color: rgba(0, 0, 0, 0.75);
}

.user-add {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

.add-watchlist {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  background-color: #ccc;
  color: gray;
  border-radius: 5px;
  width: 36px;
  height: 30px;
}

.imdb-link {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  background-color: #ccc;
  color: gray;
  border-radius: 5px;
  position: relative;
  font-size: 15px;
  font-weight: bold;
  width: 36px;
  height: 30px;
}

.imdb-link:hover {
  color: #d8a431;
}

.imdb-link a {
  display: inline-block;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.add-watchlist:hover {
  color: #4fb783;
}

.add-favorite {
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: gray;
  background-color: #ccc;
  cursor: pointer;
  border-radius: 5px;
  width: 36px;
  height: 30px;
}

.add-favorite:hover {
  color: #e84a5f;
}

/* watchlist page */
.watchlist,
.favlist {
  margin: auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 1fr;
  grid-gap: 20px;
  justify-content: start;
  margin-bottom: 30px;
}

.pagination-wrapper {
  margin-bottom: 20px;
}

@media (min-width: 1600px) {
  .watchlist,
  .favlist {
    grid-template-columns: repeat(7, 1fr);
  }
}

@media (max-width: 1200px) {
  .watchlist,
  .favlist {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .watchlist,
  .favlist {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .watchlist,
  .favlist {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 554px) {
  .watchlist,
  .favlist {
    grid-template-columns: repeat(2, 1fr);
  }
}

.watchlist .item,
.favlist .item {
  position: relative;
  display: flex;
  justify-self: center;
}

.watchlist .item img,
.favlist .item img {
  width: 100%;
}

.fav-watch {
  flex-direction: row;
  background-color: rgba(10, 20, 43, 0.7);
  height: 15%;
  display: grid;
  grid-gap: 10px;
  grid-auto-flow: column;
  justify-content: center;
  align-items: stretch;
  z-index: 100;
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 30px;
}

.fav-watch .imdb-rate {
  display: flex;
  align-content: center;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 15px;
}

.fav-watch .fav-btn {
  text-align: center;
  align-self: center;
  justify-content: center;
  color: white;
  width: 50px;
}

.fav-watch .like-btn {
  text-align: center;
  align-self: center;
  justify-content: center;
  color: white;
  width: 50px;
}

.fav-watch .like-btn:hover {
  color: #e84a5f;
}

.in-watchlist {
  color: green;
}

.in-favorite {
  color: crimson;
}

.modal-container {
  background-color: rgba(0, 0, 0, 0.6);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
}

.modal-container.show-modal {
  display: block;
  opacity: 1;
}

.modali {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  position: absolute;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  width: 400px;
  animation-name: modalopen;
  animation-duration: var(--modal-duration);
}

.modali-header {
  background-color: tomato;
  color: #fff;
  padding: 15px;
  position: relative;
}

.modali-header h3 {
  margin: 0;
}

.modali-content {
  padding: 20px;
}

.modali-form div {
  margin: 15px 0;
}

.modali-form label {
  display: block;
  margin-bottom: 5px;
}

.modali-form .form-input {
  padding: 8px;
  width: 100%;
}

.close-btn {
  background: transparent;
  font-size: 25px;
  position: absolute;
  border: 0;
  top: 0;
  right: 0;
  cursor: pointer;
  height: 100%;
  padding-right: 15px;
}

.close-btn i {
  color: white;
}

.close-btn:focus {
  outline: 0;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.alert-info .icon {
  padding-right: 10px;
}

.save-load-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
}
.save-load-btn a {
  text-decoration: none;
}

@keyframes modalopen {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.loader-container {
  width: 100%;
  height: 100vh;
  background-color: black;
  position: fixed;
  top: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid;
  color: #b45b11;
  border-radius: 50%;
  border-top-color: transparent;
  animation: loader 1.2s linear infinite;
}

@keyframes loader {
  25% {
    color: rgb(212, 136, 20);
  }
  50% {
    color: #cf2418;
  }
  75% {
    color: #d3a937;
  }
  to {
    transform: rotate(360deg);
  }
}
