:root {
    --bg-body: #02030a;
    --bg-soft: #060712;
    --bg-soft-2: #10121f;
    --card-bg: #111321;
    --accent: #f9c640;
    --accent-2: #ff8a00;
    --accent-soft: rgba(249,198,64,0.15);
    --border-soft: rgba(255,255,255,0.06);
    --text-main: #f4f4f7;
    --text-muted: #9a9cb3;
    --danger: #ff4e6a;
    --success: #7ce38b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden; /* cegah halaman geser ke kanan */
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        system-ui,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    background:
        radial-gradient(circle at 0 0, rgba(255,255,255,0.08), transparent 60%),
        radial-gradient(circle at 100% 0, rgba(255,255,255,0.05), transparent 55%),
        radial-gradient(circle at 50% 100%, rgba(100,255,218,0.09), transparent 55%),
        var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Layout utama */
.page {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 14px 12px 24px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 16px;
}

@media (max-width: 960px) {
    .page {
        grid-template-columns: 1fr;
    }
}

/* Header bar */
header {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(3,5,20,0.92), rgba(8,10,28,0.9));
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 18px 40px rgba(0,0,0,0.7);
}

/* Banner slider */
.banner-slider {
    margin-top: 12px;
    margin-bottom: 10px;
    border-radius: 22px;
    overflow: hidden;
    background: radial-gradient(circle at 0 0, rgba(249,198,64,0.25), transparent 55%),
                radial-gradient(circle at 100% 0, rgba(0,255,188,0.18), transparent 55%),
                #050615;
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
    box-shadow: 0 18px 40px rgba(0,0,0,0.8);
}

.banner-track {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 24%; /* tinggi proporsional desktop */
}

.banner-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transform: scale(1.02);
}

.banner-slide.active {
    opacity: 1;
    transform: scale(1);
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dots */
.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(10px);
}

.banner-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
}

.banner-dot.active {
    width: 16px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Brand & buttons */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 30% 0, #fff 0, #ffe9a8 18%, #f9c640 40%, #ff8a00 65%, #1b1020 100%);
    box-shadow:
        0 0 10px rgba(249,198,64,0.65),
        0 0 32px rgba(255,138,0,0.65);
    position: relative;
}

.brand-logo::after {
    content: "88";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .06em;
    color: #000;
}

.brand-text-main {
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-size: 12px;
}

.brand-text-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.top-actions {
    display: flex;
    gap: 8px;
}

.btn {
    border-radius: 999px;
    font-size: 11px;
    padding: 7px 14px;
    border: 1px solid rgba(255,255,255,0.18);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    color: var(--text-main);
}

.btn-primary {
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #000;
    box-shadow: 0 10px 28px rgba(255,138,0,0.45);
}

.btn-ghost {
    border-color: rgba(255,255,255,0.16);
    background: radial-gradient(circle at 0 0, rgba(255,255,255,0.06), transparent 60%);
}

/* Hero */
.hero {
    grid-column: 1 / -1;
    margin-top: 12px;
    margin-bottom: 4px;
    background: radial-gradient(circle at 0 0, rgba(249,198,64,0.18), transparent 55%),
                radial-gradient(circle at 100% 0, rgba(0,255,188,0.12), transparent 55%),
                linear-gradient(135deg, #050610, #17172a);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.07);
    padding: 16px 18px;
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249,198,64,0.28), transparent 72%);
    right: 0;         /* tadinya -40px, ini yang bikin melebar */
    top: -60px;
    opacity: .7;
}

.hero-main-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 6px;
}

.hero-highlight {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .14em;
    margin-bottom: 8px;
}

.hero-sub {
    font-size: 12px;
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.5;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.hero-badge {
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px rgba(124,227,139,0.9);
}

.hero-qr {
    justify-self: end;
    align-self: center;
    background: rgba(3,4,15,0.85);
    border-radius: 20px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.hero-qr-card {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: repeating-linear-gradient(
        135deg,
        #0f101a 0,
        #0f101a 6px,
        #191b2a 6px,
        #191b2a 12px
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-qr-inner {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background:
        radial-gradient(circle at 0 0, #fff 0, #ddd 40%, #aaa 75%, #222 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    color: #000;
    font-weight: 700;
}

.hero-qr-text {
    font-size: 12px;
}

.hero-qr-text span {
    font-size: 11px;
    color: var(--text-muted);
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, rgba(6,7,20,0.96), rgba(4,5,15,0.98));
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    padding: 12px 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.75);
    position: sticky;
    top: 12px;
    align-self: flex-start;
}

.sidebar-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.provider-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.provider-item a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 13px;
    color: var(--text-muted);
    transition: background .16s ease, border-color .16s ease, transform .12s ease;
}

.provider-item-badge {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #11131f;
    border: 1px solid rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.provider-item.active a,
.provider-item a:hover {
    background: radial-gradient(circle at 0 0, rgba(249,198,64,0.2), transparent 70%);
    border-color: rgba(249,198,64,0.9);
    color: #fff;
    /* tanpa transform supaya tidak “nambah” lebar di kanan */
}

/* Content */
.content {
    background: linear-gradient(180deg, rgba(5,6,18,0.98), rgba(5,6,18,0.96));
    border-radius: 20px;
    border: 1px solid var(--border-soft);
    padding: 12px 12px 14px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.85);
}

.content-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.content-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .16em;
    font-weight: 600;
}

.content-sub {
    font-size: 11px;
    color: var(--text-muted);
}

.content-badge-date {
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

/* Game grid & card */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}

.game-card {
    background: var(--card-bg);
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
    position: relative;
}

.game-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0 0, rgba(249,198,64,0.12), transparent 60%);
    opacity: 0;
    transition: opacity .16s ease;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-2px);
    border-color: rgba(249,198,64,0.8);
    box-shadow: 0 16px 30px rgba(0,0,0,0.9);
}

