@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #170d24;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-image: radial-gradient(
      ellipse at 10% 90%,
      #3c2d83 0%,
      transparent 55%
    ),
    radial-gradient(ellipse at 90% 90%, #c33c65 0%, transparent 55%),
    radial-gradient(ellipse at 90% 10%, #4a74dc 0%, transparent 55%),
    radial-gradient(ellipse at 10% 10%, #35244f 0%, transparent 55%);
}

main {
  font-size: 1rem;
  width: 90vw;
  max-width: 37.5rem;
  height: auto;
  padding: 3rem 1.8rem;
  margin: 2rem;
  border-radius: 0.6rem;
  background: linear-gradient(
    50deg,
    rgba(255, 255, 255, 0.4) 12%,
    rgba(255, 255, 255, 0.1) 77%
  );
  box-shadow: 0px 4px 24px 1px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.search-container {
  display: grid;
  grid-template-columns: 9fr 3fr;
  gap: 1.2rem;
}

.search-container input,
.search-container button {
  font-size: 0.9rem;
  outline-color: transparent;
  border-radius: 0.3rem;
}

.search-container input {
  background-color: rgba(222, 222, 222, 0.4);
  border: 1px solid #a0a0a0;
  color: #fff;
  padding: 0.7rem;
}

.search-container input:focus {
  border-color: #fff;
}

.search-container button {
  background-image: linear-gradient(
    to right,
    #ece9e6 0%,
    #fff 51%,
    #ece9e6 100%
  );
  border: none;
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  transition: 0.5s;
  background-size: 200% auto;
  box-shadow: 0 0 0.8rem #eee;
}

.search-container button:hover {
  background-position: right center; /* change the direction of the change here */
  color: #354d64;
  text-decoration: none;
}

.search-element {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  position: relative;
}

.search-list {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  max-height: 21rem;
  background-color: rgba(195, 195, 195, 0.8);
  backdrop-filter: blur(50px);
  overflow-y: scroll;
  z-index: 10;
}

.search-list .search-list-item {
  padding: 0.3rem;
  border-bottom: 1px solid #fff;
  color: #35244f;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.search-list .search-list-item:hover {
  background-color: rgba(222, 222, 222);
}

.search-list-item p {
  color: #35244f;
}

.search-list-item {
  display: flex;
  align-items: center;
}

.search-item-thumbnail img {
  width: 2.5rem;
  margin-right: 1rem;
  margin-top: 0.5rem;
}

.search-item-info h3 {
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0;
}

.search-item-info p {
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* thumbnail */
.search-list::-webkit-scrollbar {
  width: 0.5rem;
}

.search-list::-webkit-scrollbar-track {
  box-shadow: inset 0 0 0.375rem rgb(79, 78, 78);
}

.search-list::-webkit-scrollbar-thumb {
  box-shadow: inset 0 0 0.375rem rgba(238, 238, 238, 0.9);
  outline: none;
  border-radius: 0.8rem;
}

/* js related class */
.hide-search-list {
  display: none;
}

.hover {
  background-color: #4096cf;
}

/* movie result */
#result-grid {
  color: #fff;
}

.info {
  position: relative;
  display: grid;
  grid-template-columns: 4fr 8fr;
  margin-top: 1.2rem;
}

.poster {
  width: 100%;
}

h2 {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.06rem;
}

.rating {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0 0.9rem 0;
}

.rating img {
  width: 1.2rem;
}

.rating h4 {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 500;
}

.rating span {
  font-size: 0.8rem;
  font-weight: 300;
}

.details {
  display: flex;
  justify-content: center;
  font-size: 0.95rem;
  gap: 1rem;
  color: #fff;
  margin: 1.2rem 0;
  font-weight: 300;
}

.genre {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

.genre div {
  border: 1px solid #a0a0a0;
  font-size: 0.75rem;
  border-radius: 0.4rem;
  font-weight: 300;
  padding: 0.4rem 1.6rem;
}

h3 {
  font-weight: 500;
  margin-top: 1.2rem;
}

p,
.award-info {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8rem;
  text-align: justify;
  color: #fff;
  margin-top: 1.5rem;
}

.msg {
  text-align: center;
}

@media screen and (max-width: 550px) {
  main {
    font-size: 0.875rem;
  }

  .poster {
    margin: auto;
    width: auto;
    max-height: 10.8rem;
  }

  .info {
    grid-template-columns: 1fr;
  }
}
