@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

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

:root {
  --card-w: 270px;
  --card-h: 380px;
  --wheel-height: 700px;
  --transition-duration: 360ms;
  --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.3);
  --bg-color: #000;
  --txt-color: #fff;
  --accent-color: blue;
}

html,
body {
  overscroll-behavior: none;
  width: 100%;
  background-color: var(--bg-color);
  color: var(--txt-color);
  font-family: "Outfit", sans-serif;
  overflow: hidden;
  position: relative;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  filter: brightness(.8);
  /* display: none; */
}

.background-video video {
  object-fit: cover;
  width: 100vw;
  height: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

input,
textarea,
output {
  outline: none;
  border: none;
  margin: 0;
  padding: 0;
  ;
}

button {
  border: none;
  background: transparent;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

ul,
ol,
li {
  list-style: none;
}

.wrapper {
  height: 100svh;
  width: 100%;
  padding: 0;
  position: relative;
  z-index: 10;
}

header {
  width: 100%;
  padding: 15px 42px;
}

#navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  display: inline-flex;
  height: 26px;
  width: 26px;
  display: grid;
  align-items: center;
  justify-content: center;
  grid-template-columns: repeat(2, 1fr);
}

.logo .logo-dot {
  height: 7px;
  width: 7px;
  background-color: var(--txt-color);
  border-bottom-left-radius: 50%;
  display: inline-block;
}


.search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bg-color);
  width: 30%;
  max-width: 100%;
  height: 50px;
  border-radius: 999px;
  background-color: var(--txt-color);
}

.search-wrapper input[type="search"] {
  width: 100%;
  height: 100%;
  padding: 0 10px 0 20px;
  color: var(--bg-color);
  font-size: 16px;
  border-radius: 999px;
  background: transparent;
  font-family: "Outfit" ,sans-serif;
}

.search-wrapper .search-icon {
  background: transparent;
  position: relative;
  right: 25px;
}

.search-icon i {
  font-size: 20px;
  color: var(--bg-color);
}

.user {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background-color: var(--txt-color);
  color: var(--bg-color);
}

.user i {
  font-size: 18px;
  color: var(--bg-color);
}

.main-site {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  z-index: 2;
  position: relative;
}

.hero-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: absolute;
  top: 0;
  width: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

.hero-section h1 {
  font-size: 70px;
  letter-spacing: -2px;
  font-family: "Outfit", sans-serif;
  position: relative;
  color: var(--txt-color);
  bottom: 20px;
}

.filter-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 35px;
  border-radius: 4px;
  position: relative;
  bottom: 25px;
}

/*
.filter-wrapper::after {
  content: "";
  width: 20px;
  height: 20px;
  border-top: 3px solid var(--txt-color);
  border-left: 3px solid var(--txt-color);
  position: absolute;
  top: -5px;
  left: -5px;
}

.filter-wrapper::before {
  content: "";
  width: 20px;
  height: 20px;
  border-bottom: 3px solid var(--txt-color);
  border-right: 3px solid var(--txt-color);
  position: absolute;
  bottom: -5px;
  right: -5px;
} */
.active-indicator {
  position: absolute;
  height: 100%;
  background: var(--bg-color);
  z-index: 0;
  border-radius: 4px;
  transition: all 0.3s ease;
  color: var(--txt-color);
}

/* Buttons */
.filter-btn {
  height: 100%;
  width: 90px;
  border: none;
  color: var(--txt-color);
  font-family: "Outfit", sans-serif;
  cursor: pointer;
  position: relative;
}

.filter-btn.active {
  color: var(--txt-color);
  font-weight: 500;
}


.wheel-container {
  position: relative;
  width: 100%;
  height: var(--wheel-height);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: pan-y;
  z-index: 2;
}

.move-right {
  top: 180px;
  right: 130px;
  transform: rotate(-5deg) !important;
}

.move-right:active {
  transform: translateY(5px) !important;
}

