*,
*::before,
*::after {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  font-family: sans-serif;
  color: white;
  background-color: black;
  --theatre-size: 700px;
  --duration: .7s
}

.intro-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  width: var(--theatre-size);
  height: 100vh;
  overflow: hidden;
  transition: opacity var(--duration), visibility var(--duration);
}

.intro-container.fadeToBlack {
  visibility: hidden;
  opacity: 0
}

h1 {
  top: 0;
  width: 100%;
  height: 50px;
  text-align: center;
}

.marquee-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 470px;
  box-sizing: border-box;
  overflow: hidden;
}

.marquee {
  position: absolute;
  width: 100%;
  opacity: 0;
  transition: opacity var(--duration), visibility var(--duration);
}

/* .marquee.intro {
  opacity: 1;
} */

.movie_selection {
  width: 100%;
  height: fit-content;
  padding: 10px;
  box-sizing: border-box;
}

.movie_selection h2 {
  text-align: center;
  margin-bottom: 15px;
  letter-spacing: 2px;
  font-weight: 900;
  transition: opacity var(--duration), visibility var(--duration);
  opacity: 0;
}

.movie_selection p {
  margin-bottom: 30px;
  transition: opacity var(--duration), visibility var(--duration);
  height: 80px;
  opacity: 0;
}


.trailer-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  visibility: hidden;
  opacity: 0;
  transition: opacity var(--duration), visibility var(--duration);

  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: fit-content;
  max-height: 100vh;
}

.trailer-container.active {
  visibility: visible;
  opacity: 1;
}

.trailer-container video {
  position: relative;
  max-width: 900px;
  outline: none;
}

.exit-icon {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: red;
  background-color: black;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgb(189, 189, 189);
  border-radius: 7px;
  padding: 3px 6px 3px;
  margin: 20px;
  cursor: pointer;
  align-self: flex-end;
}

.exit-icon:hover {
  box-shadow: 0 0 20px 4px white;
}


.buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 10px;
}

.btn {
  position: relative;
  color: black;
  background-color: white;
  border: none;
  outline: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  border-radius: 5px;

  z-index: 1;
  transition: color 300ms ease-in-out;
  overflow: hidden;
}

.enterOrExit {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  top: 0;
  height: 100%;
  opacity: 0;
}

.enterOrExit .btn {
  display: block;
  text-align: center;
  font-size: 25px;
}


@media screen and (max-width: 1000px) {
  .trailer-container video {
    max-width: 90vw;
  }
}

@media screen and (max-width: 760px) {
  body {
    --theatre-size: 90vw;
  }

  h1 {
    font-size: 4.3vw;
    height: 7vw;
  }

  .marquee-container {
    height: 61vw;
  }

  .btn {
    padding: 1.4vw 2.8vw;
    font-size: 2vw;
    border-radius: .7vw;
  }

  .enterOrExit .btn {
    font-size: 3.29vw;
  }

}

@media screen and (max-width: 615px) {
  h2 {
    font-size: 3.8vw;
  }

  .exit-icon {
    font-size: 3vw;
  }
}

@media screen and (max-width: 525px) {
  .movie_selection p {
    font-size: 3vw;
    height: 15.25vw;
  }

  .movie_selection h2 {
    margin-bottom: 2.1vw;
  }

  .movie_selection p {
    margin-bottom: 4.2vw;
  }

  .exit-icon {
    font-size: 4vw;
  }
}

@media screen and (max-width: 270px) {
  .exit-icon {
    font-size: 12px;
  }
}

/* ********************************************** */

/*  This is a neat little trick with stacking the elements
    that allows you to place the text of the element on top
    while still allowing the background of the before to show up  
*/

/* .enterOrExit>* {
  font-size: 1rem;
} */

.btn::before {
  content: "";
  position: absolute;
  /*   Somehow this causes it to fill the parent element   */
  top: 0;
  bottom: 0;
  width: 100%;
  right: 80%;
  left: -80%;
  background-image: linear-gradient(45deg,
      #fff, #fff, #fff, #fff, #fff, #fff,
      lightyellow, yellow, gold, yellow, lightyellow,
      #fff, #fff, #fff, #fff, #fff, #fff);

  background-size: cover;
  z-index: -1;
  transition: top, bottom, right, left, 0ms;
}



.btn:hover::before,
.btn:focus::before {
  /* transform: translateX(75%); */
  /* transition: transform .5s ease-in-out; */
  transition: top, bottom, right, left, 550ms ease-out;
  background-color: white;
  right: -80%;
  left: 80%;
}

.enterOrExit.show,
.movie_selection p.show,
.title.show,
.marquee.show {
  opacity: 1;
  transition: opacity var(--duration), visibility var(--duration);
}

