:root {
    --bg-body: #050916; --bg-card: #10172d; --primary: #0050FF; --btn-red: #e64848;
    --text-white: #ffffff; --text-gray: #aab2c8; --border: #1f2b48;
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }

body { background-color: var(--bg-body); color: var(--text-white); overflow-x: hidden; padding-bottom: 60px; }

/* PRELOADER */
#loader-wrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-body); z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s ease-out, visibility 0.5s; }
.loader-spinner { width: 50px; height: 50px; border: 4px solid rgba(0, 80, 255, 0.2); border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
.loader-text { font-size: 18px; font-weight: 800; letter-spacing: 2px; color: var(--text-white); animation: pulse 1.5s ease-in-out infinite; }
.loader-text span.num { color: white; }
.loader-hidden { opacity: 0; visibility: hidden; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* FAB BANTUAN */
.fab-container { position: fixed; bottom: 70px; right: 15px; z-index: 950; display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.fab-main-btn { background: white; color: #333; border-radius: 50px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); cursor: pointer; border: none; transition: transform 0.2s; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12px; order: 2; }
.fab-main-btn:active { transform: scale(0.95); }
.fab-main-btn i { font-size: 16px; color: #009688; }
.fab-menu { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28); pointer-events: none; margin-bottom: 10px; order: 1; }
.fab-container.active .fab-menu { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.fab-item { background: white; color: black; padding: 6px 14px; border-radius: 8px; font-size: 11px; font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); white-space: nowrap; border-left: 3px solid var(--primary); }
.fab-item:hover { background: #f5f5f5; }
.fab-wa { color: #25D366; font-size: 14px; }
.fab-tg { color: #229ED9; font-size: 14px; }

/* NAVBAR */
.navbar { background: #080c17; height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.nav-logo { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.nav-logo img { width: 35px; height: 35px; border-radius: 50%; }
.nav-logo-text { font-size: 18px; font-weight: 800; color: var(--text-white); letter-spacing: 1px; text-transform: uppercase; }
.nav-logo-text span { color: var(--primary); }
.nav-logo-text span.num { color: #ffffff !important; }
.nav-icon { font-size: 24px; color: var(--text-white); cursor: pointer; padding: 5px; display: flex; align-items: center; }

/* SIDEBAR */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 99; display: none; }
.sidebar { position: fixed; top: 0; right: 0; width: 280px; height: 100%; background: var(--bg-card); z-index: 100; transform: translateX(100%); transition: transform 0.3s ease; border-left: 1px solid var(--border); display: flex; flex-direction: column; }
.sidebar.active { transform: translateX(0); }
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.menu-list { padding: 10px; overflow-y: auto; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-white); text-decoration: none; font-size: 13px; font-weight: 500; transition: 0.2s; }
.menu-label { font-size: 10px; color: var(--text-gray); margin-top: 2px; }

.container { max-width: 1000px; margin: 0 auto; padding: 16px; min-height: 80vh; }
@media (max-width: 600px) { .container { padding: 10px; } }

/* BANNER */
.banner { width: 100%; aspect-ratio: 20/9; background: #222; border-radius: 12px; margin-bottom: 15px; overflow: hidden; position: relative; border:1px solid var(--border); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.detail-banner { width: 100%; aspect-ratio: 3/1; background: #222; border-radius: 12px; margin-bottom: 20px; overflow: hidden; border:1px solid var(--border); position: relative; }
.detail-banner img { width: 100%; height: 100%; object-fit: cover; }

.running-text-container { background: rgba(0, 80, 255, 0.1); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; white-space: nowrap; margin-bottom: 20px; padding: 8px 0; }
.running-text { display: inline-block; padding-left: 100%; animation: marquee 15s linear infinite; font-size: 11px; font-weight: 600; color: var(--text-white); text-transform: uppercase; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* GRID SYSTEM */
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; border-left: 3px solid var(--primary); padding-left: 10px; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
@media (max-width: 600px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 360px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }

.game-card { background: transparent; border-radius: 8px; overflow: hidden; position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); }
.card-top { background: var(--bg-card); border-radius: 0; position: relative; overflow: hidden; }
.card-top img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.card-wave { position: absolute; bottom: -1px; left: 0; width: 100%; line-height: 0; }
.card-wave svg { width: 100%; height: 15px; fill: #10172d; }
.card-content { background: #10172d; padding: 8px 5px; text-align: center; display: flex; flex-direction: column; justify-content: center; flex-grow: 1; min-height: 50px; }
.game-name { font-size: 10px; font-weight: 600; color: white; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; }
.game-btn-area { background: #10172d; padding: 0 5px 8px 5px; border-radius: 0 0 8px 8px; }
.btn-download { display: block; width: 100%; background: var(--btn-red); color: white; text-align: center; font-size: 10px; font-weight: 600; padding: 5px 0; border-radius: 4px; text-decoration: none; }
.btn-download i { margin-right: 4px; }

/* PLATFORM LABEL */
.platform-label { position: absolute; bottom: 0; right: 0; padding: 2px 6px; font-size: 8px; font-weight: 700; color: white; border-radius: 8px 0 0 0; z-index: 10; }
.lbl-android { background: linear-gradient(45deg, #03A9F4, #4CAF50); }
.lbl-ios { background: linear-gradient(45deg, #E91E63, #9C27B0); }

/* BADGE NEW ITEM */
.badge-new-item {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ff0000;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 20;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: blink-animation 1s steps(5, start) infinite;
    -webkit-animation: blink-animation 1s steps(5, start) infinite;
}
@keyframes blink-animation { to { visibility: hidden; } }

/* DETAIL PAGE */
#detail-page { display: none; }
.detail-header h2 { font-size: 18px; color: var(--primary); text-align: center; margin: 15px 0; font-weight: 700; text-transform: uppercase; }
.tabs { display: flex; gap: 10px; margin-bottom: 15px; }
.tab { flex: 1; padding: 10px; text-align: center; background: var(--bg-card); border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); color: var(--text-gray); cursor: pointer; transition: 0.3s; }
.tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.content-area { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 15px; margin-bottom: 20px; font-size: 12px; color: #ccc; }
.step-box { background: var(--bg-card); border-radius: 12px; padding: 15px; margin-bottom: 15px; border: 1px solid var(--border); }
.step-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.step-num { width: 24px; height: 24px; background: var(--primary); color: white; font-weight: bold; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.step-title { font-weight: 600; font-size: 13px; color: white; }
.input-box { width: 100%; padding: 12px; border-radius: 6px; border: 1px solid var(--border); background: #080c17; color: white; outline: none; font-size: 12px; }
.variant-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.variant-item { background: #080c17; border: 1px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; transition: 0.2s; position: relative; }
.variant-item.selected { border-color: var(--primary); background: rgba(0, 80, 255, 0.15); }
.variant-name { font-size: 11px; font-weight: 600; margin-bottom: 4px; color: white; }
.variant-price { font-size: 12px; color: var(--primary); font-weight: 800; }
.pay-logos-row { display: flex; gap: 5px; align-items: center; background: white; padding: 4px 8px; border-radius: 4px; }
.pay-logos-row img { height: 14px; object-fit: contain; }

/* FOOTER & INFO */
.footer-section { background: var(--bg-card); padding: 15px 15px 0 15px; border-top: 1px solid var(--border); border-radius: 20px 20px 0 0; margin-top: 10px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.info-card { background: var(--bg-body); padding: 15px; border-radius: 12px; text-align: center; border: 1px solid var(--border); }
.info-icon svg { width: 30px; height: 30px; fill: var(--primary); margin-bottom: 5px; }
.info-title { font-weight: bold; font-size: 13px; margin-bottom: 2px; }
.info-desc { font-size: 10px; color: var(--text-gray); }

/* SLIDER GAMBAR BERJALAN (FIX WARNA) */
.slider-container { margin-top: 15px; padding: 10px 0; background: rgba(255,255,255,0.05); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); width: 100%; overflow: hidden; }
.slider-track { display: flex; align-items: center; width: calc(100px * 12); animation: scroll 15s linear infinite; }
.slide { width: 100px; height: 40px; display: flex; align-items: center; justify-content: center; margin: 0 15px; }
.slide img { max-width: 100%; max-height: 100%; object-fit: contain; filter: none; opacity: 1; transition: 0.3s; }
.slide img:hover { transform: scale(1.1); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-100px * 6)); } }

.sticky-footer { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--primary); height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 -4px 20px rgba(0,0,0,0.5); z-index: 100; }
.total-price { color: white; font-weight: bold; font-size: 12px; display: flex; flex-direction: column; }
.total-price span { font-size: 16px; font-weight: 800; }
.btn-buy { background: #080c17; color: white; border: none; padding: 10px 25px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(5px); }
.modal-box { background: var(--bg-card); width: 100%; max-width: 400px; border-radius: 16px; padding: 20px; border: 1px solid var(--border); max-height: 90vh; overflow-y: auto; }

/* QR ZOOM */
.qr-zoom-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 2000; display: none; justify-content: center; align-items: center; padding: 20px; }
.qr-zoom-img { max-width: 90%; max-height: 80vh; border-radius: 10px; box-shadow: 0 0 20px rgba(0,80,255,0.5); object-fit: contain; }
.copyright { text-align: center; font-size: 11px; color: #555; margin-top: 0; border-top: 1px solid rgba(255,255,255,0.05); padding: 15px 0; background: var(--bg-card); }
