@import url("../../styles/global.css");

html,body {
  display: flex;
  height: 100vh;
  margin: 0;
  position: relative;
  overflow-x: hidden;
  overflow-y: hidden;
  /* overflow: hidden; */
  font-family: var(--Font_Roboto);
  background-color: var(--TEXT-color_8);
}

.left {
  display: flex;
  position: absolute;
  z-index: 999;
  left: 0;
  flex-direction: column;
  align-items: center;
  width: 56px;
  background: #1d1d1d80;
  padding-top: 40px;
  backdrop-filter: blur(24px);
  box-shadow: 0px 40px 40px 8px #00000029;
}

.logo-div {
  margin-bottom: 64px;
}

.sidebar {
  width: 32px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.icon {
  margin-bottom: 80px;
  display: block;
  text-align: center;
}

.logout-button {
  margin-top: auto;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logout-button:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.logout-button img {
  width: 25px;
  height: 25px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(250, 32, 214, 0.7));
}

.icon img {
  /* width: 32px;
  height: 32px; */
  transition: filter 0.3s, transform 0.3s;
}

.icon img:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

.icon:hover {
  cursor: pointer;
}

.icon.active img {
  filter: brightness(0) saturate(100%) invert(70%) sepia(70%) 
          saturate(1000%) hue-rotate(140deg);
}

.right {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 101px;
}

.carousel-container {
  position: relative;
  height: 648px;
  width: 100%;
  overflow: hidden;
}

.carousel {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 850ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
 .slide {
  flex-shrink: 0;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
} 

.text-overlay {
  position: absolute;
  margin-left: 180px;
  color: white;
  z-index: 2;
  max-width: 632px;
  top: 50%;
  opacity: 0;
  transform: translateY(calc(-50% + 12px));
  transition:
    opacity 450ms ease 150ms,
    transform 650ms cubic-bezier(0.2, 0.7, 0.2, 1) 150ms;
}

.category {
  display: inline-block;
  background: #1d1d1d80;
  padding: 4px 8px 4px 8px;
  border-radius: 0px 8px 0px 8px;
  opacity: 0;
  font-family: var(--Font_Roboto);
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  text-align: left;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
  color: var(--Link-hover-color);
}

h1 {
  font-family: var(--Font_Roboto);
  font-size: 56px;
  font-weight: 500;
  line-height: 64px;
  text-align: left;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
  margin-bottom: 16px;
}

p {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.watch-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 200px;
  height: 56px;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background: none;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.watch-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 40px;
  padding: 2px;
  background: linear-gradient(135.87deg,
      #0feffd 1.25%,
      #ff00f5 51.73%,
      rgba(15, 239, 253, 0.22) 77.22%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  z-index: -1;
}

.watch-btn:hover {
  background: linear-gradient(135.87deg,
      rgba(15, 239, 253, 0.1),
      rgba(255, 0, 245, 0.1));
  color: #0feffd;
}

 .slide {
  width: 100%;
  flex-shrink: 0;
  position: relative;
  background-color: #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  opacity: 0.8;
  transition: opacity 700ms ease;
  aspect-ratio: 16 / 9;
} 

.slide.is-active {
  opacity: 1;
}

.slide.is-active .text-overlay {
  opacity: 1;
  transform: translateY(-50%);
}

.slide::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--TEXT-color_8));
  pointer-events: none;
  z-index: 1;
}

.carousel-buttons {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.carousel-buttons button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0.5;
}

.carousel-buttons button.active {
  opacity: 1;
  transform: scale(1.2);
}

@media (prefers-reduced-motion: reduce) {
  .carousel,
  .slide,
  .text-overlay,
  .carousel-buttons button {
    transition-duration: 1ms;
    transition-delay: 0ms;
  }
}

.category-section {
  color: white;
  padding-left: 56px;
}

.category-card {
  display: flex;
  gap: 20px;
  padding-left: 52px;
  padding-right: 52px;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
  position: relative;
}

