@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:'Poppins',sans-serif;
}

html{
  scroll-behavior:smooth;
}

body{
  background:#050505;
  color:white;
  padding-bottom:110px;
  overflow-x:hidden;

  text-rendering:optimizeSpeed;
  -webkit-font-smoothing:antialiased;
}

/* NAVBAR */

nav{
  width:100%;
  padding:22px 14px;
  position:sticky;
  top:0;
  z-index:999;
  backdrop-filter:blur(18px);
  background:rgba(5,5,5,0.75);
}

.logo{
  font-size:34px;
  font-weight:700;
  color:#ff2d2d;
  letter-spacing:2px;
}

.logo span{
  color:white;
}

/* SEARCH PAGE */

.search-page{
  padding:16px 14px;
}

.search-page input{
  width:100%;
  height:55px;
  border:none;
  outline:none;
  border-radius:18px;
  padding:0 18px;
  background:rgba(255,255,255,0.08);
  border:1px solid rgba(255,255,255,0.08);
  color:white;
  font-size:15px;
  backdrop-filter:blur(12px);
  transition:0.25s ease;

  will-change:transform;
}

.search-page input:focus{
  border-color:#ff2d2d;
  box-shadow:
    0 0 15px rgba(255,45,45,0.2);
}

.search-page input::placeholder{
  color:rgba(255,255,255,0.5);
}

/* HERO SLIDER */

.top-slider{
  padding:0 14px;
}

.top-row{
  display:flex;
  gap:15px;
  overflow-x:auto;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;

  contain:layout paint;
}

.top-row::-webkit-scrollbar{
  display:none;
}

/* HERO CARD */

.top-card{
  min-width:320px;
  height:200px;
  position:relative;
  overflow:hidden;
  border-radius:22px;
  flex-shrink:0;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.06);
  scroll-snap-align:start;

  transition:0.22s ease;

  will-change:transform;
  transform:translateZ(0);
}

.top-card:hover{
  transform:scale(1.01);
}

.top-card img{
  width:100%;
  height:100%;
  object-fit:cover;

  backface-visibility:hidden;
}

/* HERO OVERLAY */

.top-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(
      135deg,
      rgba(255,45,45,0.15),
      transparent 60%
    );
  z-index:1;
}

.banner-overlay{
  position:absolute;
  left:0;
  bottom:0;
  width:100%;
  padding:22px;
  z-index:2;
  background:
    linear-gradient(
      to top,
      rgba(0,0,0,0.98),
      transparent
    );
}

.banner-title{
  font-size:24px;
  font-weight:700;
  margin-bottom:6px;
}

.banner-rating{
  font-size:14px;
  color:#ffd54f;
}

/* MOVIE SECTION */

.movie-section{
  padding:18px 14px;
  position:relative;
}

.movie-section::after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  width:60px;
  height:100%;
  pointer-events:none;
  background:
    linear-gradient(
      to left,
      #050505,
      transparent
    );
}

.section-title{
  font-size:22px;
  font-weight:600;
  margin-bottom:14px;
}

/* MOVIE ROW */

.movie-row{
  display:flex;
  gap:12px;
  overflow-x:auto;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;

  contain:layout paint;
  will-change:scroll-position;

  padding-bottom:4px;
}

.movie-row::-webkit-scrollbar{
  display:none;
}

/* SEARCH GRID */

.search-grid{
  display:grid;
  grid-template-columns:
    repeat(3,1fr);

  gap:12px;

  padding-bottom:120px;
}

/* SEARCH CARDS */

.search-grid .netflix-card{
  width:100%;
  height:185px;
}

/* MOVIE CARD */

.netflix-card{
  width:130px;
  height:195px;
  overflow:hidden;
  border-radius:18px;
  flex:none;
  position:relative;

  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.06);

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;

  cursor:pointer;
  scroll-snap-align:start;

  will-change:transform;
  transform:translateZ(0);
}

.netflix-card:hover{
  transform:translateY(-3px) scale(1.02);

  z-index:20;

  box-shadow:
    0 10px 22px rgba(0,0,0,0.35);
}

.poster-wrapper{
  width:100%;
  height:100%;
  position:relative;
}

.netflix-card img{
  width:100%;
  height:100%;
  object-fit:cover;

  backface-visibility:hidden;
  image-rendering:auto;
}

/* MOVIE INFO */

.movie-info{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:12px;

  background:
    linear-gradient(
      to top,
      rgba(0,0,0,0.92),
      transparent
    );

  opacity:0;

  transition:0.2s ease;
}

.netflix-card:hover .movie-info{
  opacity:1;
}

.movie-title{
  font-size:13px;
  font-weight:600;
}

/* RATING */

.movie-rating{
  position:absolute;
  top:8px;
  right:8px;

  background:rgba(0,0,0,0.78);

  color:#ffd54f;

  font-size:12px;
  font-weight:600;

  padding:4px 8px;

  border-radius:20px;

  backdrop-filter:blur(5px);
}

/* LOADING SKELETON */

.skeleton-card{
  width:130px;
  height:195px;
  border-radius:18px;
  flex:none;

  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,0.05),
      rgba(255,255,255,0.10),
      rgba(255,255,255,0.05)
    );

  background-size:200% 100%;

  animation:shine 1.1s infinite linear;
}

@keyframes shine{

  0%{
    background-position:200% 0;
  }

  100%{
    background-position:-200% 0;
  }

}

/* BOTTOM NAVIGATION */

.bottom-bar{
  position:fixed;
  bottom:18px;
  left:50%;
  transform:translateX(-50%);

  width:86%;
  max-width:360px;
  height:72px;

  display:flex;
  justify-content:space-around;
  align-items:center;

  background:rgba(20,20,20,0.92);

  border:1px solid rgba(255,255,255,0.08);

  backdrop-filter:blur(12px);

  border-radius:40px;

  box-shadow:
    0 8px 25px rgba(0,0,0,0.45);

  z-index:9999;
}

/* FIX NAVIGATION LINKS */

.bottom-item{
  width:50px;
  height:50px;

  display:flex;
  align-items:center;
  justify-content:center;

  text-decoration:none;
  color:white;

  background:rgba(255,255,255,0.08);

  border:1px solid rgba(255,255,255,0.08);

  border-radius:16px;

  transition:0.22s ease;

  cursor:pointer;

  will-change:transform;
}

.bottom-item:visited{
  color:white;
}

/* ACTIVE + HOVER */

.bottom-item:hover,
.bottom-item.active{
  background:#ff2d2d;

  transform:translateY(-2px);

  box-shadow:
    0 6px 16px rgba(255,45,45,0.25);
}

/* ICON */

.icon{
  width:22px;
  height:22px;

  fill:none;
  stroke:#ffffff;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* MOBILE */

@media(max-width:480px){

  .top-card{
    min-width:290px;
    height:180px;
  }

  .netflix-card{
    width:115px;
    height:175px;
  }

  .search-grid{
    gap:10px;
  }

  .search-grid .netflix-card{
    height:170px;
  }

  .banner-title{
    font-size:21px;
  }

}
/* REMOVE TEXT SELECTION */

*{
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  user-select:none;

  -webkit-tap-highlight-color:transparent;
}