/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #f0f0f0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

video {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Header */
.header {
    background-color: #1f1f1f;
    padding: 20px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.8);
}

.header .container {
  display: flex;
  justify-content: space-between; /* Logo kiri, nav kanan */
  align-items: center; /* Vertikal tengah */
}

.logo {
    color: #e50914;
    font-weight: 700;
    font-size: 28px;
    float: left;
    text-decoration: none;
}

.nav {
    float: right;
}

.nav a {
    color: #f0f0f0;
    text-decoration: none;
    margin-left: 10px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #e50914;
}

/* === Toggle Nav (Mobile Only) === */
.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  color: #f0f0f0;
  cursor: pointer;
}

/* Clear floats */
.header::after {
    content: "";
    display: block;
    clear: both;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.75)), url('https://images.unsplash.com/photo-1524985069026-dd778a71c7b4?auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 60px;
    margin-bottom: 15px;
    font-weight: 700;
}

.hero p {
    font-size: 30px;
    margin-bottom: 25px;
    color: #ccc;
}

.hero input {
    padding: 12px 20px;
    width: 60%;
    max-width: 500px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.hero input:focus {
    box-shadow: 0 0 10px #e50914;
}

.nav-item-with-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1f1f1f;
  border-radius: 20px;
  min-width: 160px;
  max-height: 500px; /* Batasi tinggi dropdown */
  overflow-y: auto;  /* Aktifkan scroll jika isi melebihi tinggi */
  z-index: 100;
  box-shadow: 0 4px 10px #e50914;
  flex-direction: column;
}

.dropdown-menu a {
  padding: 8px 15px;
  display: block;
  color: #f0f0f0;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background-color: #333;
  color: #e50914;
}

.nav-item-with-dropdown:hover .dropdown-menu {
  display: block;
}

/* Film List */
.film-list {
    display: grid;
    grid-template-columns: repeat(11, 140px);
    gap: 20px;
    padding: 40px 0;
    margin: 0 auto;
    justify-content: center;
}

.film-card {
    background-color: #1f1f1f;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.film-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(229, 9, 20, 0.7);
}

.film-card img {
    width: 100%;
    display: block;
    height: 280px;
    object-fit: fill;
}

.film-card h3 {
    padding: 15px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #f0f0f0;
    text-align: center;
}


.film-card {
  position: relative;
  overflow: hidden;
}

.film-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s ease;
}

.btn-movie {
  background-color: #e50914;
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
}

.film-card:hover .film-overlay {
  opacity: 1;
}


/* Footer */
footer {
    background-color: #1f1f1f;
    padding: 25px 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.film-Detail-container {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: #1f1f1f;
  border-radius: 12px;
  color: #f0f0f0;
}

.film-Detail img {
  width: 300px;
  border-radius: 10px;
}

.film-info {
  flex: 1;
  min-width: 200px;
}

.btn-trailer {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 18px;
  background-color: #e50914;
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
}


@media (max-width: 480px) {
    .film-card {
    height: 100%; /* Atur tinggi box film di HP sesuai kebutuhan */
    }

    .film-list {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px;
        padding: 20px 10px;
    }

    .film-card img {
    height: 120px; /* Sesuaikan tinggi gambar supaya proporsional */
    }

    .film-card h3 {
    font-size: 14px;
    padding: 8px 10px;
    text-align: center;
    }

    .film-card.active .film-overlay {
    opacity: 1;
  }

    .hero {
    background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.75)), url('https://images.unsplash.com/photo-1524985069026-dd778a71c7b4?auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    padding: 20px 0;
    text-align: center;
    }

    .hero h2 {
    font-size: 23px;
    margin-bottom: 15px;
    font-weight: 700;
    }

    .hero p {
    font-size: 15px;
    margin-bottom: 25px;
    color: #ccc;
    }

    .hero input {
    padding: 12px 20px;
    width: 60%;
    max-width: 500px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.3s ease;
    }

    .hero input:focus {
    box-shadow: 0 0 10px #e50914;
    }
}

#detailfilm ul li {
  border-bottom: 1px solid #333;
  padding: 6px 0;
}

.poster-img {
  width: 100%;
  max-width: 350px; /* Batas maksimal lebar poster */
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 1rem auto;
}

/* Responsive */
@media (max-width: 768px) {
    .header .container {
    justify-content: center;
    position: relative;
    height: 20px;
  }

  .logo {
    margin: 0 auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    text-decoration: none;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11;
  }

  .nav {
    display: none;
    flex-direction: column;
    align-items: first baseline;
    font-size: 15px;
    background-color: #1f1f1f;
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    padding-bottom: 10px;
    z-index: 10;
  }

  .nav.show {
    display: flex;
  }

  .nav a {
    margin: 10px 0;
  }

.film-card.active .film-overlay {
    opacity: 1;
  }


.nav-item-with-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1f1f1f;
  border-radius: 5px;
  min-width: 170px;
  max-height: 400px; /* Batasi tinggi dropdown */
  overflow-y: auto;  /* Aktifkan scroll jika isi melebihi tinggi */
  z-index: 100;
  box-shadow: 0 4px 10px #e50914;
  flex-direction: column;
}

.dropdown-menu a {
  padding: 1px 15px;
  display: block;
  color: #f0f0f0;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background-color: #333;
  color: #e50914;
}

.nav-item-with-dropdown:hover .dropdown-menu {
  display: block;
}

.poster-img {
  width: 100%;
  max-width: 100%; /* Batas maksimal lebar poster */
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 1rem auto;
}

    .film-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 20px 10px;
    }

    .film-card h3 {
    font-size: 11px;
    padding: 8px 10px;
    text-align: center;
    }

    .nav {
        float: none;
        text-align: left;
        margin-top: 10px;
    }

    .nav a {
        margin: 10px 15px;
        display: inline-block;
    }

    .hero input {
        width: 90%;
    }

    .film-card img {
        height: 150px;
    }

    .hero {
    background: linear-gradient(rgba(0,0,0,0.75), rgba(0,0,0,0.75)), url('https://images.unsplash.com/photo-1524985069026-dd778a71c7b4?auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    padding: 13px 0;
    text-align: center;
    }

    .hero h2 {
    font-size: 35px;
    margin-bottom: 15px;
    font-weight: 700;
    }

    .hero p {
    font-size: 15px;
    margin-bottom: 25px;
    color: #ccc;
    }

    .hero input {
    padding: 12px 20px;
    width: 60%;
    max-width: 500px;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    outline: none;
    transition: box-shadow 0.3s ease;
    }

    .hero input:focus {
    box-shadow: 0 0 10px #e50914;
    }
}

@media (min-width: 769px) {
  .film-list {
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 20px 10px;
    }
  .film-card h3 {
    font-size: 13px;
    padding: 8px 10px;
    text-align: center;
    }
    .film-card.active .film-overlay {
    opacity: 1;
  }
}