@import url("https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700;900&display=swap");

:root {
  --main-color: #222222;
  --accent1: #3b3b3b;
  --accent2: #626262;
  --accent3: #9e9e9e;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--main-color);
  font-family: "Noto Sans", sans-serif;
  margin: 0;
}

.title {
  user-select: none;
  cursor: pointer;
}

header {
  background-color: var(--accent1);
  padding: 1rem 17%;
  display: flex;
  justify-content: flex-end;
}

header h1 {
  position: absolute;
  left: 17%;
  top: -0.5rem;
  font-weight: bold;
  color: white;
}

.search {
  background-color: transparent;
  border: 2px solid var(--accent3);
  border-radius: 50px;
  font-family: inherit;
  padding: 0.5rem 1rem;
  color: white;
}

.search::placeholder {
  color: #aaaebe;
}

.search:focus {
  outline: none;
  background-color: var(--main-color);
}

.sort-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
}

.buttons-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: row;
  margin: 1rem 0 0;
  position: relative;
}

.sort,
.parent,
.reset {
  padding: 0.7rem 2rem;
  font-weight: 700;
  user-select: none;
}

.reset {
  display: none;
  margin-top: 1rem;
  position: relative;
  background-color: var(--accent3);
  border-radius: 50px;
  justify-content: center;
  align-items: center;
}
.reset:hover {
  background-color: var(--accent1);
  cursor: pointer;
  user-select: none;
}

.parent {
  background-color: var(--accent2);
  border-radius: 50px 0 0 50px;
}
.sort.pop {
  background-color: var(--accent3);
}
.sort.rel {
  background-color: var(--accent3);
}
.sort.rat {
  background-color: var(--accent3);
  border-radius: 0 50px 50px 0;
}

.sort:hover {
  cursor: pointer;
  user-select: none;
  background-color: var(--accent1);
}

.sort.active {
  color: white;
}

main {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin: 0 10%;
}

.movie img {
  width: 100%;
  height: 400px;
}

.movie {
  margin: 1.5rem;
  background-color: var(--accent1);
  width: 300px;
  height: 475px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.movie-info {
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem 1rem;
  letter-spacing: 0.9px;
}

.movie-info h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-weight: 400;
  max-width: 300px;
  margin-top: 0;
  margin-bottom: auto;
  padding-right: 60px;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-info span {
  position: absolute;
  right: 20px;
  bottom: 30px;
  background-color: var(--accent3);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  font-weight: bold;
}

.movie-info span.green {
  color: rgb(94, 255, 94);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
}

.movie-info span.yellow {
  color: rgb(255, 255, 95);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
}

.movie-info span.red {
  color: rgb(255, 108, 108);
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
    1px 1px 0 #000;
}

.overview {
  background-color: white;
  height: 350px;
  overflow: scroll;
  overflow-x: hidden;
  padding: 2rem;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(101%);
  transition: transform 0.5s ease;
}

.movie:hover .overview {
  transform: translateY(0%);
}

.pages {
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.pageEl {
  font-size: 2rem;
  color: var(--accent1);
  opacity: 20%;
  margin: 1rem 1% 2.5rem;
}

.pagesText {
  font-size: 2rem;
  color: var(--accent3);
  margin: 1rem 1% 2.5rem;
  user-select: none;
}

.pageEl.pageActive {
  opacity: 100%;
  color: var(--accent3);
}

.pageEl.pageActive:hover {
  cursor: pointer;
  user-select: none;
}
