/* FONT IMPORT */
@import url("https://fonts.googleapis.com/css2?family=Darker+Grotesque:wght@300..900&display=swap");

/* JOSH COMEAU CSS RESET */

/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
  font-family: "Darker Grotesque", sans-serif;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}

/* MAIN STYLING */

main {
  color: #fff;
  font-size: 1rem;
  background-color: #121212;
  min-height: 100vh;
}

.hero-section {
  background: #0e0e0e url(assets//images/hero-background.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 5rem 2.5rem;
}

.hero-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;

  > h1 {
    font-size: 2.5rem;
    font-weight: bolder;
  }

  > a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
  }
}

.main-content {
  padding-inline: 2.5rem;
  padding-block: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

.form {
  display: flex;
  flex-direction: row;
  position: absolute;
  margin: 0 auto;
  top: -1.5rem;
  max-width: 460px;
  width: 100%;
  height: 48px;
  align-items: center;
  background-color: #2e2e2f;
  border-radius: 8px;
  padding-inline-start: 1rem;
}

.fa-magnifying-glass {
  font-size: 1rem;
  margin-right: 0.5rem;
  color: #9ca3af;
}

.form button {
  background-color: #4b4b4b;
  color: #fff;
  padding-block: 0.5rem;
  padding-inline: 1.5rem;
  border: none;
  height: 100%;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  cursor: pointer;
}

.form input {
  width: 100%;
  background-color: #2e2e2f;
  border: none;
  outline: none;
  color: white;
}

.form input:focus {
  background-color: #2e2e2f;
  color: white;
}

.form input::placeholder {
  color: #a5a5a5;
  font-size: 1.25rem;
}

/* Main Section */

.movie-box {
  display: flex;
  align-items: center;
  margin: 0 auto;
  border-bottom: 1px solid #2c2c2c;
  gap: 1.5em;
  padding-block-end: 2rem;
  max-width: 840px;
  width: 100%;

  > img {
    width: 200px;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
  }
}

.movie-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.movie-genre button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.movie-genre,
.movie-heading {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.fa-star {
  font-size: 1rem;
  color: #fec654;
}

.plot {
  display: -webkit-box;
  line-clamp: 4;
  -webkit-line-clamp: 4; /* Show 3 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.watchlist-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;

  > p {
    color: #787878;
    font-size: 1.5rem;
    font-weight: bold;
  }

  > a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;

    > i {
      color: #121212;
      width: 1.5rem;
      height: 1.5rem;
      border-radius: 50%;
      border: 1px solid whitesmoke;
      background-color: white;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
  }
}
