@import url("https://fonts.googleapis.com/css?family=Lato");

@font-face {
  font-family: Ghilbi;
  src: url("assets/fonts/Eyad Al-Samman - Ghibli.otf") format("opentype");
}

/* default */
*,
*::after,
*::before {
  margin: 3px;
  padding: 0;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background-color: #cfcbcb;
  -webkit-border-radius: 10px;
  border-radius: 15px;
}

::-webkit-scrollbar-thumb {
  -webkit-border-radius: 10px;
  border-radius: 10px;
  background: #838282;
}

/* body */
body {
  font-family: "Ghilbi", "Segoe Ui", -apple-system, BlinkMacSystemFont,
    sans-serif;
  background: linear-gradient(
    171deg,
    rgba(20, 178, 225, 1) 4%,
    rgba(232, 228, 160, 0.48792016806722693) 90%
  );
  padding: 0;
  margin: 0;
}
.background-image {
  background-image: url(./assets/cloud.png);
  background-repeat: no-repeat;
  background-size: cover;
  position: absolute;
  top: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 200%;
  z-index: -2;
}

h1 {
  font-family: "Ghilbi", "Leto";
  letter-spacing: 3px;
  font-weight: 200;
  display: flex;
  justify-content: center;
  align-items: self-end;
  margin: 2%;
  font-size: 3rem;
  flex-wrap: wrap;
}
.logo {
  width: 19rem;
}

section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 1%;
}

article {
  order: 0;
  flex: 1;
  margin: 3%;
}
.open {
  flex-grow: 2;
  padding-right: 2%;
  transition: all 0.1s ease-in-out;
}

/* .flip-card-container */
.flip-card-container {
  --hue: 150;
  --primary: hsl(var(--hue), 50%, 50%);
  --white-1: hsl(0, 0%, 90%);
  --white-2: hsl(0, 0%, 80%);
  --dark: hsl(var(--hue), 25%, 10%);
  --grey: hsl(0, 0%, 67%);
  width: 17rem;
  height: 30rem;
  perspective: 1000px;
  border-radius: 24px;
}

/* .flip-card */
.flip-card {
  width: inherit;
  height: inherit;
  position: relative;
  transform-style: preserve-3d;
  transition: 0.6s 0.1s;
}

/* hover and focus-within states */
.flip-card-container:hover .flip-card,
.flip-card-container:focus-within .flip-card {
  transform: rotateY(180deg);
}

/* .card-... */
.card-front,
.card-back {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* .card-front */
.card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

/* .card-back */
.card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* figure */
figure {
  z-index: -1;
}

/* figure, .img-bg */
figure,
.img-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* img */
img {
  height: 100%;
  width: 100%;
  border-radius: 24px;
}

/* .img-bg */
.img-bg {
  background: hsla(var(--hue), 25%, 10%, 0.5);
}
.card-back .img-bg {
  clip-path: polygon(0 0, 100% 0, 100% 80%, 0 60%);
  border-radius: 6%;
}
/* details*/
.detail_wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  align-items: center;
  height: 85%;
  width: 120%;
  right: 7%;
  top: -92%;
  padding: 0;
  margin: 0;
  z-index: -1;
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: all 0.2s ease-in-out;
}
.detail_container {
  position: absolute;
  flex-grow: 3;
  transition: all 0.1s ease-in-out;
  display: flex;
  flex-direction: row;
}
.useless {
  width: 50%;
}
.details {
  width: 50%;
  display: none;
  flex-direction: column;
  justify-content: flex-start;
  font-family: "Leto", "Sans";
}
.top {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  color: black;
}
.imdb-note {
  font-weight: 800;
  padding: 3%;
}
.imdb-note i {
  font-size: 25px;
}
i.fa-star {
  color: gold;
}

.title {
  text-transform: uppercase;
  font-family: "Ghilbi", "Leto";
  letter-spacing: 3px;
  padding: 3%;
}

.static {
  font-weight: 700;
  font-family: "Ghilbi", "Lato";
  padding: 1%;
}
.director,
.year {
  font-style: italic;
  color: rgb(18, 16, 16);
}

