/* ========================================================
   1. ANTI-SCROLL SYSTEM (WAJIB DI ATAS)
   ======================================================== */

.embed-body::-webkit-scrollbar,
html::-webkit-scrollbar {
    display: none !important;
}

.embed-body,
html {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

html {
    overflow-y: scroll;
}

body.embed-body,
body.embed-body html {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #161515;
    color: #161515;
    overflow-x: hidden;
}

/* ========================================================
   2. LAYOUT UTAMA (UPDATED: HEADER + NAV PINK)
   ======================================================== */
.main-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: #161515;
    min-height: 100vh;
}

header {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    background: #161515;
    z-index: 100;
}

.header-top {
    padding: 15px 20px;
    display: flex;
    justify-content: center; /* Logo di tengah karena home icon sudah pindah */
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo img {
    width: 35px;
    height: 35px;
}

.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* CONTAINER NAVIGASI PINK */
.main-nav {
    background: #ff74a0;
    width: 100%;
    padding: 12px 0; /* Sedikit lebih tebal biar mantap */
}

.main-nav ul {
    display: flex;
    justify-content: flex-start; /* Tetap mepet kiri/pinggir */
    list-style: none;
    padding: 0 20px;
    margin: 0;
    gap: 25px; /* Jarak antar tombol menu biar gak nyatu */
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    align-items: center;
}

.main-nav ul::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    text-decoration: none;
    color: #000000;
    
    /* Pake font Archivo Black/Montserrat tebal biar "Ngisi" */
    font-family: 'Montserrat', sans-serif; 
    font-size: 14px;
    font-weight: 900;
    
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px; /* Jarak ikon ke teks internal */
    
    /* Trik biar teks lebih 'gemuk' dan ngisi */
    transform: scaleX(1.05); 
    letter-spacing: -0.2px;
    transition: 0.2s;
}

.main-nav a.active, .main-nav a:hover {
    color: #ffffff;
}

/* Ukuran Ikon di dalam Nav */
.main-nav i {
    font-size: 16px; 
    /* Pastiin ikon gak ikut kena scale biar gak gepeng */
    transform: scaleX(1); 
}

/* ========================================================
   3. GRID HOME (LANDSCAPE 16:9)
   ======================================================== */
.content-container {
    padding: 15px;
    margin-top: 20px;
}

.section-title {
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}

.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: 16 / 9; 
    background: #0a0a0a;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumb-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.play-btn {
    display: none;
}

.info {
    padding: 12px 4px;
}

.title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .title {
        font-size: 13px;
    }
}

/* ========================================================
   4. PLAYER PAGE LAYOUT (VIDEO + ADS SIDEBAR)
   ======================================================== */
.player-layout-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 15px;
}

.video-main-content {
    flex: 2.5;
    min-width: 300px;
}

.ads-sidebar {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
}

.ads-wrapper {
    width: 100%;
    padding: 10px;
    text-align: center;
    min-height: 250px;
}

.player-container {
    width: 100%;
    background: #000;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    line-height: 0;
    border-radius: 0;
}

#videoEmbed {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.video-details {
    padding: 20px 0;
}

.video-details h1 {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.video-meta {
    font-size: 13px;
    color: #b9b9b9;
    display: flex;
    gap: 15px;
}

/* ========================================================
   5. CSS KHUSUS EMBED PLAYER (ICON PUTIH POLOS)
   ======================================================== */
.embed-body {
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    overflow: hidden !important;
    width: 100vw !important;
    height: 100vh !important;
}

.embed-wrapper {
    width: 100vw;
    height: 100vh;
    overflow: hidden !important;
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ads-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
}

.play-icon-embed {
    width: auto;
    height: auto;
    background: none !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.play-icon-embed i {
    color: #ffffff;
    font-size: 50px;
    margin-left: 10px;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
}

.ads-overlay:hover .play-icon-embed {
    transform: scale(1.15);
}

video#myVideo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* ========================================================
   6. PLYR CLEANUP (FIX CLICK TO PAUSE & ICON)
   ======================================================== */
:root {
    --plyr-color-main: #ffffff;
}

#overlay:not([style*="display: none"])~.plyr .plyr__control--overlaid {
    display: none !important;
}

.plyr__control--overlaid {
    background: transparent !important;
    color: #fff !important;
    padding: 0 !important;
    opacity: 0;
}

.plyr--paused .plyr__control--overlaid {
    opacity: 1 !important;
    display: flex !important;
}

.plyr__control--overlaid svg {
    width: 50px !important;
    height: 50px !important;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
}

.plyr--video {
    background: #000 !important;
}

.plyr {
    height: 100% !important;
    width: 100% !important;
}

.plyr video {
    cursor: pointer;
}

.plyr--full-ui.plyr--video .plyr__control--overlaid {
    background: transparent !important;
}

@media (max-width: 600px) {
    .plyr__volume {
        min-width: 40px !important;
    }
}

/* ========================================================
   7. AUTO-HIDE CONTROLS BEFORE PLAY (GHAIB MODE)
   ======================================================== */

.plyr--paused .plyr__controls,
.plyr--stopped .plyr__controls {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease;
}

.plyr--playing .plyr__controls {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.plyr--playing.plyr--paused .plyr__controls {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ========================================================
   7. FOOTER, PAGINATION & OTHERS
   ======================================================== */
.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;
}

.wa {
    background-color: #25d366;
}

.fb {
    background-color: #1877f2;
}

.tg {
    background-color: #0088cc;
}

.cp {
    background-color: #606060;
}

body {
    animation: fadeInPage 0.5s ease-in-out;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#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;
}

.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: 20px 0 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 7px;
    align-items: center;
}

.page-btn {
    min-width: 35px;
    height: 35px;
    padding: 0 10px;
    background: #333333;
    border: none;
    color: #ffffff;
    font-weight: 400;
    font-size: 16px;
    border-radius: 5px; 
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-btn:hover:not(:disabled) {
    background: #444444;
}

.page-btn.active {
    background: #ff74a0;
    color: #ffffff;
}

.page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    background: #222222;
}

.page-dots {
    color: #ffffff;
    font-size: 16px;
    padding: 0 5px;
}

/* FOOTER */
footer {
    background: #161515;
    padding: 50px 20px 30px;
    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: #ffffff;
    text-transform: lowercase;
}

.footer-text {
    color: #b9b9b9;
    font-size: 14px;
    max-width: 500px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.copyright {
    color: #999;
    font-size: 12px;
    padding-top: 20px;
}

@media (max-width: 600px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .brand-name {
        font-size: 20px;
    }

    .title {
        font-size: 13px;
    }

    .plyr__volume {
        min-width: 40px !important;
    }

    .player-layout-container {
        margin-top: 10px;
        padding: 0 10px;
    }
}