* {
  margin: 0;
  padding: 0;
  transition: all 0.5s ease;
  
}

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

html { 
  font-family: 'Inter', sans-serif;
}

h1, h2, h3, h4, h5, h6 { 
  color: hsl(0, 0%, 100%);
}

body {
  background: hsl(222, 25%, 10%);
  color: hsl(0, 0%, 88%);
}

img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  object-fit: cover;
}

input, button, select {
  font: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  color: rgb(216, 214, 214);
  cursor: pointer;
}

li { 
  list-style: none; 
}

a {
  text-decoration: none;
  display: block;
  color: rgb(216, 214, 214);
}

header, nav { 
  background: hsl(222, 25%, 10%);
}

.navbar, .banner, .movies, .category, .live {
  padding: 0 120px;
}

.section-heading {
  font-size: 40px;
  font-weight: 500;
  margin-bottom: 60px;
}

.container {
  max-width: 1440px;
  margin: auto;
}

/* Navbar section */

.navbar {
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-menu-btn { 
  display: none; 
}

.navbar a {
  display: flex;
  flex-direction: row;
  justify-content: start;
  align-items: center;
}

.navbar a img {
  width:40%;
  height: 50%;
}

.navbar a p {
  margin-right: 50px;
}

nav { 
  margin-right: 200px; 
}

.navbar-nav { 
  display: flex; 
}

.navbar-nav li:not(:last-child) { 
  margin-right: 60px; 
}

.navbar-link {
  font-size: 15px;
  font-weight: 500;
}

.navbar-link:hover { 
  color: hsl(214, 84%, 56%); 
}

.indicator { 
  position: relative; 
}

.indicator::after {
  content: '';
  background: hsl(0, 79%, 63%);
  position: absolute;
  top:   calc(50% - 1px);
  right: -15px;
  width:  4px;
  height: 4px;
  box-shadow: 0 0 0 2px hsla(0, 79%, 63%, 0.5);
  border-radius: 5px;
}

.navbar-actions {
  display:     flex;
  align-items: center;
}

.navbar-form {
  position: relative;
  margin-right: 50px;
}

.navbar-form-search {
  background: hsl(218, 39%, 14%);
  width: 100%;
  padding: 12px 20px;
  border-radius: 15px;
  color: hsl(0, 0%, 88%);
  font-size: 14px;
  font-weight: 500;
}

.navbar-form-btn {
  background: hsl(218, 39%, 14%);
  position: absolute;
  top:   calc(50% - 10px);
  right: 10px;
}

.navbar-form-btn ion-icon,
.navbar-search-btn ion-icon {
  font-size: 20px;
  color: hsl(214, 84%, 56%);
  --ionicon-stroke-width: 50px;
}

.navbar-form-btn:hover ion-icon,
.navbar-form-search::placeholder { 
  color: hsl(0, 0%, 88%); 
}

.navbar-form-close,
.navbar-search-btn { 
  display: none; 
}

.navbar-signin {
  display: flex;
  align-items: center;
  font-size: 15px;
}

.navbar-signin ion-icon {
  font-size: 22px;
  color: hsl(214, 84%, 56%);
  margin-left: 5px;
  --ionicon-stroke-width: 30px;
}

.navbar-signin:hover span { 
  color: hsl(214, 84%, 56%); 
}
/* End of Navbar Section */


/* Banner Section */
.banner { 
  margin-bottom: 60px; 
}

.banner-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 20px;
  cursor: pointer;
}

.banner-img { 
  object-position: top; 
}

.banner-card:hover .banner-img { 
  transform: scale(1.1); 
}

.banner-card .card-content {
  position: absolute;
  right:  80px;
  bottom: 60px;
  left:   80px;
}

.banner-card .card-info {
  display:     flex;
  align-items: center;
  margin-bottom: 20px;
}

.banner-card .card-info div {
  display:     flex;
  align-items: center;
  margin-right: 20px;
}

.banner-card .card-info ion-icon {
  font-size: 20px;
  color: hsl(211, 100%, 50%);
  margin-right: 5px;
}

.banner-card .card-info span { 
  font-weight: 600; 
}

.banner-card .card-info .quality {
  background: hsl(211, 100%, 50%);
  padding: 2px 5px;
  border-radius: 5px;
  font-weight: 700;
}

.banner-card .card-title {
  font-size: 3em;
  color: hsl(0, 0%, 100%);
  text-shadow: 2px 0 2px #0007;
}
/* End of Banner Section */


/* Movie Section */
.movies { margin-bottom: 60px; }

.filter-bar {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  background: hsl(218, 39%, 14%);
  padding: 20px 30px;
  border-radius: 20px;
  margin-bottom: 30px;
}

.filter-bar select {
  color: hsl(0, 0%, 100%);
  font-size: 14px;
  margin-right: 15px;
  cursor: pointer;
}

.filter-bar option { 
  background: hsl(218, 39%, 14%); 
}

.filter-radios {
  position: relative;
  background: hsl(222, 25%, 10%);
  padding: 10px;
  border-radius: 15px;
}

.filter-radios input { 
  display: none; 
}

