@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;400&display=swap');

@import url('https://fonts.googleapis.com/css2?family=Ms+Madi&display=swap');


* {
  box-sizing: border-box;
}

:root {
  --primary-color: #191817;
  --secondary-color: #0305148d;
}

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

header {
  padding: 1rem;
  display: flex;
  background-color: var(--secondary-color);
}

.logo{
  margin-left: 2rem;
  width: 60%;
}

a{
  text-decoration: none;
}

.logo-text1{
  color: #eee;
  font-family: 'poppins';
}

.logo-text2{
  color: #ad1a1ab8;
  font-family: 'poppins';
  font-weight: 400;
}

.search-form{
  width: 40%;
}

.search {
  background-color: #eee;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  color: #fff;
  width: 90%;
}

.search::placeholder {
  color: #7378c5;
}

.search:focus {
  background-color: var(--secondary-color);
  outline:2px solid #fff;
}

.user{
  display: flex;
  justify-content: center;
  align-items: center;
}

.user-img1, .user-img2{
  width: 30px;
  height: 30px;
  border-radius: 50%;
}

main {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
}

.movie {
  width: 250px;
  height: 50vh;
  margin: 1rem;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  border-radius: 3px;
}

.movie:hover{
  border: 1px solid #eee;
  cursor: pointer;
}

.movie img {
  width: 100%;
}

.movie-info {
  color: rgba(238, 238, 238, 0.679);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap:0.2rem;
  padding: 0.5rem 1rem 1rem;
  letter-spacing: 0.5px;
}

.movie-info h3 {
  margin-top: 0;
  font-size: 15px;
}

.movie-info span {
  background-color: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-weight: bold;
}

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

.movie-info span.orange {
  color: orange;
}

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

.overview {
  background-color: #000;
  padding: 1rem;
  font-size: small;
  opacity: 0.8;
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  color: #eee;
  max-height: 50%;
  transform: translateY(101%);
  overflow-y: auto;
  transition: transform 0.5s ease-in;
}

.movie:hover .overview {
  transform: translateY(0);
}

.back-top{
  display: flex;
  float: right;
  margin-right: 2rem;
}

.back-top img{
  width: 30px;
}

@media (max-width: 678px){
  .user{
    display: none;
  }

  header{
    display: block;
  }

  .logo{
    margin-left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
  }

  .search-form{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  form{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .movie{
    width: 90%;
  }
}

@media (min-width:679px) {
  .user-img1{
    display: none;
  }
}