@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,500;0,700;0,900;1,300&display=swap');
*{
  box-sizing: border-box;
}

:root{
  --primary-color: #22254b;
  --secondary-color: #373b69;
  --tertiary-color: #F9BC50;
}

body{
  background-color: var(--primary-color);
  margin: 0px;
  font-family: 'Roboto', sans-serif;
}

nav{
  background-color: var(--secondary-color);
  margin: 0px;
  display: flex;
  justify-content: space-between;
  height: 4rem;
  align-items: center;
}

.logo{
  width: 250px;
}

.search{
  height: 65%;
  border: solid 2px var(--primary-color);
  background-color: var(--secondary-color);
  border-radius: 100px;
  width: 15rem;
  outline: none;
  color: #fff;
  padding: 1rem;
  margin-right: 1rem;
}

::placeholder {
  color: rgb(163, 163, 163);
  left: 1rem;
}

.search:focus{
  background-color: var(--primary-color);
}

main{
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.movie-card{
  position: relative;
  width: 300px;
  margin: 2rem;
  background-color: var(--secondary-color);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
}

.movie-img{
  width: 100%;
  /* height: 300px; */
}

.movie-head{
  display: flex;
  justify-content: space-between;
  margin: .2rem;
  padding: .5rem;
  color: #eee;
}

.movie-head .rating{
  background-color: var(--primary-color);
  padding: 5px;
  border-radius: 2px;
  font-size: 15px;;
}

.movie-head span.green{
  color: lightgreen;
}

.movie-head .rating.orange{
  color: orange;
}

.movie-head span.red{
  color: red;
}

.movie-head .movie-name{
  margin: 0px;
}

.movie-info{
  position: absolute;
  padding: .5rem;
  left: 0;
  right: 0;
  background-color: #fff;
  transform: translateY(10%);
  transition: transform .3s ease;
}

.movie-card:hover .movie-info{
  transform: translateY(-100%);
}

.movie-info h4{
  margin: 2px;
}