/* GLOBAL STYLE - FIX GOYANG */
html {
    overflow-y: scroll;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f2f5;
    color: #1c1e21;
    overflow-x: hidden;
}

.main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* HEADER */
header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo img {
    width: 30px;
    height: 30px;
}

.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #1a1a1b;
    text-transform: lowercase;
}

/* ========================================================
   GRID HOME (POTRET 2:3)
   ======================================================== */
.content-container {
    padding: 15px;
}

.section-title {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.video-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.video-card:hover {
    transform: translateY(-5px);
}

.thumb-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-btn {
    display: none;
}

.info {
    padding: 12px 4px;
}

.title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: #1a1a1b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================================
   PLAYER PAGE (16:9)
   ======================================================== */
.player-container {
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-details {
    padding: 20px;
}

.video-details h1 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1b;
    margin-bottom: 15px;
    line-height: 1.4;
}

.video-meta {
    font-size: 13px;
    color: #606060;
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-back {
    background: #f2f2f2;
    padding: 10px 18px;
    border-radius: 20px;
    text-decoration: none;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    transition: background 0.2s;
}

.btn-back:hover {
    background: #e5e5e5;
}

/* ========================================================
   PLYR THEME OVERRIDE (FIX BAR JALAN PUTIH PEKAT)
   ======================================================== */
:root {
    --plyr-color-main: #ffffff;
}

.plyr--video {
    --plyr-range-fill-background: #ffffff !important;
    --plyr-range-track-background: rgba(255, 255, 255, 0.2) !important;
}

.plyr__volume {
    min-width: 80px !important;
}

.plyr--full-ui.plyr--video .plyr__control--overlaid {
    background: rgba(0, 0, 0, 0.7) !important;
    padding: 15px !important;
}

.plyr--full-ui.plyr--video .plyr__control--overlaid svg {
    width: 40px !important;
    height: 40px !important;
}

.plyr {
    height: 100%;
    width: 100%;
}

.plyr--video .plyr__control.plyr__tab-focus,
.plyr--video .plyr__control:hover,
.plyr--video .plyr__control[aria-expanded=true] {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.share-container {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.btn-share {
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}
.btn-share:hover { opacity: 0.8; }
.wa { background-color: #25d366; }
.fb { background-color: #1877f2; }
.tg { background-color: #0088cc; }
.cp { background-color: #606060; }

/* Efek Fade In Halaman */
body {
    animation: fadeInPage 0.5s ease-in-out;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Overlay Loading biar gak kedip putih */
#page-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-out;
    pointer-events: none; /* Biar gak ngeblok klik setelah ilang */
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1a1a1b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#pagination-wrapper {
    width: 100%;
    margin-top: 40px;
    padding-bottom: 60px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-btn {
    min-width: 35px;
    height: 35px;
    border: 1px solid #e0e0e0;
    background: #fff;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 14px;
}

.page-btn.active {
    background: #1a1a1b;
    color: #fff;
    border-color: #1a1a1b;
}

.page-btn:hover:not(:disabled) {
    background: #f0f2f5;
}

footer {
    background: #f9f9f9;
    padding: 50px 20px 30px;
    border-top: 1px solid #eee;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.footer-logo img {
    width: 30px;
    height: 30px;
}

.footer-logo span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #1a1a1b;
    text-transform: lowercase;
}

.footer-text {
    color: #666;
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    text-decoration: none;
    color: #1a1a1b;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #5d5d5d;
}

.copyright {
    color: #999;
    font-size: 12px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Responsif buat HP */
@media (max-width: 480px) {
    footer {
        padding: 40px 15px 25px;
    }
    .footer-links {
        gap: 15px;
    }
}

/* ========================================================
   RESPONSIVE HP
   ======================================================== */
@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .brand-name {
        font-size: 18px;
    }

    .title {
        font-size: 13px;
    }

    .plyr__volume {
        min-width: 40px !important;
    }
}