/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Google Font Poppins: sudah include di layouts.app */
html,
body {
    font-family: "Poppins", sans-serif;
    background-color: #110027;
    color: hsl(210deg 20% 98% / 80%);
}

/* Container */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background-color: #1a0037;
}
header .logo {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
}
header .logo:hover {
    color: #7d00ff;
}
#nav a {
    margin: 0 8px;
    font-size: 1rem;
    color: #e2e8f0;
    text-decoration: none;
}
#nav a:hover {
    color: #7d00ff;
}

.search-bar {
    display: flex;
    width: 100%;
    background-color: #10032a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    margin: 1.5rem 0;
    align-items: center;
}

.search-bar .input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 12px;
}

.search-bar .icon {
    color: rgba(255, 255, 255, 0.5);
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.search-bar .search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-size: 1rem;
    padding: 14px 0;
    outline: none;
}

.search-bar .search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-bar .search-button {
    background-color: #1f2937;
    border: none;
    color: #e2e8f0;
    padding: 0 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
}

/* Responsive tweak (tidak diubah ke column biar tetap horizontal di mobile) */
@media (max-width: 640px) {
    .search-bar {
        flex-direction: row;
    }

    .search-bar .search-button {
        padding: 0 16px;
        font-size: 0.9rem;
    }
}


/* Video Grid */
.video-grid {
    display: grid;
    /* Desktop: 4 kolom */
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

/* Tablet */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile (portrait + landscape) */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Container Card */
.video-card {
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

/* Thumbnail */
.video-card .thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background-color: #111;
    background-image: var(--thumb); /* fallback jika inline style gagal */
    background-repeat: repeat; /* tile jika gambar kecil */
    background-size: contain; /* tampilkan penuh tanpa crop */
    background-position: center;
    transition: background 0.2s ease;
}

/* Gambar Utama */
.video-card .thumb img.main-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain; /* agar tidak pecah/ngezoom */
    display: block;
    border-radius: 8px;
    background-color: transparent; /* biar tidak tumpang tindih dengan bg .thumb */
}

/* Ikon Bolt */
.video-card .thumb .icon-bolt {
    position: absolute;
    bottom: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 4px;
    border-radius: 4px;
    color: #fff; /* ← ini supaya bolt putih */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px; /* sesuaikan agar ikon proporsional */
    line-height: 1;
    z-index: 1;
}

/* Judul Video */
.video-card .title {
    margin: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    color: hsl(210deg 20% 98% / 80%);
}

/* Title */
.video-card .title {
    margin: 0.5rem;
    font-size: 1rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    color: hsl(210deg 20% 98% / 80%);
}

/* Pagination Container */
.pagination-container {
    margin: 2rem auto;
    max-width: 900px;
    padding: 0 1rem;
}
.pagination-container nav {
    display: flex;
    justify-content: center;
}
.pagination-container ul.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}
.pagination-container li .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    background: #26004d;
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.2s;
}
.pagination-container li a.page-link:hover {
    background: rgba(29, 0, 71, 0.6);
}
.pagination-container li.active .page-link {
    background: transparent;
    border: 2px solid #7d00ff;
}
.pagination-container li.disabled .page-link {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: default;
}

/* Footer */
.site-footer {
    background-color: #1a0037;
    color: #e2e8f0;
    padding: 3rem 0;
    font-size: 0.9rem;
}
.site-footer .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}
.footer-desc {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.footer-links {
    list-style: disc inside;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.7);
    text-align: center;
}

/* Hamburger Menu */
.hamburger {
    font-size: 24px;
    color: white;
    cursor: pointer;
    display: none;
}
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    #nav {
        display: none;
        flex-direction: column;
        gap: 10px;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: #1a0037;
        padding: 1rem;
    }
    #nav.active {
        display: flex;
    }
}