.filter-radios label {
  position: relative;
  margin: 0 10px;
  font-size: 14px;
  user-select: none;
  cursor: pointer;
  z-index: 10;
}

.filter-radios input:checked + label,
.filter-radios label:hover { 
  color: hsl(214, 84%, 56%); 
}

input ~ .checked-radio-bg {
  background: hsl(218, 39%, 14%);
  position: absolute;
  top:    5px;
  left:   5px;
  bottom: 5px;
  width: 85px;
  border-radius: 10px;
}

#popular:checked ~ .checked-radio-bg {
  width: 73px;
  left:  90px;
}

#newest:checked ~ .checked-radio-bg {
  width:  81px;
  left:  163px;
}

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.movie-card {
  cursor: pointer;
}

.movie-card .card-head {
  position: relative;
  height: 250px;
  border-radius: 15px;
  margin-bottom: 15px;
  overflow: hidden;
}

.movie-card:hover .card-img { 
  transform: scale(1.1); 
}

.movie-card .card-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  backdrop-filter: blur(5px);
}

.movie-card:hover .card-overlay { 
  opacity: 1; 
}

.movie-card .bookmark,
.movie-card .rating {
  position: absolute;
  top: 15px;
  padding: 6px;
  border-radius: 10px;
  color: hsl(214, 84%, 56%);
  transform: scale(var(--scale));
}

.movie-card .bookmark {
  background: hsl(218, 39%, 14%);
  left: 15px;
}

.movie-card .bookmark:hover { 
  color: hsl(45, 100%, 54%); 
}

.movie-card .rating {
  display: flex;
  align-items: center;
  right: 15px;
  background: hsla(218, 39%, 14%, 0.8);
}

.movie-card .rating span {
  color: hsl(0, 0%, 100%);
  font-size: 13px;
  font-weight: 500;
  margin-left: 5px;
}

.movie-card ion-icon {
  font-size: 16px;
  display: block;
}

.movie-card .play {
  position: absolute;
  top:  50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.1);
}

.movie-card .play ion-icon {
  font-size: 60px;
}

.movie-card:hover :is(.bookmark, .rating) { 
  transform: scale(1.1); 
}

.movie-card .card-title {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 5px;
}

.movie-card:hover .card-title { 
  color: hsl(214, 84%, 56%); 
}

.movie-card .card-info {
  display: flex;
  font-size: 12px;
  font-weight: 500;
}

.movie-card .genre { 
  margin-right: 8px; 
}

.load-more {
  background: hsl(218, 39%, 14%);
  display: block;
  padding: 20px 50px;
  margin: auto;
  font-size: 14px;
  font-weight: 500;
  border-radius: 15px;
  color: hsl(0, 0%, 100%);
}

.load-more:hover { 
  background: hsl(214, 84%, 56%); 
}
/* End of Movie Section */


/* Category section */
.category { 
  margin-bottom: 60px; 
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.category-card {
  position: relative;
  height: 150px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
}

.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, #000a);
}

.category-card:hover .card-img { 
  transform: scale(1.1); 
}

.category-card .name,
.category-card .total {
  position: absolute;
  bottom: 20px;
  color: hsl(0, 0%, 100%);
  z-index: 20;
}

.category-card .name {
  left: 20px;
  font-size: 20px;
}

.category-card .total {
  right: 20px;
  font-size: 18px;
  background: hsla(218, 39%, 14%, 0.8);
  padding: 5px 8px;
  border-radius: 8px;
}

.category-card:hover .name { 
  color: hsl(214, 84%, 56%); 
}
/* End of Category section */


/* Live section */
.live { 
  margin-bottom: 60px; 
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.live-card { 
  cursor: pointer;
}

.live-card .card-head {
  position: relative;
  height: 250px;
  border-radius: 20px;
  margin-bottom: 15px;
  overflow: hidden;
}

.live-card .card-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, #000a);
}

.live-card:hover .card-img { 
  transform: scale(1.1); 
}

.live-card .live-badge,
.live-card .total-viewers {
  position: absolute;
  left: 30px;
  border-radius: 10px;
  padding: 5px 10px;
  z-index: 10;
}

.live-card .live-badge {
  top: 30px;
  font-size: 12px;
  font-weight: 500;
  background: hsl(0, 79%, 63%);
}

.live-card .total-viewers {
  bottom: 30px;
  font-size: 15px;
  font-weight: 600;
  background: hsla(218, 39%, 14%, 0.8);
}

.live-card .play {
  position: absolute;
  top:  50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  z-index: 10;
}

.live-card .play ion-icon {
  font-size: 60px;
}

.live-card:hover .play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1); 
}

