/* File: style.css (Versi Rapi) */

/* Reset Dasar & Pengaturan Global */
body {
    margin: 0;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #020202;
    background-image: url("https://noya99image.pages.dev/bgnoya.webp");
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
    color: #fff;
}
* { box-sizing: border-box; padding: 0; margin: 0; }
a { text-decoration: none; color: #fff; }
img { max-width: 100%; height: auto; vertical-align: middle; }

/* Wadah Utama */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem;
}
main {
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
}

/* Header & Marquee */
.header { padding: 1px; }
.header-logo {
    text-align: center;
    padding: 5px 0;
}

.header-logo img {
    max-width: 250px;
    height: auto;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.5));
}
.marquee-text {
    height: 30px;
    line-height: 30px;
    font-weight: bold;
    overflow: hidden;
    position: relative;
    background: #9e0000;
    color: #ffffff;
}
.marquee-text div {
    display: block;
    width: 200%;
    position: absolute;
    overflow: hidden;
    animation: marquee 15s linear infinite;
}
.marquee-text span { float: left; width: 50%; }
@keyframes marquee {
    0% { left: 0; }
    100% { left: -100%; }
}

/* Slider Banner */
/* --- STYLE BARU UNTUK SLIDER BANNER --- */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: -10px auto;
    border-radius: 8px;
    overflow: hidden;

    /* Siapkan border dan panggil animasinya */
    border-width: 3px;
    border-style: solid;
    animation: blinking-glow-slider 2s ease-in-out infinite;
}
@keyframes blinking-glow-slider {
    /* Kondisi awal: warna kuning */
    0% {
        border-color: #ffd700;
        box-shadow: 0 0 15px #ffd700, 0 0 20px rgba(255, 215, 0, 0.5);
    }
    /* Kondisi puncak: warna merah */
    50% {
        border-color: #ff4500;
        box-shadow: 0 0 25px #ff4500, 0 0 35px rgba(255, 69, 0, 0.6);
    }
    /* Kondisi akhir: kembali ke warna kuning */
    100% {
        border-color: #ffd700;
        box-shadow: 0 0 15px #ffd700, 0 0 20px rgba(255, 215, 0, 0.5);
    }
}

.slider-wrapper { display: flex; transition: transform 0.5s ease-in-out; }
.slide { min-width: 100%; box-sizing: border-box; }
.slide img { width: 100%; height: auto; display: block; }
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}
.slider-btn:hover { background-color: rgba(0, 0, 0, 0.8); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}
.dot.active { background-color: white; }

