:root {
  --imperial: "STIX Two Text", serif;
  --cheltenham: "Noto Serif", serif;
  --franklin: "Libre Franklin", sans-serif;
  --main-color: #f8f8f8;
  --color-secondary: #9c9c9c;
  --background: #121212;
  --border: #dfdfdf;
  --white: white;
  --saving-background: #272728;
  --link-underline: #aaa;
  --border-navigation: rgb(255 255 255 / 24%);
  --hundredsvh: 100svh;
  --width-body: 600px;
  --width-standart: calc(100% - 40px);
}

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

h1,
h2,
h3,
p,
ul,
li,
a {
  margin: 0;
  padding: 0;
}

ul,
li,
a {
  color: currentColor;
  text-decoration: none;
  list-style: none;
}

img,
svg,
video {
  display: block;
  pointer-events: none;
}

body {
  position: relative;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--main-color);
  font-family: var(--imperial);
  background: var(--background);
}

.header {
  position: relative;
  width: 100%;
  height: calc(var(--hundredsvh) * 3.25);
}

.header_logo {
  position: absolute;
  left: 50%;
  z-index: 1000;
  width: auto;
  height: 26px;
  min-height: 26px;
  margin: 10px auto 2px;
  filter: invert(100%);
  transform: translateX(-50%);
}

.header_title_wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: var(--width-body);
  min-height: var(--hundredsvh);
  margin-bottom: calc(var(--hundredsvh) * -1);
  margin-inline: auto;
  padding-inline: 10px;
  font-family: var(--cheltenham);
}

.header_title {
  max-width: 720px;
  margin: 0 20px;
  font-weight: 400;
  font-size: 42px;
  line-height: 1.1256;
  text-align: center;
  text-transform: uppercase;
}

.header_title_count {
  display: block;
  font-size: 3.65em;
  letter-spacing: -0.025em;
}

.header_videos_wrapper {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  height: var(--hundredsvh);
  overflow: hidden;
  pointer-events: none;
}

.header_videos {
  position: relative;
  width: 100%;
  max-width: var(--width-body);
  height: 100%;
  margin-inline: auto;
}

.header_video_block {
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  width: 50%;
  padding: 1%;
  transition: opacity 0.25s ease-out;
}

.header_video_wrapper {
  position: relative;
  aspect-ratio: 1.777777777777778;
}

.header_video {
  width: 100%;
  opacity: 0;
}

.main_text {
  max-width: var(--width-body);
  margin-bottom: 24px;
  margin-inline: auto;
  padding: 0 20px;
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
}

.navigation {
  position: sticky;
  top: -1px;
  z-index: 1000;
  width: 100%;
  padding: 10px 20px 0;
  opacity: 0;
  overflow-x: auto;
  background: var(--background);
  transition: all 0.3s;
}

.navigation.open {
  border-bottom: 1px solid var(--border-navigation);
  opacity: 1;
}

.navigation_wrapper {
  display: flex;
  justify-content: center;
  align-items: baseline;
  width: fit-content;
  height: 46px;
  margin: 0 auto;
  padding-top: 10px;
}

.navigation_places {
  display: flex;
  gap: 20px;
  border-right: 1px solid var(--border);
  padding-right: 20px;
}

.navigation_wrapper a {
  font-family: var(--franklin);
  font-weight: 450;
  font-size: 14px;
  text-decoration: underline;
  text-decoration-color: var(--background);
  transition: all 0.2s;
}

.navigation_watchlist {
  padding-left: 20px;
}

.navigation_link div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.navigation_link p {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
}

.num {
  display: inline-flex;
  align-items: center;
  width: 20px;
  height: 20px;
  opacity: 1;
  font-weight: 650;
  font-size: 13px;
  transition: opacity 0.3s ease;
}

.num.fade-out {
  opacity: 0;
}

.all_movies {
  width: var(--width-standart);
  max-width: var(--width-body);
  margin: 0 auto;
}

.movie_item {
  margin-block: 60px;
  padding: 20px 0;
  overflow-x: hidden;
  text-align: center;
  inline-size: 100%;
}

.movie_header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: var(--cheltenham);
}

.movie_link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  max-width: 35px;
  height: 35px;
  border: 1px solid var(--color-secondary);
  border-radius: 50%;
  background-color: transparent;
  transition:
    background-color 0.25s,
    color 0.25s;
}

.movie_link svg {
  width: 70%;
  fill: var(--color-secondary);
  transition: fill 0.25s;
}

.movie_place {
  font-weight: 350;
  font-size: 72px;
  line-height: 1;
}

.movie_name {
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.movie_director_and_year {
  color: var(--color-secondary);
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.movie_video_wrapper {
  width: 100%;
  margin-block: 30px;
  aspect-ratio: 1.77777777778;
}

.movie_video {
  opacity: 0;
  inline-size: 100%;
}

.movie_text {
  color: var(--main-color);
  font-family: var(--imperial);
  font-size: 1.25rem;
  line-height: 1.5;
  text-align: start;
}

.movie_quotes {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-block: 30px;
  font-family: var(--cheltenham);
}

.movie_quote {
  border-left: 1px solid var(--border-navigation);
  padding-left: 20px;
}

.movie_quote p:first-child {
  font-size: 24px;
  font-style: italic;
  line-height: 1.35;
}

.movie_quote p:last-child {
  margin-top: 13px;
  color: var(--color-secondary);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.saving_box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 10px;
  border-radius: 3px;
  padding: 20px;
  background-color: var(--saving-background);
}

.saving_poster {
  width: 82px;
  height: auto;
  opacity: 0;
}

.checkboxes_box {
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: var(--cheltenham);
}

.checkboxes_box input {
  position: relative;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: -8px 0 0;
  border: none;
  padding: 0;
  outline: none;
}

.checkboxes_box input::before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--white);
  border-radius: 3px;
  background-color: var(--saving-background);
  pointer-events: none;
}