.game-card:hover::before {
    opacity: 1;
}

.game-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform .2s ease;
}

.game-card:hover .game-thumb img {
    transform: scale(1.07);
}

.game-rtp-badge {
    position: absolute;
    left: 10px;
    top: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(4,4,10,0.92);
    border: 1px solid rgba(249,198,64,0.95);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Level warna RTP */
.game-rtp-badge.rtp-high {
    border-color: #36d399;
    background: rgba(25, 68, 58, 0.95);
}

.game-rtp-badge.rtp-mid {
    border-color: #fbbf24;
    background: rgba(80, 60, 15, 0.95);
}

.game-rtp-badge.rtp-low {
    border-color: #f87171;
    background: rgba(75, 21, 28, 0.95);
}

.game-rtp-value {
    color: var(--accent);
}

.game-tag {
    position: absolute;
    right: 10px;
    top: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.15);
}

.game-body {
    padding: 9px 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-name {
    font-size: 13px;
    font-weight: 600;
    min-height: 32px;
}

.game-time {
    font-size: 11px;
    color: var(--accent);
}

/* Bar RTP warna sesuai persen */
.game-rtp-bar {
    margin-top: 4px;
    width: 100%;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.game-rtp-bar-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.25s ease-out;
}

/* Hijau: 71–98% */
.game-rtp-bar-fill.rtp-high {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

/* Kuning / oranye: 41–70% */
.game-rtp-bar-fill.rtp-mid {
    background: linear-gradient(90deg, #facc15, #f97316);
}

/* Merah: 0–40% */
.game-rtp-bar-fill.rtp-low {
    background: linear-gradient(90deg, #ef4444, #f97373);
}

.game-footer {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.game-footer-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.game-mini-label {
    font-size: 10px;
    color: var(--text-muted);
}

.game-mini-pill {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(0,0,0,0.5);
}

.btn-mini {
    border-radius: 999px;
    border: none;
    font-size: 10px;
    padding: 5px 7px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
    cursor: pointer;
}

.btn-mini-main {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #000;
}

.btn-mini-pola {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(249,198,64,0.6);
}

.btn-mini-row {
    display: flex;
    gap: 5px;
}

/* Modal pola main */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
}

.modal {
    width: 100%;
    max-width: 400px;
    background: #060713;
    border-radius: 20px;
    border: 1px solid rgba(249,198,64,0.9);
    padding: 14px 15px 12px;
    box-shadow: 0 22px 50px rgba(0,0,0,0.9);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.modal-title {
    font-size: 13px;
    font-weight: 600;
}

.modal-time {
    font-size: 11px;
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
}

.modal-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pola-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
}

.pola-item {
    font-size: 12px;
    padding: 6px 7px;
    border-radius: 9px;
    background: #101220;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,0.06);
}

.pola-text {
    flex: 1;
}

.pola-status {
    font-size: 12px;
}

.pola-status.active {
    color: var(--success);
}

.pola-status.inactive {
    color: var(--danger);
}

/* ===================== RESPONSIVE TWEAKS ===================== */

@media (max-width: 960px) {
    .page {
        padding: 12px 10px 20px;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .hero-qr {
        justify-self: flex-start;
    }
}

/* Mobile optimasi */
@media (max-width: 720px) {
    body {
        background:
            radial-gradient(circle at 0 0, rgba(255,255,255,0.04), transparent 60%),
            radial-gradient(circle at 100% 0, rgba(255,255,255,0.03), transparent 55%),
            var(--bg-body);
    }

    .page {
        padding: 10px 8px 18px;
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        border-radius: 18px;
    }

    .top-actions {
        align-self: stretch;
        justify-content: flex-end;
    }

    .banner-slider {
        margin-top: 10px;
        margin-bottom: 10px;
        border-radius: 18px;
    }

    /* Banner mobile: tinggi proporsional, tidak terlalu besar */
    .banner-track {
        height: 36vw;
        padding-bottom: 0;
    }

    /* Hilangkan gelembung hero yang keluar kanan */
    .hero::before {
        right: 0;
        width: 220px;
        height: 220px;
    }

    .sidebar {
        position: static;
        margin-top: 8px;
        padding: 10px 6px 8px;
        border-radius: 16px;
    }

    .sidebar-title {
        margin-bottom: 6px;
        padding: 0 4px;
    }

    /* Provider jadi slider horizontal */
    .provider-list {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 6px;
        padding: 4px 4px 2px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .provider-item {
        flex: 0 0 auto;
    }

    .provider-item a {
        min-width: 140px;
        padding: 7px 10px;
        justify-content: flex-start;
        scroll-snap-align: start;
    }

    /* Jangan geser provider ke kanan saat hover/active di HP */
    .provider-item.active a,
    .provider-item a:hover {
        transform: none;
    }

    .content {
        margin-top: 8px;
        padding: 10px 8px 12px;
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }

    .game-card {
        border-radius: 14px;
    }

    .game-name {
        font-size: 12px;
    }

    .game-mini-pill {
        font-size: 9px;
    }

    .btn-mini-row {
        flex-direction: column;
    }

    .btn-mini {
        width: 100%;
        justify-content: center;
    }

    .modal {
        margin: 0 10px;
        max-width: 100%;
    }
}