.category-card::-webkit-scrollbar {
  display: none;
}

.category-card .movie-card {
  flex-shrink: 0;
}

.category-card.active {
  cursor: grabbing;
}

.movie-card {
  background: var(--TEXT-color_8);
  overflow: hidden;
  width: 240px;
  flex: 0 0 240px;
  height: 360px;
  border-radius: 15px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: flex-basis 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}


@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .movie-card:hover,
  .movie-card:focus-visible {
    width: 340px;
    flex-basis: 540px;
  }
}

.category-header {
  margin: 28px 0px 18px 52px;
  display: flex;
  align-items: center;
  /* color:  #0ffd2f; */
  font-family: "Raleway", sans-serif;
}

.category-slider {
  position: relative;
}

.category-scroll-button {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 60px;
  height: 375px;
  padding: 0;
  border: 0.6px solid transparent;
  border-radius: 12px;
  background: #1d1d1d80;
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.category-scroll-button-left {
  left: 4px;
  background: linear-gradient(to left, transparent, #1d1d1d99);
}

.category-scroll-button-right {
  right: 4px;
  background: linear-gradient(to right, transparent, #1d1d1d99);
}

.category-scroll-button svg {
  width: 40px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.category-scroll-button:hover:not(:disabled) {
  border-color: var(--Link-hover-color);
  color: var(--Link-hover-color);
}

.category-scroll-button:hover:not(:disabled) svg {
  transform: scale(1.15);
}

.category-scroll-button:disabled {
  border-color: transparent;
  opacity: 0;
  cursor: not-allowed;
}

.category-scroll-button:focus-visible {
  outline: 2px solid var(--Link-hover-color);
  outline-offset: 2px;
  
}

.category-P {
  font-family: "Raleway", sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  text-align: left;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;
  color:  #fa20d6;
  text-shadow:
    0 0 5px rgba(15, 239, 253, 0.4),
    0 0 12px var(--success-transparent-30, rgba(15, 239, 253, 0.3));
  margin: 0;
}

.category-header:hover .category-P {
  text-shadow:
    0 0 6px rgba(15, 239, 253, 0.55),
    0 0 16px var(--success-transparent-50, rgba(15, 239, 253, 0.5));
}

.chevron-icon {
  margin-left: 5px;
  display: inline-flex;
  width: 30px;
  height: 66px;
  color: var(--neon-color, #fa20d6);
  opacity: 1;
  filter: drop-shadow(0 0 6px var(--success-transparent-50, rgba(15, 239, 253, 0.5)));
}

.chevron-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.movie-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.movie-details {
  padding: 24px;
  text-align: left;
  position: absolute;
  bottom: 0;
  width: 100%;
  transition: transform 0.3s ease;
}

.movie-card:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

.movie-card:hover .movie-image {
  opacity: 0.5;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.movie-trailer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  z-index: 1;
}

.movie-card.is-playing .movie-image {
  opacity: 0.12;
}

.movie-card:hover .movie-details,
.movie-card:focus-visible .movie-details {
  z-index: 2;
  transform: translateY(-20%);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.movie-category {
  display: inline-block;
  background: #1d1d1d80;
  padding: 4px 8px;
  border-radius: 0px 8px 0px 8px;
  color: var(--Link-hover-color);
  font-size: 14px;
  font-weight: 500;
}

.movie-title {
  margin: 0;
  color: white;

  font-family: var(--Font_Roboto);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  text-align: left;
  text-underline-position: from-font;
  text-decoration-skip-ink: none;

  padding-top: 12px;
}

.star {
  color: #ccc;
  font-size: 18px;
  margin-right: 2px;
  display: inline-block;
  position: relative;
  padding-top: 12px;
}

.star.filled {
  color: gold;
}

.star.half {
  background: linear-gradient(90deg, gold 50%, #ccc 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}