.live-card .card-body {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.live-card .avatar {
  width: 40px;
  border-radius: 10px;
  margin-right: 15px;
}

.live-card .card-title {
  font-size: 22px;
  font-weight: 500;
}

.live-card:hover .card-title { 
  color: hsl(214, 84%, 56%); 
}
/* End of Live section */


/* Footer section */
footer {
  background: hsl(219, 32%, 10%);
  padding: 80px 120px 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid hsla(218, 39%, 14%, 0.8);
  padding-bottom: 80px;
}

.footer-brand {
  max-width: 250px;
  margin-right: 130px;
}

.footer-logo {
  width: 100px;
  margin-bottom: 30px;
}

.slogan {
  font-size: 14px;
  line-height: 20px;
  margin-bottom: 20px;
}

.social-link a { 
  display: inline-block; 
}

.social-link ion-icon {
  font-size: 25px;
  margin-right: 20px;
}

.footer-links {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 50px;
  align-items: flex-end;
}

.link-heading { 
  margin-bottom: 20px; 
}

.link-item { 
  font-size: 14px; 
}

ul .link-item:not(:last-child) { 
  margin-bottom: 10px;
}

.link-item:hover a { 
  color: hsl(214, 84%, 56%);
}

.footer-copyright {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 40px;
}

.footer-copyright p,
.wrapper a { 
  font-size: 14px; 
}

.wrapper a:hover { 
  color: hsl(214, 84%, 56%); 
}

.wrapper { 
  display: flex; 
}

.wrapper a:not(:last-child) { 
  margin-right: 30px;
}
/* End of Footer section */


/* Media Queries */
@media screen and (max-width: 1200px) {

  :root {
    padding: 0 80px 0 80px; 
  }

  header {
    position: fixed;
    top:  0;
    left: 0;
    width: 100%;
    overflow: hidden;
    z-index: 50;
  }

  header.active { 
    top: 250px; 
  }

  .navbar-menu-btn {
    display: block;
    position: absolute;
    top:  50%;
    left: 120px;
    transform: translateY(-50%);
  }

  .navbar-brand { 
    margin-left: 50px; 
  }

  .navbar-menu-btn span {
    display: block;
    background: hsl(0, 0%, 88%);
    width: 25px;
    height: 2px;
    margin: 8px;
  }

  .navbar-menu-btn .two   { 
    width: 20px; 
  }

  .navbar-menu-btn .three { 
    width: 15px; 
  }

  .navbar-menu-btn.active span { 
    background: hsl(214, 84%, 56%); 
  }

  .navbar-menu-btn.active .one { 
    transform: rotate(45deg) translateY(14px); 
  }

  .navbar-menu-btn.active .two { 
    width: 0;
  }

  .navbar-menu-btn.active .three {
    width: 25px;
    transform: rotate(-45deg) translateY(-14px); 
  }

  nav {
    position: fixed;
    top: -250px;
    left: 0;
    width: 100%;
    z-index: 100;
  }

  nav.active { 
    top: 0; 
  }

  .navbar-nav {
    height: 250px;
    flex-direction: column;
    justify-content: center;
    align-items:     flex-start;
    padding-left: 120px;
    border-bottom: 1px solid hsl(218, 39%, 14%);
  }

  .navbar-nav li:not(:last-child) {
    margin-right: 0;
    margin-bottom: 30px;
  }

  .navbar-form {
    position: absolute;
    top: 100%;
    left: 120px;
    right: 120px;
    height: 100%;
    background: hsl(222, 25%, 10%);
    margin-right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
  }

  .navbar-form.active { 
    top: 0; 
  }

  .navbar-form-search { 
    margin-right: 40px;
  }

  .navbar-form-btn { 
    right: 80px; 
  }

  .navbar-form-close {
    display: block;
    padding-top: 4px;
    opacity: 0.8;
  }

  .navbar-form-close:hover { 
    opacity: 1; 
  }

  .navbar-form-close ion-icon {
    font-size: 20px;
    color: hsl(214, 84%, 56%);
  }

  .navbar-search-btn {
    display: block;
    margin-right: 100px;
    padding-top: 5px;
  }

 /* Banner */
  .banner { 
    margin-top: 100px; 
  }

  .banner-card .card-title { 
    font-size: 2.5em; 
  }


  /* Category */
  .category-grid { 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
  }

  /* Footer */
  .footer-content { 
    flex-direction: column; 
  }

  .footer-brand {
    margin-right: 0;
    margin-bottom: 60px;
  }

  .footer-links { 
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); 
  }
  
}


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

  :root {
    padding: 0 60px 0 60px; 
  }

  /* Banner */
  .banner-card .card-content {
    bottom: 40px;
    left: 60px;
    right: 60px;
  }
}


@media screen and (max-width: 768px) {
  :root {
    padding: 0 40px 0 40px; 
  }

  /* Banner */
  .banner { 
    display: none;
  }

  /* Movie */
  .movies { 
    margin-top: 120px; 
  }

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar select { 
    margin-bottom: 20px; 
  }

  .filter-radios { 
    width: 100%; 
  }

}


@media screen and (max-width: 575px) {
  :root {
    padding: 0 20px 0 20px; 
  }

  .section-heading {
    font-size: 32;
  }

  .navbar-search-btn { 
    margin-right: 20px; 
  }

  .navbar-form-search { 
    margin-right: 20px; 
  }

  .navbar-form-btn { 
    right: 55px; 
  }

  /* Footer */
  .footer-copyright { 
    flex-direction: column-reverse; 
  }

  .wrapper { 
    margin-bottom: 20px; 
  }
}