.overlay-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}
.box-popup {
    background: #222;
    color: #fff;
    padding: 30px 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 340px;
    box-shadow: 0 0 25px rgba(0,0,0,0.4);
}
.judul-popup {
    font-size: 19px;
    font-weight: bold;
    margin: 0 0 20px 0;
    line-height: 1.3;
}
.isi-popup {
    font-size: 14px;
    line-height: 1.6;
    color: #e0e0e0;
    margin-bottom: 30px;
}
.tombol-tutup {
    text-align: right;
}
.tombol-tutup button {
    background: transparent;
    border: none;
    color: #75d8e5;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

/* CSS DAFTAR GAME DINAMIS */
.game-grid-container {
    padding: 15px;
    background: rgba(0,0,0,0.6);
    border-radius: 8px;
    margin: 10px;
    border: 1px solid #d4af37;
}
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (min-width: 768px) {
    .game-grid { grid-template-columns: repeat(5, 1fr); }
}
.game-item {
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
    border: 1px solid #444;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.6);
    transition: transform 0.2s;
}
.game-item:hover {
    transform: scale(1.03);
    border-color: #d4af37;
}
.game-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
}
.game-item-title {
    padding: 6px 4px;
    font-size: 11px;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.game-item-play {
    display: block;
    background: linear-gradient(180deg, #d4af37 0%, #8c6d1f 100%);
    color: #000;
    padding: 6px;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
    border-top: 1px solid #ecc556;
}
.btn-back-provider {
    display: inline-block;
    padding: 8px 15px;
    background: #018bce;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: bold;
}
.btn-back-provider:hover { background: #016b9e; color: #fff;}
</style>

<!-- Struktur Popup -->
<div class="overlay-popup" id="popupNotif">
    <div class="box-popup">
        <div class="judul-popup"><?php echo $_SERVER['HTTP_HOST']; ?> menyatakan</div>
        <div class="isi-popup"><?php echo $pesan_notif; ?></div>
        <div class="tombol-tutup">
            <button onclick="tutupPopup()">Oke</button>
        </div>
    </div>
</div>

<!-- Script -->
<script>
function tutupPopup() {
    document.getElementById('popupNotif').style.display = 'none';
}

// Tampilkan otomatis jika ada pesan
<?php if (!empty($pesan_notif)) { ?>
window.onload = function() {
    document.getElementById('popupNotif').style.display = 'flex';
};
<?php } ?>
</script>
  
    <style type="text/css">
        @media screen and (min-width: 600px) {
            .game-wrapper {
                padding: 80px;
                margin: 2px;
                background: white;
            }
            .figure-text p {
                color: black;
            }
            .con_item {
                margin: 0px !important;
                padding: 0px !important;
            }
            .demo-style {
                width: 160px !important;
                height: 160px !important;
            }
        }

        .btn-demo {
            display: block;
            width: 100%;
            border: 1px solid lightgray;
            background-color: #6c757d;
            padding: 8px 28px;
            font-size: 16px;
            cursor: pointer;
            text-align: center;
        }

        #myA {
            display: none;
        }

        .bottom-nav-bar i {
            color: white !important;
        }

        .game-demoo {
            max-width: 998px;
            margin: 0 auto;
            margin-left: -10px;
            margin-top: -30px;
        }

        .demo-dialog1 {
            position: absolute;
            z-index: 11;
            width: 95%;
            height: 68%;
        }

        .demo-body1 {
            height: 100%;
        }

        .demo-body1 iframe {      
            height: 100%;
            width: 100%; 
            padding: 0;
            margin: 0; 
            border: none;
        }

        .slit-header {
            max-width: 998px;
            margin-top: 20px;
            margin-bottom: 10px !important;
            padding: 10px 10px 10px;
        }

        .tabgacor {
            flex-wrap: nowrap;
            overflow-x: auto;
            display: flex !important;
        }

        .slit-header .game-slot-gacor {
            width: 80%;
            padding: 0px 0.5rem;
            display: block;
            float: left;
            flex-shrink: 0;
        }

        .slit-wrapper {
            border-radius: 5px !important;
        }

        [class~="slit-wrapper"] {
            color: rgb(0 0 0) !important;
            background: transparent;
            border-width: 1.2px !important;
            border-style: solid !important;
            border-color: transparent;
            border-image: initial !important;
        }

        .slit-list {
            position: relative;
            padding-bottom: 34% !important;
            width: 100%;
            height: 0px;
            -webkit-transition: all 0.3s ease-in-out;
            -o-transition: all 0.3s ease-in-out;
            transition: all 0.3s ease-in-out;
        }

        .game-list-content {
            border-radius: 5px 5px 0px 0px !important;
        }

        .slit-teks2 {
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: space-around;
            padding: 5px;
            background: #fbfbfb;
        }

        .slit-teks2 h3 {
            font-size: 15px;
            color: #1c6bb7;
            font-weight: bolder;
        }

        .slit-teks2 a {
            text-decoration: none;
        }

        .slit-teks2 p {
            color: white !important;
        }

        .apkserver {
            height: 80px;
            display: flex;
            align-items: center;
            width: 100%;
            background-color: #0000007a !important;
        }

        .trigger-side-show {
            background: transparent;
            border: none;
            margin-top: 8px;
        }

        .trigger-side-show img {
            width: 50%;
        }

        .buttonaduan {
            margin-bottom: -10px;
            height: 80px;
            display: flex;
            align-items: center;
            width: 100%;
            border-bottom : solid 2px #707070;
            background: #0000007a;
        }

        #modalpopup:target, #popup-garansi:target, #popup-plusplus:target, #popup-peraturan:target, #popup-lc:target, #popup-bonusdeposit:target, #popup-begadangasli:target, #popup-begadang:target, #popup-luckywheels:target, #popup-bonuspp:target, #popup-bonuspg:target, #button-aduan:target, #tutor-main:target, #popup-lp:target {
            opacity: 1;
            visibility: visible;
        }

        .modalpopup {
            width: 100%;
            height: 100vh;
            background-color: rgba(0, 0, 0, 0.8);
            position: fixed;
            top: 0;
            left: 0;
            opacity: 0;
            visibility: hidden;
            z-index: 99998;
            transition: all .3s;
        }

        #modalpopup:target .modalpopup-konten, #popup-garansi:target .modalpopup-konten, #popup-plusplus:target .modalpopup-konten, #popup-peraturan:target .modalpopup-konten, #popup-lc:target .modalpopup-konten, #popup-bonusdeposit:target .modalpopup-konten, #popup-begadangasli:target .modalpopup-konten, #popup-begadang:target .modalpopup-konten, #popup-luckywheels:target .modalpopup-konten, #popup-bonuspp:target .modalpopup-konten, #popup-bonuspg:target .modalpopup-konten, #button-aduan:target .modalpopup-konten, #tutor-main:target .modalpopup-konten, #popup-lp:target .modalpopup-konten {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        .modalpopup-konten {
            width: 100%;
            max-width: 500px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, .2);
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(.25);
            opacity: 0;
            transition: all .5s .1s;
        }

        .modal-dialog1 {
            border-radius: 8px;
            z-index: 100;
            border: 2px solid rgb(43 90 196) !important;
        }

        .fade {
            transition: opacity .15s linear;
        }

        .modal-header1 {
            padding: 3px;
            background: linear-gradient(#023d76, #021f3d) !important;
            box-shadow: rgb(0 43 85) 0px 0px 5px 2px inset, rgb(0 59 115) 0px 0px 4px 3px inset !important;
            border-top-left-radius: 5px;
            border-top-right-radius: 5px;
        }

        .modal-dialog-close {
            color: transparent;
            position: absolute;
            right: 7px;
            width: 6%;
            top: 9px;
        }

        .modal-body1 {
            max-height: calc(100% - 40px);
            height: 100%;
            background: #000;
            overflow: auto;
        }

        .bottom-nav-bar {
            width: 100%;
            height: 50px;
            position: fixed;
            bottom: 0;
            z-index: 60;
            background-color: #0f0f0f;
            text-align: center;
            min-width: 320px; 
        }

        .modal-body1 iframe {
            max-width: 100%;
            border: 0px;
            width: 100%;
            padding: 0px;
            margin: 0px;
        }

        .responsive-iframe, .responsive-iframe2 {
            position: relative;
            width: 100%;
            height: 550px;
        }

        .modal6-header .close {
            line-height: 0.96 !important;
            color: white !important;
            background-color: red !important;
            width: 8%;
            border-radius: 5px;
            opacity: 1;
        }

        .modal6-body p {
            color: black !important;
            text-align: justify !important;
            font-size: 14px !important;
        }

        .modal6-header h2 {
            color: black !important;
            text-align: justify !important;
        }

        .custom-button {
            display: inline-block;
            padding: 5px 30px;
            background-color: #12659f;
            color: white;
            font-size: 18px;
            font-weight: bold;
            text-transform: uppercase;
            text-decoration: none;
            border-radius: 50px;
            box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease-in-out;
        }

        .custom-button:hover {
            background-color: #2980b9;
            box-shadow: 0 15px 20px rgba(0, 0, 0, 0.3);
            transform: translateY(-5px);
        }

        .custom-button:active {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
        }

        .btn-default, .btn-primary {
            margin-bottom: 50px !important;
        }

        .seo-footer {
            background: url(<?php echo $urlweb; ?>/assets/tpl/d7cd2524ea/images/btn-login.webp) no-repeat fixed !important;
        }   
        
        /* TAMBAHAN BACKGROUND DARI SERVER */
        body[data-mobile="true"], .wrapper.naga-theme, .wrapper {
            background-color: #000 !important;
            background-image: url('<?php echo $urlweb; ?>/assets/baground/bg1.png') !important;
            background-size: cover !important;
            background-position: center top !important;
            background-attachment: fixed !important;
            background-repeat: no-repeat !important;
        }

        .navbar-fixed {
            background: url('<?php echo $urlweb; ?>/assets/baground/bg1.png') !important; 
        }

        .btn-secondary-primary {
            background: url('<?php echo $urlweb; ?>/assets/tpl/d7cd2524ea/images/btn-login.webp') no-repeat center center !important;
            background-size: 100% 100% !important;
            margin-top: 5px;
        }

        .btn-account > a {
            line-height: 40px !important;
        }

        .btn-join {
            background: url('<?php echo $urlweb; ?>/assets/tpl/d7cd2524ea/images/btn-register.webp') !important;
            background-size: 100% 100% !important;
            margin-top: 5px;
        }

        .game-front-wrapper {
            background-color: transparent !important;
            background: url('<?php echo $urlweb; ?>/assets/baground/game/wraper1.png') no-repeat !important;
            background-size: 100% 100% !important;
            display: flex;
            height: 100%;
            align-items: center;
            margin: 6px;
            width: 100%;
            margin-left: -1px;
        }

        .logo-img {
            margin-top: 5px !important;
            max-height: 45px !important;
            transform: scale(2, 2);
        }

        .text-dark {
            color: #ffffff !important;
        }

        .providerrr {
            background-color: #5d01017a;
            border-top: #ffffff 2px solid;
            padding-top: 20px;
        }

        img.prov1 { width: 17% !important; text-align: center !important; }
        img.prov5, img.prov4, img.prov3, img.prov2 { margin-left: 10px; width: 17% !important; }

        #jackpot {
            font-family: "Highspeed";
            font-size: 5.0vw;
            height: 31px;
            padding-left: 10px;
            color: #ffffff;
        }

        .game-group-front .owl-nav button.owl-prev {
            float: left;
            height: 80%;
            margin-left: -40px !important;
        }

        .game-group-front .owl-nav button.owl-next {
            float: right;
            height: 80%;
            margin-right: -40px !important;
        }

        .navbar-fixed .button-collapse {
            background-color: #2e2e2e;
            border: 1px solid transparent;
        }

        .page-header-title { background-color: #000000; color: #000000; }
        .account-menu a.active { color: #000; background-color: #018bce; }

        .supported-bank {
            border-radius: 12px;
            padding: 12px;
        }

        .supported-bank .bank {
            border: 1px solid #ffd700;
            background: linear-gradient(180deg,#111,#000);
        }

        .newsInfo {
            background: #ececec;
            border: 1px solid #d5d5d5;
            border-radius: 0px;
        }

        .newsInfo i, .newsInfo marquee {
            color: #000 !important;
        }

        .btn-account.black2 ul li a.icon-btn {
            background: linear-gradient(180deg, #2b2b2b 0%, #000000 100%) !important;
            color: #ffd700 !important;
            border: 1px solid #d4af37 !important;
            border-radius: 10px !important;
            box-shadow: 0 4px 0 #8c6d1f, 0 6px 12px rgba(0,0,0,.5);
            text-shadow: 0 1px 1px rgba(0,0,0,.5);
            transition: all .15s ease;
        }
        
 .popup-overlay {
    display: none; 
    position: fixed; /* KUNCI: Agar posisi tetap di layar meski scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85); /* Latar belakang gelap */
    z-index: 99998; /* Pastikan selalu paling atas */
    
    /* TEKNIK CENTERING TERBAIK */
    display: flex;
    justify-content: center; /* Tengah horizontal */
    align-items: center;    /* Tengah vertikal */
}

.popup-content {
    background: transparent; /* Ubah ke transparent jika ingin fokus ke gambar saja */
    width: 90%;
    max-width: 400px;
    position: relative;
    padding: 0;
}

/* Jika Anda ingin tombol close di pojok kanan atas gambar */
.close-popup {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
}        
.leaderboard-wrapper{
    display: flex;
    justify-content: center;
}

.card-leaderboard{
    width: 90%;
}
    </style>
