/* ==========================================================================
           RESET & GLOBAL STYLES
           ========================================================================== */
        *, *::before, *::after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        :root {
            --bg-main: #171719;
            --bg-section: #1E1E21;
            --bg-card: #222226;
            --primary-gold: #F2C94C;
            --bright-gold: #FFD65A;
            --text-main: #FFFFFF;
            --text-muted: #A7A7AD;
            --border-light: rgba(255, 255, 255, 0.08);
            --border-gold: rgba(242, 201, 76, 0.3);
            --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.4);
            --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        html {
            scroll-behavior: smooth;
        }

        body {
            background-color: var(--bg-main);
            color: var(--text-main);
            font-family: var(--font-family);
            line-height: 1.5;
            overflow-x: hidden;
            width: 100%;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .app-container {
            width: 100%;
            max-width: 1280px;
            margin: 0 auto;
            position: relative;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        a {
            text-decoration: none;
            color: inherit;
        }

        button {
            border: none;
            outline: none;
            background: none;
            cursor: pointer;
            font-family: inherit;
        }

        /* Hide scrollbars but allow scrolling */
        .no-scrollbar::-webkit-scrollbar {
            display: none;
        }
        .no-scrollbar {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }

        /* ==========================================================================
           2. HEADER / NAVBAR
           ========================================================================== */
        .navbar {
            position: sticky;
            top: 0;
            z-index: 1000;
            width: 100%;
            height: 68px;
            background: rgba(23, 23, 25, 0.85);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
        }

        .nav-logo-container {
            display: flex;
            align-items: center;
        }

        .nav-logo-img {
            width: 78px !important;
            height: 62px !important;
            max-width: 100%;
            max-height: 62px;
            object-fit: contain;
            display: block;
            transition: transform 0.2s ease;
        }

        .nav-actions {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .btn-search {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid var(--border-light);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-main);
            transition: all 0.2s ease;
        }

        .btn-search:hover {
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(255, 255, 255, 0.2);
        }

        .btn-search:active {
            transform: scale(0.92);
        }

        .btn-search svg {
            width: 18px;
            height: 18px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2.2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .btn-login {
            background: linear-gradient(135deg, var(--primary-gold), var(--bright-gold));
            color: #000000;
            font-weight: 700;
            font-size: 14px;
            padding: 8px 18px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(242, 201, 76, 0.25);
            transition: all 0.2s ease;
        }

        .btn-login:hover {
            opacity: 0.95;
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(242, 201, 76, 0.35);
        }

        .btn-login:active {
            transform: scale(0.95);
        }


        /* Visitor counter */
        .visitor-pill {
            min-height: 40px;
            padding: 0 13px;
            border-radius: 22px;
            display: flex;
            align-items: center;
            gap: 8px;
            background: linear-gradient(135deg, rgba(40,58,78,.72), rgba(27,30,38,.92));
            border: 1px solid rgba(76,153,255,.42);
            box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 16px rgba(0,0,0,.18);
            white-space: nowrap;
        }

        .visitor-dot {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: #31d49a;
            box-shadow: 0 0 0 4px rgba(49,212,154,.10);
            flex: 0 0 auto;
        }

        .visitor-label {
            color: #a7a9b1;
            font-size: 12px;
            font-weight: 600;
        }

        .visitor-pill strong {
            color: #f7f7f8;
            font-size: 16px;
            font-weight: 800;
            letter-spacing: .2px;
        }

        .visitor-pill.loading strong {
            opacity: .55;
        }

        @media (max-width: 430px) {
            .navbar {
                padding: 0 12px;
            }

            .nav-actions {
                gap: 7px;
            }

            .visitor-pill {
                padding: 0 10px;
                gap: 6px;
            }

            .visitor-label {
                font-size: 11px;
            }

            .visitor-pill strong {
                font-size: 15px;
            }
        }


        .visitor-pill .visitor-dot { position: relative; }
        .visitor-pill .visitor-dot::after { content: ''; position:absolute; inset:-3px; border-radius:50%; border:1px solid rgba(49,212,154,.35); }
        .visit-summary { width:100%; padding: 8px 16px 4px; }
        .visit-stat-card { display:flex; align-items:center; gap:11px; min-height:58px; padding:10px 13px; border:1px solid var(--border-light); border-radius:15px; background:linear-gradient(135deg,rgba(255,255,255,.045),rgba(255,255,255,.018)); box-shadow:0 5px 16px rgba(0,0,0,.18); }
        .visit-stat-icon { width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;background:rgba(242,201,76,.09);border:1px solid rgba(242,201,76,.18);color:var(--primary-gold);flex:0 0 auto; }
        .visit-stat-icon svg { width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
        .visit-stat-copy { display:flex; flex-direction:column; min-width:0; }
        .visit-stat-copy span { color:var(--text-muted);font-size:10px;font-weight:600; }
        .visit-stat-copy strong { color:#fff;font-size:16px;line-height:1.2;font-weight:800; }
        .visit-stat-live { margin-left:auto; display:flex;align-items:center;gap:5px;color:#8d9199;font-size:10px;font-weight:700; }
        .visit-stat-live i { width:6px;height:6px;border-radius:50%;background:#31d49a;display:block; }
        .advantage-item span.icon { display:flex;align-items:center;justify-content:center; }
        .advantage-item span.icon svg { width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
        .card-rating-badge .star-icon, .card-sold-ribbon .flame { display:inline-flex;align-items:center;justify-content:center; }
        .card-rating-badge .star-icon svg { width:10px;height:10px;fill:var(--primary-gold);stroke:none; }
        .card-sold-ribbon .flame svg { width:10px;height:10px;fill:currentColor;stroke:none; }


        /* ============================================================
           MINI FEATURED CARDS - seperti card kecil pada referensi
           ============================================================ */
        .mini-section { padding: 0 16px 8px; }
        .mini-grid {
            display:flex;
            gap:9px;
            overflow-x:auto;
            overflow-y:hidden;
            padding:0 1px 8px;
            scroll-snap-type:x mandatory;
            -webkit-overflow-scrolling:touch;
            scrollbar-width:none;
            overscroll-behavior-x:contain;
            touch-action:pan-x;
            cursor:grab;
        }
        .mini-grid::-webkit-scrollbar { display:none; }
        .mini-grid.is-dragging { cursor:grabbing; scroll-snap-type:none; }
        .mini-card {
            display:block;
            flex:0 0 calc((100% - 18px) / 3);
            min-width:0;
            scroll-snap-align:start;
            text-decoration:none;
            overflow:hidden;
            border-radius:12px;
            background:#202024;
            border:1px solid rgba(255,255,255,.08);
            box-shadow:0 4px 12px rgba(0,0,0,.24);
            transition:transform .2s ease,border-color .2s ease;
        }
        .mini-card:active { transform:scale(.975); }
        .mini-card:hover { border-color:rgba(242,201,76,.28); }
        .mini-image { width:100%; aspect-ratio:1.58/1; object-fit:cover; display:block; background:#111; }
        .mini-body { padding:8px 9px 9px; }
        .mini-title {
            color:#f4f4f5;
            font-size:11px;
            line-height:1.25;
            font-weight:750;
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
        }
        .mini-owner { margin-top:4px; color:#d7b63d; font-size:9px; font-weight:700; text-transform:uppercase; }
        .mini-visits { margin-top:4px; color:#8f9198; font-size:9px; display:flex; align-items:center; gap:4px; }
        .mini-visits svg { width:11px; height:11px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; flex:0 0 auto; }
        .mini-visits strong { color:#37d7a0; font-weight:800; }
        .card-visited {
            position:absolute;
            right:8px;
            bottom:31px;
            z-index:4;
            color:#9a9ca3;
            font-size:8.5px;
            display:flex;
            align-items:center;
            gap:3px;
            text-shadow:0 1px 3px #000;
            max-width:calc(100% - 105px);
            white-space:nowrap;
            overflow:hidden;
            text-overflow:ellipsis;
            padding-left:4px;
        }
        .card-visited svg { width:10px; height:10px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
        .card-visited strong { color:#37d7a0; font-weight:800; }
        @media (max-width:430px) {
            .mini-section { padding-left:15px; padding-right:15px; }
            .mini-grid { gap:8px; }
            .mini-card { flex-basis:calc((100% - 16px) / 3); }
            .mini-body { padding:7px 7px 8px; }
            .mini-title { font-size:10.5px; }
        }

        /* Search Overlay Modal */
        .search-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.85);
            backdrop-filter: blur(8px);
            z-index: 2000;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px 16px;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s ease;
        }

        .search-modal.active {
            opacity: 1;
            pointer-events: auto;
        }

        .search-box {
            width: 100%;
            max-width: 600px;
            position: relative;
            margin-top: 40px;
        }

        .search-input {
            width: 100%;
            padding: 14px 45px 14px 20px;
            background: var(--bg-card);
            border: 1px solid var(--primary-gold);
            border-radius: 14px;
            color: #fff;
            font-size: 15px;
            outline: none;
        }

        .search-close {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 20px;
            cursor: pointer;
        }

        /* ==========================================================================
           3. HERO BANNER SLIDER
           ========================================================================== */
        .hero-section {
            width: 100%;
            padding: 16px 16px 8px 16px;
        }

        .slider-wrapper {
            position: relative;
            width: 100%;
            height: 200px;
            border-radius: 18px;
            overflow: hidden;
            background: var(--bg-card);
            border: 1px solid var(--border-light);
            box-shadow: var(--shadow-soft);
            touch-action: pan-y;
        }

        .slider-track {
            display: flex;
            width: 100%;
            height: 100%;
            transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .slide-item {
            min-width: 100%;
            height: 100%;
            position: relative;
            user-select: none;
        }

        .slide-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .slide-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(0deg, rgba(23, 23, 25, 0.95) 0%, rgba(23, 23, 25, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 16px 20px;
        }

        .slide-title {
            font-size: 18px;
            font-weight: 800;
            color: var(--text-main);
            letter-spacing: 0.5px;
            text-transform: uppercase;
            text-shadow: 0 2px 4px rgba(0,0,0,0.6);
        }

        .slide-desc {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.8);
            margin-top: 2px;
        }

        /* Arrows */
        .slider-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(0, 0, 0, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.15);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            transition: all 0.2s ease;
            backdrop-filter: blur(4px);
        }

        .slider-arrow:hover {
            background: rgba(242, 201, 76, 0.8);
            color: #000;
            border-color: var(--primary-gold);
        }

        .slider-arrow-left { left: 10px; }
        .slider-arrow-right { right: 10px; }

        .slider-arrow svg {
            width: 16px;
            height: 16px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2.5;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        /* Dots Indicator */
        .slider-dots {
            position: absolute;
            bottom: 12px;
            right: 16px;
            display: flex;
            gap: 6px;
            z-index: 10;
        }

        .dot {
            width: 8px;
            height: 8px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .dot.active {
            width: 22px;
            background: var(--primary-gold);
        }

        /* ==========================================================================
           4. SLIDER KEUNGGULAN TOKO (ADVANTAGES STRIP)
           ========================================================================== */
        .advantages-section {
            width: 100%;
            padding: 10px 0;
            position: relative;
            overflow: hidden;
        }

        .advantages-wrapper {
            position: relative;
            width: 100%;
            mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
            -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
        }

        .advantages-track {
            display: flex;
            gap: 24px;
            overflow-x: auto;
            padding: 6px 20px;
            white-space: nowrap;
            scroll-behavior: smooth;
        }

        .advantage-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            flex-shrink: 0;
            background: rgba(255, 255, 255, 0.02);
            padding: 6px 12px;
            border-radius: 20px;
            border: 1px solid rgba(255, 255, 255, 0.04);
        }

        .advantage-item span.icon {
            color: var(--primary-gold);
            font-size: 14px;
        }

        /* ==========================================================================
           5. MENU KATEGORI
           ========================================================================== */
        .categories-section {
            width: 100%;
            padding: 12px 16px;
        }

        .categories-track {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding-bottom: 4px;
        }

        .category-pill {
            padding: 8px 18px;
            border-radius: 25px;
            background: var(--bg-section);
            border: 1px solid var(--border-light);
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
            transition: all 0.25s ease;
            flex-shrink: 0;
        }

        .category-pill:hover {
            border-color: rgba(255, 255, 255, 0.2);
            color: var(--text-main);
        }

        .category-pill.active {
            background: rgba(242, 201, 76, 0.08);
            border-color: var(--primary-gold);
            color: var(--primary-gold);
            box-shadow: 0 0 12px rgba(242, 201, 76, 0.15);
        }

        /* ==========================================================================
           6. SECTION LAGI POPULER
           ========================================================================== */
        .content-section {
            width: 100%;
            padding: 16px 16px 32px 16px;
            flex-grow: 1;
        }

        .section-header {
            margin-bottom: 18px;
            position: relative;
            display: flex;
            align-items: center;
        }

        .section-title {
            font-size: 20px;
            font-weight: 800;
            color: var(--text-main);
            letter-spacing: -0.2px;
            position: relative;
            display: inline-block;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            width: 36px;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-gold), transparent);
            border-radius: 2px;
        }

        /* Kartu Lagi Populer: normal grid. Tambahan card akan otomatis turun ke baris berikutnya. */
        .cards-grid {
            display:grid;
            grid-template-columns:repeat(2,minmax(0,1fr));
            gap:12px;
            width:100%;
        }

        /* ==========================================================================
           7. CARD GAME (UKURAN DIKECILKAN)
           ========================================================================== */
        .game-card {
            display: block;
            background: var(--bg-card);
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid var(--border-light);
            position: relative;
            transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            text-decoration: none;
        }

        .game-card:hover {
            transform: translateY(-3px);
            border-color: var(--border-gold);
            box-shadow: 0 6px 16px rgba(242, 201, 76, 0.15);
        }

        .game-card:active {
            transform: scale(0.97);
        }

        /* Dikecilkan dari 130% menjadi 115% */
        .card-image-wrapper {
            position: relative;
            width: 100%;
            padding-top: 115%; 
            overflow: hidden;
            background: #111;
        }

        .card-image {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

        .game-card:hover .card-image {
            transform: scale(1.06);
        }

        /* Rating Tag */
        .card-rating-badge {
            position: absolute;
            top: 6px;
            left: 6px;
            background: rgba(0, 0, 0, 0.65);
            backdrop-filter: blur(4px);
            padding: 2px 6px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            gap: 3px;
            font-size: 10px;
            font-weight: 700;
            color: #FFF;
            z-index: 2;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .card-rating-badge .star-icon {
            color: var(--primary-gold);
            font-size: 9px;
        }

        /* Dark Gradient Overlay for Title */
        .card-gradient-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60%;
            background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(18, 18, 20, 0.85) 60%, rgba(18, 18, 20, 0.98) 100%);
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 8px 8px 24px 8px;
            z-index: 1;
        }

        .card-title {
            font-size: 11.5px;
            font-weight: 700;
            color: var(--text-main);
            line-height: 1.25;
            margin-bottom: 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            position: relative;
            z-index: 3;
        }

        /* Ribbon / Ribbon Badge for Sold Count */
        .card-sold-ribbon {
            position: absolute;
            bottom: 0;
            left: 0;
            background: linear-gradient(90deg, #1D4ED8, #2563EB);
            color: #FFFFFF;
            font-size: 9px;
            font-weight: 700;
            padding: 2px 8px 2px 6px;
            border-top-right-radius: 8px;
            display: flex;
            align-items: center;
            gap: 3px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
            z-index: 5;
        }

        .card-sold-ribbon span.flame {
            font-size: 9px;
        }

        /* ==========================================================================
           9. FOOTER
           ========================================================================== */
        .footer {
            width: 100%;
            background: #111113;
            border-top: 1px solid var(--border-light);
            padding: 28px 16px;
            margin-top: auto;
            text-align: center;
        }

        .footer-brand {
            font-size: 16px;
            font-weight: 800;
            color: var(--primary-gold);
            letter-spacing: 1px;
            margin-bottom: 6px;
        }

        .footer-tagline {
            font-size: 12px;
            color: var(--text-muted);
            margin-bottom: 16px;
        }

        .footer-divider {
            width: 100%;
            max-width: 200px;
            height: 1px;
            background: var(--border-light);
            margin: 0 auto 16px auto;
        }

        .footer-copyright {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.4);
        }

        /* ==========================================================================
           11. RESPONSIVE BREAKPOINTS
           ========================================================================== */
        @media (min-width: 640px) {
            .slider-wrapper {
                height: 240px;
            }

            .card-title {
                font-size: 12.5px;
            }
        }

        @media (min-width: 900px) {
            .slider-wrapper {
                height: 280px;
            }

            .hero-section {
                padding-top: 20px;
            }
        }

        @media (min-width: 1200px) {
            .slider-wrapper {
                height: 320px;
            }
        }