/* Konten Utama di Bawah Slider */
#wrapper.wrapper {
    background-color: rgba(94, 0, 0, 0.74);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    overflow: visible;
}
.box-logo {
    /* Layout & Positioning (kita pertahankan dari kodemu) */
    text-align: center;
    position: relative;
    top: -30px;
    z-index: 5;
    margin: 20px 0 10px 0; /* Margin dirapikan sedikit */

    /* Tampilan Premium Baru */
    padding: 8px; /* Padding lebih tebal agar terlihat seperti frame */
    border-radius: 8px; /* Sudut lebih membulat */
    border: 1px solid rgba(255, 200, 150, 0.3); /* Border tipis warna bronze */

    /* Gradasi Coklat & Merah yang Elegan */
    background: linear-gradient(145deg,
        #381a1a 0%,  /* Coklat kemerahan yang sangat gelap */
        #7b3f31 50%, /* Coklat-merah terang di tengah seperti kilap */
        #381a1a 100% /* Kembali ke warna coklat gelap */
       );
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.4);
        background-size: 200% 200%;
    animation: move-sheen 8s ease-in-out infinite;
}
@keyframes move-sheen {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}
.btn {
    display: inline-block;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
    color: #FAF0D7;
    text-shadow: 0 0 3px #000;
    letter-spacing: 1px;
    font-weight: 700;
    text-align: center;
}
.btn-one {
      /* Efek Glossy dengan 2 Lapis Gradient */
    background: 
        /* Lapisan Atas: Kilap Putih Transparan */
        linear-gradient(to bottom, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 60%),
        /* Lapisan Bawah: Warna Dasar Abu-abu */
        linear-gradient(to bottom, #555 0%, #333 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    border: 1px solid #FAF0D7;
    transition: all 0.3s;
    margin-top: -10px;
}
.btn-one:hover {
    background-color: #ffd700;
    color: #000;
    text-shadow: none;
}

/* --- STYLE FINAL UNTUK JUDUL GACOR (FOKUS EFEK TEKS) --- */

.toplist__label.gacor {
    /* Layout & Tampilan Dasar */
    display: block;
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    
    /* Tema Emas Statis yang Mewah */
    border: 2px solid #a47e3b;
    background: linear-gradient(45deg, #f0e6d2, #ffd700, #f0e6d2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 -2px 4px rgba(0,0,0,0.3);

    /* Tipografi & Warna Teks */
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c1b00; /* Warna coklat tua, kontras & elegan di atas emas */
    
    /* Posisi */
    margin-top: -30px;
    margin-bottom: 10px;
    
    /* KUNCI UTAMA: Panggil animasi HANYA untuk text-shadow */
    animation: text-glow 3s ease-in-out infinite;
}

/* Resep untuk animasi denyut cahaya pada teks */
@keyframes text-glow {
    0% {
        /* Bayangan teks awal: cahaya lembut & agak menyebar */
        text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #ffd700;
    }
    50% {
        /* Bayangan teks puncak: cahaya lebih terang & fokus */
        text-shadow: 0 0 8px #fff, 0 0 12px #fff, 0 0 16px #ffc400;
    }
    100% {
        /* Kembali ke bayangan teks awal */
        text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 12px #ffd700;
    }
}
#tanggal-otomatis {
    background-color: rgba(0, 0, 0, 0.5);
    display: table;
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid #FAF0D7;
    text-transform: uppercase;
    font-size: 1rem;
    margin: 10px auto 20px auto;
}
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 6px;
    margin-bottom: 1rem;
    background-color: #333;
    color: #fff;
    font-size: 1rem;
    margin-top: -10px;
}