.description {
  padding: 3%;
  text-align: start;
  text-indent: 5px;
  font-family: "Leto";
  max-height: 7rem;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
.bottom {
  padding: 1%;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
}
.genre {
  display: inline;
  padding: 3%;
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(173, 175, 202, 0.37);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.socials {
  display: inline-block;
  margin: 0 auto;
}
.socials i {
  color: rgb(238, 5, 5);
  border: none;
  font-size: 1.5rem;
}
/* hover state */
.flip-card-container:hover .card-front .img-bg::before {
  width: 6px;
  border-left-color: var(--primary);
  border-right-color: var(--primary);
}
/* button */
button {
  font-family: inherit;
  font-weight: bold;
  color: #d5d4d4;
  letter-spacing: 2px;
  padding: 9px 20px;
  border: 1px solid var(--grey);
  border-radius: 1000px;
  background: transparent;
  transition: 0.3s;
  cursor: pointer;
}
button:hover,
button:focus {
  color: #cfcbcb;
  background: hsla(var(--hue), 25%, 10%, 0.2);
  border-color: currentColor;
}
button:active {
  transform: translate(2px);
}
button a{
  text-decoration: none;
  color: white;
}

/* .design-container */
.design-container {
  --tr: 90;
  --op: 0.5;
  width: 100%;
  height: 100%;
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* .design */
.design {
  display: block;
  background: var(--grey);
  position: absolute;
  opacity: var(--op);
  transition: 0.3s;
}

.design--1,
.design--2,
.design--3,
.design--4 {
  width: 1px;
  height: 100%;
}

.design--1,
.design--2 {
  top: 0;
  transform: translateY(calc((var(--tr) - (var(--tr) * 2)) * 1%));
}

.design--1 {
  left: 20%;
}

.design--2 {
  left: 80%;
}

.design--3,
.design--4 {
  bottom: 0;
  transform: translateY(calc((var(--tr) + (var(--tr) - var(--tr))) * 1%));
}

.design--3 {
  left: 24%;
}

.design--4 {
  left: 76%;
}

.design--5,
.design--6,
.design--7,
.design--8 {
  width: 100%;
  height: 1px;
}

.design--5,
.design--6 {
  left: 0;
  transform: translateX(calc((var(--tr) - (var(--tr) * 2)) * 1%));
}

.design--5 {
  top: 41%;
}

.design--6 {
  top: 59%;
}

.design--7,
.design--8 {
  right: 0;
  transform: translateX(calc((var(--tr) + (var(--tr) - var(--tr))) * 1%));
}

.design--7 {
  top: 44%;
}

.design--8 {
  top: 56%;
}

/* states */
button:hover + .design-container,
button:active + .design-container,
button:focus + .design-container {
  --tr: 20;
  --op: 0.7;
}

footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
}
footer img {
  max-width: 15%;
  margin: 0 auto;
}

h3 {
  margin: 0 auto;
  color: rgb(47, 40, 40);
  font-weight: 100;
  padding: 0 5% 5%;
}
footer span {
  color: red;
}

/* Media query for devices with maximum width of 1390px */
@media screen and (max-width: 1390px) {
  h1 {
    font-size: 2rem;
  }
  section {
    justify-content: center;
    margin: 3%;
  }
  article {
    order: 0;
  }
  .open {
    padding-bottom: 49%;
    flex-grow: 0;
    padding-right: 0;
    margin-bottom: 8%;
  }
  .flip-card-container {
    padding: 2px;
  }
  .detail_wrap {
    width: 120%;
    right: 7%;
  }
  .detail_container {
    display: flex;
    flex-direction: column;
  }
  .useless {
    width: 100%;
  }
  .details {
    margin: 1%;
    padding-top: 142%;
    width: 100%;
  }
}

/* Media query for devices with maximum width of 765px */

@media screen and (max-width: 765px) {
  section {
    justify-content: center;
    align-content: center;
    align-items: center;
  }
  article {
    order: 0;
    flex: 0;
    margin: 3%;
  }
  .open {
    padding-bottom: 70%;
    margin-bottom: 70%;
  }
  .detail_wrap {
    width: 110%;
    right: 3%;
  }
}