.move-left {
  top: 180px;
  left: 130px;
}


.controller-btn {
  width: 60px;
  padding: 0;
  border: none;
  transform: rotate(5deg);
  transform-origin: center;
  font-family: "Gochi Hand", cursive;
  text-decoration: none;
  font-size: 15px;
  cursor: pointer;
  padding-bottom: 3px;
  border-radius: 5px;
  box-shadow: 0 2px 0 #494a4b;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background-color: var(--txt-color);
  position: absolute;
  z-index: 10;
}

.controller-btn span {
  color: var(--bg-color);
  display: block;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  border: 2px solid #494a4b;
}

.controller-btn:active {
  transform: translateY(5px);
  padding-bottom: 0px;
  outline: 0;
}


.wheel-container,
.wheel-track {
  touch-action: none;
  -ms-touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}


.wheel-track {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate3d(-50%, -50%, 0);
  pointer-events: auto;
  touch-action: none;
}

.wheel-track.hide {
  display: none;
}

.card {
  position: absolute !important;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  height: var(--card-h);
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: translate(-50%, -50%) var(--slot) translateX(var(--drag-x, 0px));
  transition: transform var(--transition-duration) ease, filter var(--transition-duration) ease;
  transform-origin: 50% 200%;
  filter: grayscale(100%) brightness(0.5);
  z-index: 1;
  user-select: none;
  touch-action: none;
  will-change: transform, filter;
  pointer-events: none;
}

.card.active,
.card-3 {
  z-index: 10;
  filter: grayscale(0%) brightness(1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  pointer-events: visible;
}


.wheel-track.dragging .card {
  transition: none;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

.card-0 {
  --slot: translateY(55px) translateX(-13px) rotate(-63deg);
  z-index: -1;
}

.card-1 {
  --slot: translateY(10px) rotate(-45deg);
  z-index: 1;
}

.card-2 {
  --slot: translateX(10px) rotate(-23deg);
  z-index: 2;
}

.card-3 {
  --slot: rotate(0deg) scale(1);
  z-index: 10;
  filter: grayscale(0%) brightness(1);
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-4 {
  --slot: translateX(-10px) rotate(23deg);
  z-index: 2;
}

.card-5 {
  --slot: translateY(15px) rotate(45deg);
  z-index: 1;
}

.card-6 {
  --slot: translateY(60px) translateX(10px) rotate(63deg);
  z-index: -1;
}

.movie-details {
  height: 100%;
  width: 100%;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  border-radius: 8px;
}

.details-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.movie-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.movie-rating {
  position: relative;
  right: 20px;
}

.movie-rating h2 {
  margin: 0;
  font-size: 40px;
  color: var(--txt-color);
  position: relative;
}

.movie-rating h2 span {
  position: absolute;
  top: 0;
  right: -15px;
  font-size: 12px;
}

.badge-top-left {
  background: #FFD700;
  color: #000;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  display: inline-block;
}

.badge-top-right {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-block;
}

.card-content {
  width: 100%;
  padding: 0 10px 10px;
  text-align: left;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-sizing: border-box;
}

.card-content h3 {
  margin: 0;
  font-size: 22px;
  text-transform: capitalize;
}

.movie-dateType {
  display: flex;
  gap: 10px;
  align-items: center;
}

.movie-dateType span {
  font-size: 14px;
}

/* movie details popup */
#trailer-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  z-index: 9999;
  width: 100%;
  height: 100vh;
}

#trailer-overlay.hidden {
  display: none;
}

.trailer-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}



#trailerPlayer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%);
  border: none;
}

.trailer-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #000 25%, rgba(0, 0, 0, 0.5) 60%, rgba(0, 0, 0, 0.9));
}

