:root {
    --bg-color: #f2f9f9;       /* Latar belakang utama: Toska pastel sangat lembut */
    --card-bg: #ffffff;        /* Kartu kontras tinggi berwarna putih bersih */
    --text-color: #1e3a3a;     /* Teks utama: Hijau/Toska gelap agar ramah mata dan terbaca jelas */
    --text-muted: #627d7d;     /* Teks sekunder: Toska abu-abu lembut */
    --primary-color: #00b4a2;  /* Warna utama aksi (tombol/aksen): Hijau Toska Cerah & Segar */
    --accent-color: #ff9f1c;   /* Rating/Highlight: Kuning Oranye hangat yang ceria */
    --secondary-blue: #4ea8de; /* Elemen penunjang: Biru muda cerah */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden; /* Mencegah bug scroll horizontal di HP */
}

/* ==========================================
   HEADER & NAVBAR (FLOATING SMART TRANSITION)
   ========================================== */
header {
    position: fixed;
    /* Set posisi centering sejak awal agar transisi koordinat tidak patah */
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%; 
    z-index: 1000;
    background-color: rgba(242, 249, 249, 0); /* Transparan awal mengikuti warna bg baru */
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 0px;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
    padding: 15px 0;
    /* Gabungkan transisi dengan cubic-bezier untuk efek perlambatan yang elegan */
    transition: 
        width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        max-width 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        top 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.5s ease,
        border-radius 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.5s ease,
        box-shadow 0.5s ease,
        padding 0.5s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    transition: padding 0.5s ease;
}

/* Keadaan ketika halaman di-scroll down (Transisi Lembut) */
header.scrolled {
    top: 15px;
    width: 92%;
    max-width: 1160px;
    background-color: rgba(255, 255, 255, 0.85); /* Berubah menjadi putih semi transparan */
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(0, 180, 162, 0.15); /* Border toska tipis */
    border-radius: 50px; /* Lengkungan penuh berbentuk kapsul */
    box-shadow: 0 10px 25px rgba(0, 180, 162, 0.1); /* Shadow lembut kebiruan/toska */
    padding: 8px 0;
}

header.scrolled .navbar {
    padding: 0 25px;
}

.logo img {
    height: 35px;
    vertical-align: middle;
    transition: height 0.4s ease;
}

/* Sedikit mengecilkan logo saat scrolled agar space terkesan dinamis */
header.scrolled .logo img {
    height: 30px;
}

.search-bar input {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 180, 162, 0.3);
    padding: 8px 15px;
    border-radius: 20px;
    color: var(--text-color);
    outline: none;
    width: 250px;
    transition: all 0.3s ease;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

header.scrolled .search-bar input {
    background: rgba(242, 249, 249, 0.8);
    border-color: rgba(0, 180, 162, 0.4);
}

/* Hero / Featured Banner */
.hero {
    position: relative;
    height: 75vh;
    /* Gradasi diubah dari gelap menjadi gradasi terang transparan yang berujung pada warna latar belakang utama */
    background: linear-gradient(to bottom, rgba(242, 249, 249, 0.3), rgba(242, 249, 249, 0.1) 40%, var(--bg-color)), 
                url('https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?q=80&w=1200') no-repeat center center/cover;
    display: flex;
    align-items: flex-end;
    padding: 0 20px 60px 20px;
}

.hero-content {
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
}

.badge-movie {
    background: var(--secondary-blue); /* Menggunakan warna biru muda ceria */
    color: white;
    padding: 4px 10px;
    border-radius: 20px; /* Lebih membulat agar terkesan ramah anak */
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero h1 {
    font-size: 3rem;
    margin: 12px 0;
    line-height: 1.2;
    color: #0f2929;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8); /* Memastikan judul terbaca di atas gambar cerah */
}

.meta-info {
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 500;
}

.rating { color: var(--accent-color); font-weight: bold; }

.btn-watch {
    background: var(--primary-color);
    color: white;
    padding: 12px 35px;
    border: none;
    border-radius: 25px; /* Tombol dibuat round-pill agar tidak kaku */
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 180, 162, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-watch:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 180, 162, 0.4);
}

/* Video Grid Sections */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    font-size: 1.6rem;
    color: #122c2c;
    margin-bottom: 25px;
    position: relative;
    padding-left: 14px;
    font-weight: 700;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 5px;
    background: var(--primary-color);
    border-radius: 4px; /* Sudut tegak aksen diradius lembut */
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 22px;
    margin-bottom: 50px;
}

.video-card {
    background: var(--card-bg);
    border-radius: 14px; /* Sudut kartu lebih melengkung halus agar ramah anak */
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0, 180, 162, 0.05);
    border: 1px solid rgba(0, 180, 162, 0.05);
}

.video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 180, 162, 0.12);
}

.thumbnail-box {
    position: relative;
    padding-top: 140%; 
    background: #e2f0f0;
}

.thumbnail-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-number {
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 2.4rem;
    font-weight: 900;
    /* Mengubah bayangan text-shadow hitam pekat menjadi warna drop shadow tipis modern */
    text-shadow: 1px 1px 0 #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 0 4px 8px rgba(0,0,0,0.15);
    color: var(--secondary-blue); /* Angka ranking menggunakan biru muda yang stand-out */
    z-index: 2;
}

.card-info {
    padding: 12px;
}

.card-info h3 {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 6px;
    color: var(--text-muted);
    font-weight: 500;
}

footer {
    text-align: center;
    padding: 35px;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 180, 162, 0.1);
    margin-top: 60px;
    background: #eef7f7;
}

/* ==========================================
   MEDIA QUERIES (OPTIMASI MOBILE & TABLET)
   ========================================== */
/* 📱 Ukuran Layar HP / Mobile (Maksimal 768px) */
@media (max-width: 768px) {
    header {
        padding: 10px 0;
    }

    header.scrolled {
        width: 94%;
        top: 10px;
        padding: 6px 0;
        border-radius: 30px;
    }

    .navbar {
        padding: 0 15px;
    }

    .logo img {
        height: 28px;
    }
    
    header.scrolled .logo img {
        height: 24px;
    }

    .search-bar input {
        width: 140px;
        padding: 6px 12px;
        font-size: 13px;
    }

    .hero {
        height: 60vh;
        padding-bottom: 40px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 13px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #274747;
    }

    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 14px;
    }

    .card-number {
        font-size: 2rem;
    }

    .card-info h3 {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }
}

@media (max-width: 360px) {
    .search-bar input {
        width: 110px;
    }
    
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}