/* Sukanulis Custom Style 2026 
   Main UI + Ads System (Fully Optimized & Synchronized)
*/

/* Variabel Warna Utama */
:root { 
    --accent: #ea580c; 
    --glass: rgba(255, 255, 255, 0.8); 
}

/* Base Style */
body { 
    background-color: #ffffff; 
    color: #0f172a; 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    overflow-x: hidden; /* Penting: Mencegah iklan lebar merusak layout mobile */
}

/* Hilangkan Scrollbar tapi tetap bisa di-scroll */
.hide-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.hide-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* --- HERO SLIDER --- */
.hero-slide { 
    display: none; 
    width: 100%; 
    transition: all 1s ease-in-out; 
}
.hero-slide.active { 
    display: block; 
    animation: zoomInFade 1s ease-out; 
}

@keyframes zoomInFade {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* --- STORY CARD --- */
.story-card {
    min-width: 150px; 
    width: 150px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (min-width: 768px) { 
    .story-card { min-width: 190px; width: 190px; } 
}

.story-card:hover { 
    transform: translateY(-10px); 
}

.img-container {
    position: relative; 
    aspect-ratio: 3/4;
    border-radius: 1.25rem; 
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.img-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.7s; 
}

.story-card:hover img { 
    transform: scale(1.1); 
}

/* --- VIRAL SECTION --- */
.viral-bg { 
    background: #020617; 
    border-radius: 3rem 3rem 0 0; 
}

.rank-number {
    position: absolute; 
    bottom: -15px; 
    left: -10px;
    font-size: 5rem; 
    font-weight: 900;
    line-height: 0.8; 
    color: var(--accent);
    -webkit-text-stroke: 2px rgba(255,255,255,0.8);
    z-index: 10; 
    font-style: italic;
}

/* --- LAYOUT SCROLL --- */
.horizontal-scroll {
    display: flex; 
    overflow-x: auto; 
    gap: 1.5rem; 
    padding-bottom: 2rem;
    scroll-snap-type: x mandatory;
}

.horizontal-scroll > * { 
    scroll-snap-align: start; 
}

/* --- ADS SYSTEM & POPUP (SYNCHRONIZED) --- */

/* Wrapper Utama Overlay Iklan */
.fixed-ads-overlay {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 10000 !important; /* Sinkron dengan PHP social_bar */
    pointer-events: none; /* Klik tembus ke konten belakang */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mengaktifkan klik hanya pada isi iklan & tombol close saja */
.fixed-ads-overlay > *, 
#social-bar-container button,
#social-bar-container .ad-res-wrap {
    pointer-events: auto !important;
}

/* Container Iklan Mobile Responsive */
.ad-res-wrap {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    text-align: center;
}

.ad-res-wrap img, 
.ad-res-wrap iframe, 
.ad-res-wrap ins {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0.5rem;
    display: block;
    margin: 0 auto;
}

/* Iklan Placeholder di Header */
.ad-slot-header { 
    margin: 15px auto; 
    text-align: center; 
    max-width: 100%; 
}

/* --- PROMO POPUP (HIGHEST PRIORITY) --- */
#promo-popup {
    z-index: 20000 !important; /* Harus di atas social bar */
}

#promo-content {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#promo-content.opacity-100 {
    opacity: 1 !important;
    transform: scale(1) !important;
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Button Langganan Premium */
.btn-premium {
    background: linear-gradient(90deg, #ea580c 0%, #f97316 100%);
    box-shadow: 0 10px 20px -5px rgba(234, 88, 12, 0.4);
    color: white !important;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    cursor: pointer;
}

.btn-premium:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Tambahan: Jarak aman bawah untuk HP modern */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}