/* --- STYLE UNTUK FILTER PROVIDER (VERSI PREMIUM GOLD) --- */
.provider-filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* Aturan utama untuk tombol provider */
.provider-btn {
    /* Layout & Ukuran */
    width: 140px; 
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;

    /* Tampilan Premium */
    position: relative;
    overflow: hidden;
    color: #fdeccd;
    text-decoration: none;
    border-radius: 10px; /* Sedikit lebih kotak */
    border: 2px solid transparent; /* Border transparan untuk trik */
    outline: none;
    cursor: pointer;

    /* Trik Border Gradient */
    background-image: 
        linear-gradient(#0d1b2a, #0d1b2a), /* Lapis atas: Biru gelap */
        linear-gradient(45deg, #b18b48, #f8e6b7, #a47e3b); /* Lapis bawah: Emas */
    background-origin: border-box;
    background-clip: padding-box, border-box;

    box-shadow: 0 0 15px rgba(248, 230, 183, 0.15);
    transition: transform 0.2s ease;
}

/* Lapisan kilau yang bergerak */
.provider-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(60deg, transparent, rgba(255,220,150,0.4), transparent);
    animation: realistic-shine 5s ease-in-out infinite;
    clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
}

/* Aturan untuk gambar logo di dalam tombol */
.provider-btn img {
    height: 80%; /* Sedikit lebih kecil agar tidak mepet border */
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

/* Efek hover, tombol sedikit membesar */
.provider-btn:hover {
    transform: scale(1.05);
}

/* --- STATE KETIKA TOMBOL AKTIF (PENTING!) --- */
.provider-btn.active {
    /* Ganti background jadi Emas Terang */
    background-image: 
        linear-gradient(#ffd700, #f3c314),
        linear-gradient(45deg, #b18b48, #f8e6b7, #a47e3b);
    
    color: #000; /* Ganti warna teks jadi hitam agar terbaca */
    font-weight: bold;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4); /* Efek tertekan */
}

/* Matikan animasi kilau saat tombol aktif */
.provider-btn.active::before {
    animation: none;
    display: none; /* Sembunyikan total lapisan kilaunya */
}

/* Style khusus untuk tombol "Semua" yang pakai teks */
.provider-btn[data-provider="all"] {
    font-weight: bold;
    color: #fdeccd;
    font-size: 1rem;
}

/* Saat tombol "Semua" aktif */
.provider-btn[data-provider="all"].active {
    color: #000;
    text-shadow: none;
}

/* Jangan lupa resep animasinya jika belum ada */
@keyframes realistic-shine {
    0% { clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%); }
    40% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
    60% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%); }
    100% { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
}

/* Game List & Card Styles */
.game-list-wrapper {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.card {
    background-color: rgba(219, 219, 219, .1);
    border-radius: 5px;
    padding: 8px;
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.card p {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    flex-grow: 1;
    background-color: rgba(235, 0, 0, 0.849);
    padding: 5px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* --- GAME CARD COMPONENTS --- */
.game-image-box {
    height: 140px;
    width: 100%;
    overflow: hidden;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    border: 3px solid #ffd700;
    position: relative;
    z-index: 1;
    animation: blinking-borders 1s infinite;
}
.game-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.pg-soft-image {
    transform: scale(1.1);
}
@keyframes blinking-borders {
    0% {
        border-color: #ffd700;
        box-shadow: 0 0 15px #ffd700, 0 0 20px rgba(255, 215, 0, 0.5);
    }
    /* Kondisi puncak: warna merah */
    50% {
        border-color: #ff4500;
        box-shadow: 0 0 25px #ff4500, 0 0 35px rgba(255, 69, 0, 0.6);
    }
    /* Kondisi akhir: kembali ke warna kuning */
    100% {
        border-color: #ffd700;
        box-shadow: 0 0 15px #ffd700, 0 0 20px rgba(255, 215, 0, 0.5);
    }
}
.hot-stamp {
    position: absolute;
    top: -1px;
    right: -1px;
    background-color: #ff4500;
    color: white;
    padding: 3px 8px 3px 15px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 5;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 8px 100%);
    animation: blinking-hot 1s infinite;
}
@keyframes blinking-hot {
    0%   { background-color: #ff4500; color: white; }
    50%  { background-color: white; color: red; }
    100% { background-color: #ff4500; color: white; }
}
.pbar {
    background-color: #555;
    border-radius: 18px;
    height: 18px;
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}
.pbar-bg {
    height: 100%;
    background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);
    animation: progress-bar-stripes 1s linear infinite;
}
.pbar-text {
    position: absolute;
    width: 100%;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    font-weight: 700;
    text-align: center;
    font-size: 0.8rem;
}
.pbar .yellow { background-color: #ffc107; }
.pbar .green { background-color: #28a745; }
.pbar .red { background-color: #dc3545; }
.pola-container {
    background-color: #ffd700;
    color: #000;
    font-weight: bold;
    padding: 8px;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}
.pola-container:hover {
    background-color: #e6bf00;
}
.pola-detail {
    background-color: #212121;
    color: #fff;
    padding: 10px;
    margin-top: -5px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.6;
    display: block;
}

/* --- STYLE UNTUK EFEK HOVER KARTU GAME --- */
.play-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    border-radius: 5px;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
}
.play-button {
    background-color: #ffd700;
    color: #000;
    font-weight: bold;
    padding: 10px 30px;
    border-radius: 20px;
    border: 2px solid white;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}
.card:hover .play-overlay {
    opacity: 1;
}
.card:hover .play-button {
    transform: scale(1);
}
.card:hover .game-image-box img:not(.pg-soft-image) {
    transform: scale(1.1);
}
.card:hover .game-image-box img.pg-soft-image {
    transform: scale(1.2);
}

/* Footer */
.footer {
    color: #929AAB;
    text-align: center;
}
.mt-5 { margin-top: 3rem; }

/* --- STYLE UNTUK HALAMAN PREDIKSI --- */

.page-title {
    color: #ffd700;
    text-align: center;
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 25px;
    text-shadow: 0 0 5px #000;
}

.prediksi-box {
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
}

.prediksi-title {
    background-color: #ffd700;
    color: #000;
    text-align: center;
    padding: 10px;
    margin: -15px -15px 15px -15px; /* Trik agar menempel di atas */
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-size: 1.5rem;
}

.prediksi-table {
    width: 100%;
    border-collapse: collapse;
}

.prediksi-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hilangkan border di baris terakhir */
.prediksi-table tr:last-child td {
    border-bottom: none;
}

.prediksi-table .label {
    width: 40%;
    font-weight: bold;
    color: #ccc;
}

.prediksi-table .angka {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    text-align: right;
    letter-spacing: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsif --- */

@media (max-width: 768px) { /* Untuk Tablet dan HP */
    
    /* Buat game list jadi 3 kolom */
    .game-list-wrapper { 
        grid-template-columns: repeat(3, 1fr); 
        gap: 8px;
    }
    
    /* Buat tombol provider jadi 3 kolom */
    .provider-btn {
        width: calc(33.33% - 8px); 
    }

    .flex-container-side-desktop { 
        flex-direction: column; 
    }
    
    /* ▼▼▼ PERBAIKAN UTAMA ADA DI SINI ▼▼▼ */
    .game-image-box {
        height: auto;           /* Hapus tinggi tetap */
        aspect-ratio: 1 / 1;    /* Paksa bentuknya jadi kotak (1:1) */
        border-width: 2px;      /* Tipiskan border di HP */
    }

    .game-image-box img {
        object-fit: contain; /* Pastikan seluruh gambar muat, tidak dipotong */
    }

    .card {
        height: auto;
    }

    .card p {
        flex-grow: 0;
        min-height: 4em; 
    }
       .marquee-text div {
        animation-duration: 10s; /* Perpanjang durasi lagi */
    }

    /* ▼▼▼ TAMBAHKAN INI ▼▼▼ */
    .marquee-text span {
        width: 100%; /* Paksa setiap span selebar layar */
    }
}


@media (max-width: 480px) { /* Khusus untuk HP */
    
    /* Atur ulang ukuran font judul biar tidak terlalu besar */
    .toplist__label.gacor {
        font-size: 1.4rem;
    }
    
    /* --- Perubahan Utama pada Kartu Game --- */

    .game-image-box {
        height: 80px;      /* Perkecil tinggi kotak gambar */
        border-width: 2px;
    }
    
    .pbar {
        height: 15px;      /* Tipiskan bar RTP */
        margin-top: 5px;
    }

    .pbar-text {
        font-size: 0.5rem; /* Perkecil font persentase */
    }

    .card p {
        font-size: 0.6rem;   /* 1. Font dikecilkan lagi */
        min-height: 3.5em;  /* 2. Paksa tinggi minimal untuk 2 baris */
        line-height: 1.2;
        padding: 4px;
        
        /* Ini untuk memastikan teks selalu di tengah kotaknya */
        display: flex;
        align-items: center;
        justify-content: center;
    }


    .pola-container {
        font-size: 0.5rem;  /* Perkecil font tombol POLA */
        padding: 6px;
        margin-top: 8px;
    }

    .pola-detail {
        font-size: 0.5rem;  /* Perkecil font detail pola */
        line-height: 1.4;
        padding: 8px;
    }
       .marquee-text div {
        animation-duration: 10s; /* Perpanjang durasi lagi */
    }

    /* ▼▼▼ TAMBAHKAN INI ▼▼▼ */
    .marquee-text span {
        width: 100%; /* Paksa setiap span selebar layar */
    }
}
