:root {
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-dark: rgba(0,0,0,0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#pageNotification { position: fixed; top: 20px; left: 20px; background: rgba(0, 0, 0, 0.85); color: white; padding: 12px; border-radius: 8px; z-index: 10000; width: 90%; max-width: 250px; box-shadow: 0 5px 20px rgba(0,0,0,0.4); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(8px); opacity: 0; transform: translateX(-20px); transition: opacity 0.5s ease, transform 0.5s ease; pointer-events: none; }
#pageNotification.visible { opacity: 1; transform: translateX(0); pointer-events: auto; }
.notification-content { display: flex; align-items: center; gap: 10px; }
.notification-icon { font-size: 14px; font-weight: bold; background-color: #e74c3c; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notification-text p { font-size: 13px; margin-bottom: 10px; line-height: 1.4; }
.notification-buttons { display: flex; gap: 8px; }
.notification-btn { flex-grow: 1; padding: 7px; border: none; border-radius: 5px; font-weight: 600; cursor: pointer; font-size: 12px; transition: background-color 0.2s ease, transform 0.2s ease; }
.notification-btn:active { transform: scale(0.95); }
#notificationExitBtn { background-color: #555; color: white; }
#notificationContinueBtn { background-color: #27ae60; color: white; }

.container {
    max-width: 900px;
    width: 100%;
    margin: auto;
    background: #28756E;
    border-radius: 15px;
    box-shadow: 0 20px 40px var(--shadow-dark);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.container-single-video {
    flex-grow: 0;
}

.main-video-section {
    padding: 30px;
    background: #28756E;
}

.video-embed-container {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 auto 10px auto; /* Reduced bottom margin */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-dark);
    background: #000;
    aspect-ratio: 16 / 9;
    cursor: pointer;
}

#mainVideoPlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5; /* Pastikan di atas facade */
    display: none; /* Sembunyikan awal */
}

.video-title-container { display: flex; justify-content: space-between; align-items: center; max-width: none; margin: 0 auto 15px auto; flex-wrap: wrap; gap: 10px; }
.video-title { flex-grow: 1; text-align: left; margin: 0; font-size: 24px; color: #f0f0f0; font-weight: 600; }
.banner-ad-container.banner-single-video { max-width: 728px; margin: 20px auto; }
.sponsored-single-video-container { text-align: center; margin-top: 20px; }

.ad-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); z-index: 11000; display: none; justify-content: center; align-items: center; }
.ad-overlay.visible { display: flex; }
.ad-content { position: relative; background-color: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); min-width: 300px; min-height: 250px; display: flex; justify-content: center; align-items: center; }
.close-ad-btn { position: absolute; top: -10px; right: -10px; width: 30px; height: 30px; background-color: #333; color: #fff; border: 2px solid #fff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; line-height: 1; cursor: pointer; font-weight: bold; }
#interstitialAdContainer { width: 100%; height: 100%; }
.banner-ad-container { max-width: 800px; margin: 0 auto 30px auto; display: flex; justify-content: center; align-items: center; }
.adsbox { opacity: 0; position: absolute; bottom: 0; left: 0; height: 1px; width: 1px; pointer-events: none; }
.adblock-content { background-color: white; color: #333; padding: 30px 40px; border-radius: 10px; text-align: center; max-width: 400px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.adblock-content h2 { color: #c03b; margin-bottom: 15px; }

.player-facade-element { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transition: opacity 0.3s ease; }
#playerPreviewVideo { object-fit: cover; z-index: 1; }
#playerOverlay { background: linear-gradient(transparent 50%, rgba(0,0,0,0.7)); z-index: 2; }
#customPlayBtn { z-index: 3; background: none; border: none; width: 80px; height: 80px; margin: auto; top: 0; bottom: 0; left: 0; right: 0; padding: 0; }
#customPlayBtn svg { display: block; width: 100%; height: 100%; }
#customPlayBtn .play-btn-fill { fill: #212121; fill-opacity: 0.8; transition: fill-opacity 0.2s ease; }
#customPlayBtn .play-btn-icon { fill: #ffffff; }
#customPlayBtn:hover .play-btn-fill { fill-opacity: 1; }
.video-embed-container.player-active .player-facade-element { opacity: 0; pointer-events: none; }
.video-embed-container.player-active #mainVideoPlayer { opacity: 1; display: block; }

.fullscreen-btn { position: absolute; top: 10px; right: 10px; z-index: 10; background-color: rgba(0, 0, 0, 0.5); color: white; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 5px; width: 35px; height: 35px; font-size: 20px; cursor: pointer; display: flex; justify-content: center; align-items: center; line-height: 1; transition: background-color 0.2s ease; }
.fullscreen-btn:hover { background-color: rgba(0, 0, 0, 0.8); }

@keyframes animated-gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.sponsored-btn, .download-btn { padding: 12px 24px; border: none; border-radius: 8px; color: white; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; transition: all 0.3s ease; background-size: 300% 300%; animation: animated-gradient 10s ease infinite; font-size: 15px; margin: 5px; }
.sponsored-btn:hover, .download-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.sponsored-btn { background-image: linear-gradient(to right, #e67e22, #d35400, #f39c12); }
.download-btn { background-image: linear-gradient(to right, #3498db, #2980b9, #1abc9c); }

.download-button-container {
    text-align: right;
    max-width: 800px; 
    margin: 0 auto;
}

/* --- GAYA BARU UNTUK WADAH NATIVE BANNER --- */
.native-banner-container {
    margin: 20px auto;
    max-width: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- KODE RESPONSIVE SELALU DI PALING AKHIR --- */
@media (max-width: 768px) { 
    body { padding: 10px; } 
    .main-video-section { padding: 20px; } 
    .video-title { font-size: 20px; } 
    .download-button-container { text-align: center; } 
}

@media (max-width: 480px) { 
    #pageNotification{ top: 10px; left: 10px; } 
    .main-video-section { padding: 15px; } 
}