html,
body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

*,
*::after,
*::before {
  box-sizing: inherit;
}


/*font start*/

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

/*font end*/

:root {
  --primary-color: #22254b;
  --secondary-color: #373b69;
  --text-color: #fff;
}

body {
  background-color: var(--primary-color);
  font-family: 'Poppins', sans-serif;
  color: var(--text-color);
  display: flex;
  flex-flow: column;
  height: 100%;
}

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  background-color: var(--secondary-color);
  width: 100%;
  padding: 20px 0;
}

h1 {
  transition: 0.1s;
  text-shadow: 2px 2px 0 var(--primary-color);
}

header .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  row-gap: 10px;
  column-gap: 20px;
}

.main {
  flex: 1 0 auto;
}

footer {
  width: 100%;
  background-color: var(--secondary-color);
  padding: 20px 0;
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  row-gap: 20px;
  column-gap: 173px;
}

.footer__copyright span {
  padding: 0 20px;
}

.footer__copyright a {
  color: var(--text-color);
  text-decoration: none;
}

.footer__rss img {
  height: 40px;
  filter: invert(100%);
  transition: 0.2s;
}

.header__search,
#select-lang {
  position: relative;
  width: 100%;
  background-color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  color: var(--text-color);
  opacity: .6;
  transition: all .3s ease;
}

.header__search::placeholder {
  color: var(--text-color);
  opacity: .6;
}

.header__search::-webkit-search-results-button {
  background: black;
  color: red;
  padding: 1em;
}

.header__search:focus,
#select-lang:focus {
  outline: none;
  background-color: var(--primary-color);
  box-shadow: 0 0 1em;
  opacity: 1;
}

.movies {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 20px auto;
}

.movies h2 {
  text-align: center;
  line-height: 2;
  color: var(--text-color);
  opacity: 0.6;
}

.movie {
  width: 280px;
  background-color: var(--secondary-color);
  box-shadow: 0 4px 5px rgb(0 0 0 / 20%);
  position: relative;
  overflow: hidden;
  border-radius: 1em;
  padding-bottom: 2em;
  display: flex;
  flex-direction: column;
}

.movie img {
  height: 420px;
  width: min-content;
}

.movie-info {
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 2rem;
  letter-spacing: 0.5px;
}

.movie-info h3 {
  margin: 0;
}

.movie-info div {
  display: flex;
  position: absolute;
  bottom: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.movie-release-date {
  margin: 1em 0 0;
  padding: .5em 0 -.5em;
}

.movie span {
  position: absolute;
  bottom: -.2rem;
  right: -12.8125rem;
  background-color: var(--primary-color);
  padding: .5em 0;
  border-radius: 3em;
  font-weight: bold;
}

.vote-average {
  width: 2.5em;
  text-align: center;
}

.movie span.green {
  color: lightgreen;
  border: 2px solid lightgreen;
}

.movie span.orange {
  color: orange;
  border: 2px solid orange;
}

.movie span.red {
  color: red;
  border: 2px solid red;
}

.movie span.gray {
  color: gray;
  border: 2px solid gray;
}

.overview {
  background-color: var(--text-color);
  color: var(--primary-color);
  padding: 2rem;
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  max-height: 100%;
  transform: translateY(101%);
  overflow-y: auto;
  transition: transform 0.3s ease-in;
}



h1:active {
  transform: translate(0, 0.1em);
  text-shadow: 2px -1px 0 var(--primary-color), 0 0 1em;
}

.footer__rss img:active {
  transform: translate(0, 0.1em);
}

.pages {
  width: 100%;
  display: flex;
  gap: .5em;
  justify-content: center;
}

.page,
.arrow {
  padding: 0 .5em;
  cursor: pointer;
  transition: 0.3s;
}



.page {
  width: 42.7px;
  text-align: center;
}

.disabled {
  padding: 0 .5em;
  color: var(--primary-color);
  user-select: none;
}



#form,
#form div {
  display: flex;
  position: relative;
  margin: 0;
  padding: 0;
}

#form div {
  position: absolute;
  height: 100%;
  width: 38.3px;
  top: 0;
  right: 0;
  border: none;
  border-radius: 0 50px 50px 0 / 0 50px 50px 0;
  overflow: hidden;
}

.header__search-button {
  color: var(--text-color);
  position: absolute;
  height: 100%;
  width: 38.4px;
  top: 0;
  right: -50px;
  border: none;
  border-radius: 0 50px 50px 0 / 0 50px 50px 0;
  cursor: pointer;
  background-color: var(--secondary-color);
  transition: all .3s ease;
}

.header__search:not(:placeholder-shown) {
  padding-right: 50px;
  margin-right: -33.8px;
}

.header__search:not(:placeholder-shown)+div .header__search-button {
  opacity: 1;
  right: 0;
  display: block;
}

.header__search:not(:placeholder-shown)+div .header__search-button:hover {
  background-color: #1c5bed;
}

.header__search-button::before,
.header__search-button::after {
  content: "";
  display: block;
  position: absolute;
}

.header__search-button::before {
  border-radius: 50%;
  box-shadow: 0 0 0 0.2em var(--text-color) inset;
  top: 25%;
  left: 20%;
  width: 40%;
  height: 40%;
}

.header__search-button::after {
  background: var(--text-color);
  border-radius: 0 50px 50px 0;
  top: 50%;
  left: 45%;
  width: 25%;
  height: 9%;
  transform: translate(0.2em, 0) rotate(45deg);
  transform-origin: 0 50%;
}

.header__search-button span {
  display: inline-block;
  overflow: hidden;
  width: 1px;
  height: 1px;
}

.header__left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 460px) {
  header {
    padding: 10px 0 15px;
  }

  header .container {
    justify-content: space-around;
  }

  header h1 {
    margin: 0;
  }

  .header__left {
    gap: 10px;
  }

  footer .container {
    justify-content: space-around;
  }
}

/* Any hover */
.header__search:hover {
  box-shadow: 0 0 1em;
}

#select-lang:hover {
  box-shadow: 0 0 1em;
  cursor: pointer;
}

.footer__rss img:hover {
  transform: translate(0, -0.2em);
}

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

h1:hover {
  cursor: pointer;
  transform: translate(0, -0.2em);
  text-shadow: 2px 8px 0 var(--primary-color), 0 0 1em;
}

.page:hover,
.arrow:hover {
  background-color: rgb(255 255 255 / 20%);
  border-radius: 1em;
}

.page-active,
.page-active:hover {
  color: var(--primary-color);
  background-color: var(--text-color);
  border-radius: 1em;
  cursor: default;
}

footer a:hover {
  transition: 0.1s;
  text-shadow: 0 0 1em;
  text-decoration: underline;
}