/* LEFT CONTENT */
.trailer-content {
  position: relative;
  z-index: 5;
  width: 50%;
  max-width: 800px;
  margin-left: 4rem;
  color: var(--txt-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.movie-rating {
  display: flex;
  align-items: center;
  position: relative;
  margin-left: 1.2rem;
}

#fa-star {
  font-size: 10px;
  position: absolute;
  right: -15px;
  top: 0;
}

.movie-rating span {
  font-size: 25px;
}

.trailer-content h1 {
  font-size: 4rem;
  line-height: 1.1;
}

.meta {
  display: flex;
  align-items: center;
  gap: 30px;
}

.meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.meta span i {
  font-size: 14px;
}

/* overview */
.overview {
  max-width: 90%;
  margin-top: 1rem;
  opacity: 1;
}

/* buttons */
.actions {
  margin-top: 1.5rem;
}

.btn {
  padding: .7rem 1.4rem;
  border-radius: 999px;
  border: none;
  margin-right: .7rem;
  cursor: pointer;
}

.btn.primary {
  background: blue;
  color: var(--txt-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Close button */
.close {
  position: absolute;
  top: 20px;
  left: 50px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.close svg {
  height: 80px;
  fill: var(--txt-color);
}

#trailer-overlay {
  display: flex;
  flex-direction: row;
}

@media screen and (max-width : 1080px) {

  #trailer-overlay {
    display: flex;
    flex-direction: column;
  }

  /* background wrapper */
  .trailer-bg {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
  }

  /* iframe centered and covering */
  #trailerPlayer {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw;
    /* maintain 16:9 ratio */
    max-height: 50vh;
    transform: translate(-50%, -50%);
  }

  .trailer-gradient {
    display: none;
  }

  /* bottom content panel */
  .trailer-content {
    width: 100%;
    max-width: none;
    height: 50vh;
    margin: 0;
    padding: 1.2rem;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.75);
  }

  .trailer-content h1 {
    font-size: 2rem;
  }

  .movie-rating span {
    font-size: 18px;
  }

  .meta {
    gap: 12px;
    flex-wrap: wrap;
  }

  .overview {
    max-width: 100%;
  }

  .close {
    top: 10px;
    left: 10px;
  }

  .close svg {
    height: 40px;
  }
}

@media (max-width: 480px) {
  .trailer-content h1 {
    font-size: 1.6rem;
  }

  .btn {
    padding: 0.5rem 1rem;
  }
}


/* responsive */
@media (max-width:900px) {
  :root {
    --card-w: 190px;
    --card-h: 270px;
    --wheel-height: 420px;
  }

  .movie-rating h2 {
    font-size: 34px;
  }

  .card-content h3 {
    font-size: 20px;
  }
}

@media (max-width:480px) {
  :root {
    --card-w: 150px;
    --card-h: 220px;
    --wheel-height: 360px;
  }

  .movie-rating h2 {
    font-size: 28px;
  }

  .card-content h3 {
    font-size: 16px;
  }
}