.checkboxes_box input:checked::before {
  background-color: var(--white);
}

.checkboxes_box input:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  min-width: 11px;
  border: 3px solid var(--background);
  border-top: none;
  border-right: none;
  transform: translate(-50%, -80%) rotate(-45deg);
  aspect-ratio: 41.5/25;
}

.checkbox_label span {
  padding-left: 5px;
  color: var(--body-color);
  font-weight: 600;
  font-size: 23px;
  cursor: pointer;
}

.watchlist {
  margin-bottom: 50px;
  padding: 60px 0;
  background-color: var(--saving-background);
}

.watchlist_header_title {
  max-width: var(--width-standart);
  margin: 20px auto 5px;
  color: var(--white);
  font-family: var(--cheltenham);
  font-weight: 650;
  font-size: 21px;
  line-height: 1.25;
  text-align: center;
}

.watchlist_header_subtitle {
  width: 420px;
  max-width: var(--width-standart);
  margin: 0 auto 26px;
  color: var(--white);
  font-weight: 350;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
}

.watchlist_containers {
  display: flex;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--cheltenham);
}

.watchlist_container {
  width: 50%;
}

.watchlist_wrapper {
  position: relative;
  width: 415px;
  max-width: 415px;
  margin: 0 auto;
  padding: 20px;
  color: var(--background);
  text-align: center;
  aspect-ratio: 9 / 16;
}

.have_watched_container .watchlist_wrapper {
  background-color: #ffd645;
}

.want_to_watch_container .watchlist_wrapper {
  background-color: #73d7a0;
}

.watchlist_empty_messages {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.watchlist_subtitle {
  margin: 40px 0 10px;
  font-family: var(--franklin);
  font-weight: 600;
  font-size: 14px;
}

.watchlist_title {
  margin-bottom: 15px;
  font-weight: 350;
  font-size: 33px;
  line-height: 1;
}

.watchlist_ps {
  max-width: var(--width-standart);
  margin: 0 auto 15px;
  font-family: var(--franklin);
  font-weight: 350;
  font-size: 15px;
  line-height: 1.4;
}

.watchlist_posters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 5px;
  width: 100%;
  max-width: 100%;
  height: 72%;
  min-height: 320px;
  margin: 0 auto;
}

.watchlist_posters img {
  width: var(--img-width);
  height: auto;
  border-radius: 3px;
  object-fit: cover;
  opacity: 0;
}

.watchlist_logo {
  position: absolute;
  right: 20px;
  bottom: 25px;
  width: 32px;
  height: 36px;
  object-fit: contain;
  opacity: 1;
}

.watchlist_empty_messages .watchlist_logo {
  opacity: 0.25;
}

.copy-button {
  display: block;
  width: fit-content;
  margin: 20px auto 0;
  border: 1px solid var(--white);
  border-radius: 6px;
  padding: 16px;
  color: var(--white);
  font-family: var(--franklin);
  font-weight: 350;
  font-size: 16px;
  background-color: transparent;
  transition: background-color 0.25s;
  cursor: pointer;
}

.copy-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.watchlist_movie_list {
  max-width: var(--width-standart);
  margin: 10px auto 30px;
  color: var(--white);
  font-family: var(--franklin);
  font-weight: 350;
  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .navigation_places a:hover {
    text-decoration-color: var(--white);
  }

  .movie_link:hover {
    border-color: var(--white);
    background-color: var(--border-navigation);
  }

  .movie_link:hover svg {
    fill: var(--white);
  }

  .copy-button:hover {
    background-color: var(--border-navigation);
  }

  .copy-button:disabled:hover {
    background-color: transparent;
  }

  .watchlist_movie_list a:hover {
    text-decoration: underline;
    text-decoration-color: var(--link-underline);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
  }
}

@media screen and (max-width: 1024px) {
  .header_logo {
    margin: 13px auto 3px;
  }

  .watchlist {
    padding: 40px 0;
  }

  .watchlist_header_title {
    font-size: 19px;
  }

  .watchlist_header_subtitle {
    font-size: 17px;
  }

  .watchlist_containers {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .watchlist_container {
    inline-size: 100%;
  }

  .watchlist_movie_list {
    font-size: 14px;
  }
}

@media screen and (max-width: 740px) {
  .header_title_wrapper {
    inline-size: 75%;
  }

  .header_title {
    font-size: 21px;
  }

  .header_title_count {
    font-size: 5.65em;
  }

  .header_video_block {
    inline-size: 60%;
  }

  .movie_link {
    width: 25px;
    max-width: 25px;
    height: 25px;
  }

  .movie_place {
    font-size: 64px;
  }

  .main_text,
  .movie_text {
    font-size: 1.125rem;
    line-height: 1.38;
  }

  .movie_quote {
    padding-left: 15px;
  }

  .movie_quote p:first-child {
    font-size: 20px;
    line-height: 1.25;
  }

  .movie_quote p:last-child {
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.25;
  }

  .saving_poster {
    inline-size: 72px;
  }

  .checkbox_label span {
    font-size: 20px;
  }
}

@media screen and (max-width: 460px) {
  .checkbox_label span {
    line-height: 1;
  }

  .watchlist_wrapper {
    inline-size: 100%;
  }
}
