@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap");
:root {
  --tmdbDarkBlue: #032541;
  --tmdbLightBlue: #01b4e4;
  --tmdbLightGreen: #1ed5a9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Poppins, sans-serif;
}

header {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background-color: var(--tmdbDarkBlue);
}

h1 {
  margin: 0;
}

h3 {
  font-weight: 500;
}

a {
  text-decoration: none;
  letter-spacing: 4px;
  color: transparent;
  background: linear-gradient(
    to right,
    var(--tmdbLightGreen),
    var(--tmdbLightBlue)
  );
  background-clip: text;
}

.search {
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.5);
  background-color: white;
  border-radius: 50px;
  border: none;
  &:focus {
    outline: none;
  }
  &::-moz-placeholder {
    color: rgba(0, 0, 0, 0.5);
  }
  &::placeholder {
    color: rgba(0, 0, 0, 0.5);
  }
}

main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.movie {
  position: relative;
  background-color: var(--tmdbDarkBlue);
  border-radius: 10px;
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  img {
    width: 100%;
  }
}

.movie-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem 1rem;
  color: #eee;
  letter-spacing: 0.5px;
  h3 {
    margin-block: 0;
  }
  span {
    padding: 0.25rem 0.5rem;
    font-weight: 500;
    border: 2px solid;
    border-radius: 3px;
  }
  span.green {
    color: lightgreen;
  }
  span.orange {
    color: orange;
  }
  span.red {
    color: red;
  }
}

.overview {
  position: absolute;
  left: 0;
  bottom: 0;
  max-height: 100%;
  padding: 2rem;
  background-color: #fff;
  transform: translateY(101%);
  transition: transform 0.3s ease-in;
  overflow-y: auto;
  .movie:hover & {
    transform: translateY(0);
  }
}