@media (max-width: 900px) {

  html,
  body {
    overflow: auto;
    height: auto;
  }

  .wrapper {
    height: auto;
    min-height: 100svh;
  }

  header {
    padding: 14px 20px;
  }

  #navigation {
    gap: 12px;
    align-items: center;
  }

  .nav-left {
    gap: 12px;
  }

  /* shrink logo */
  .logo {
    height: 22px;
    width: 22px;
  }

  .logo .logo-dot {
    height: 6px;
    width: 6px;
  }

  .search-wrapper {
    width: 55%;
    height: 44px;
  }

  .search-wrapper input[type="search"] {
    font-size: 15px;
    padding-left: 26px;
  }

  .user {
    height: 42px;
    width: 42px;
  }

  .hero-section {
    top: 8px;
    margin-top: 0;
    gap: 10px;
  }

  .hero-section h1 {
    font-size: 48px;
    letter-spacing: -1px;
  }

  /* filters */
  .filter-wrapper {
    gap: 12px;
    height: 32px;
  }

  .filter-btn {
    width: 78px;
    font-size: 15px;
  }

  :root {
    --card-w: 210px;
    --card-h: 300px;
    --wheel-height: 520px;
  }

  .card-content h3 {
    font-size: 18px;
  }

  .movie-rating h2 {
    font-size: 34px;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  header {
    padding: 14px 36px;
  }

  .nav-links {
    gap: 18px;
  }

  .search-wrapper {
    width: 40%;
    min-width: 260px;
    height: 46px;
  }

  .hero-section h1 {
    font-size: 56px;
  }

  :root {
    --card-w: 240px;
    --card-h: 340px;
    --wheel-height: 600px;
  }


  .card-content h3 {
    font-size: 20px;
  }

  .movie-rating h2 {
    font-size: 38px;
  }

  .move-left {
    top: 90px;
    left: 20px;
  }

  .move-right {
    top: 90px;
    right: 20px
  }

  .wheel-container {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
    height: 40px;
    width: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
  }

  header.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 10px;
    right: 10px;
    gap: 8px;
    background: rgba(255, 255, 255, 0.98);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    z-index: 40;
  }

  /* decrease hero size */
  .hero-section h1 {
    font-size: 40px;
  }

  :root {
    --card-w: 200px;
    --card-h: 280px;
    --wheel-height: 480px;
  }

  .move-right {
    top: 40px;
    right: 80px;
    transform: rotate(-4deg) !important;
  }

  .move-left {
    top: 40px;
    left: 80px;
  }

  .wheel-container {
    margin-top: 80px;
  }
}

/* narrow widths */
@media (max-width: 480px) {
  header {
    padding: 12px 14px;
  }

  .nav-right {
    gap: 8px;
  }

  .search-wrapper {
    width: 65%;
    min-width: 140px;
    height: 40px;
  }

  .search-wrapper input[type="search"] {
    font-size: 14px;
    padding-left: 18px;
  }

  .search-icon {
    font-size: 12px;
    right: 13px !important;
  }

  .hero-section {
    position: static;
    transform: none;
    left: auto;
    width: 100%;
    padding: 12px;
  }

  .hero-section h1 {
    font-size: 32px;
    text-align: center;
  }


  .filter-wrapper {
    gap: 8px;
    height: 30px;
  }

  .filter-btn {
    width: 70px;
    font-size: 14px;
  }

  .wheel-container {
    margin-top: 50px;
  }

  .move-left {
    top: 2%;
    left: 10% !important;
  }

  .move-right {
    top: 2%;
    right: 10%;

  }

  /* smaller cards */
  :root {
    --card-w: 150px;
    --card-h: 220px;
    --wheel-height: 360px;
  }


  .card-content {
    padding-inline: 5px;
  }

  .card-content h3 {
    font-size: 14px;
  }

  .movie-rating h2 {
    font-size: 20px;
  }

  .hero-section {
    z-index: 30;
  }

  .controller-btn {
    width: 40px;
  }

  .controller-btn span {
    padding: .2rem;
  }


}

/* very small widths */
@media (max-width: 375px) {
  :root {
    --card-w: 140px;
    --card-h: 200px;
    --wheel-height: 320px;
  }

  .hero-section h1 {
    font-size: 28px;
  }

  .search-wrapper {
    width: 60%;
  }

  .filter-btn {
    width: 64px;
    font-size: 13px;
  }

  .card-content h3 {
    font-size: 13px;
  }

  .movie-rating {
    right: 10px;
  }

  .movie-rating h2 {
    font-size: 15px;
  }

  .movie-rating h2 span {
    font-size: 8px;
  }

  .card-content {
    padding-inline: 0;
  }
}

@media (min-width: 1600px) {
  :root {
    --card-w: 320px;
    --card-h: 420px;
    --wheel-height: 900px;
  }

  header {
    padding: 22px 72px;
  }

  .hero-section h1 {
    font-size: 84px;
  }

  .search-wrapper {
    width: 35%;
    min-width: 320px;
  }
}
