/**
 * MYC Topup — tema "Aurora Glass – Midnight Gold". CSS polos, tanpa build step.
 *
 * Susunan berkas:
 *   1. Token desain
 *   2. Dasar (reset, tipografi, aksesibilitas)
 *   3. Komponen bersama (dipakai halaman publik DAN panel admin)
 *   4. Layout publik (navbar, footer)
 *   5. Halaman: beranda
 *   6. Halaman: game / checkout
 *   7. Halaman: invoice, cek transaksi, login, error
 *   8. Responsif
 *   9. Gerakan dikurangi
 *
 * Gaya khusus panel admin ada di admin.css (dimuat lewat $pageStyles).
 */

/* Huruf disimpan di server sendiri (assets/fonts, lisensi OFL): Sora untuk
   judul dan angka, Plus Jakarta Sans untuk teks. Font variabel, satu file per subset. */
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url('../fonts/plus-jakarta-sans-latin-ext-9f6257.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Plus Jakarta Sans';font-style:normal;font-weight:400 800;font-display:swap;src:url('../fonts/plus-jakarta-sans-latin-fdb05b.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}
@font-face{font-family:'Sora';font-style:normal;font-weight:600 800;font-display:swap;src:url('../fonts/sora-latin-ext-f9e5e3.woff2') format('woff2');unicode-range:U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF}
@font-face{font-family:'Sora';font-style:normal;font-weight:600 800;font-display:swap;src:url('../fonts/sora-latin-4fa0aa.woff2') format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD}

/* ================================================================== */
/* 1. Token desain                                                     */
/* ================================================================== */

:root {
    --bg: #080B16;
    --bg-2: #0C1122;
    --surface: rgba(255, 255, 255, .045);
    --surface-2: rgba(255, 255, 255, .075);
    --solid: #161B31;
    --line: rgba(255, 255, 255, .09);
    --line-2: rgba(255, 255, 255, .16);
    --text: #F5F5FC;
    --text-2: #BFC3D6;
    --text-3: #878CA6;
    /* Nama token mengikuti mockup (arah "Aurora Glass"); di varian Midnight
       Gold nilainya emas–jingga. */
    --violet: #F5C451;
    --violet-2: #F8D98A;
    --blue: #EFA23A;
    --cyan: #F97316;
    --grad: linear-gradient(100deg, #F5C451 0%, #EFA23A 55%, #F97316 100%);
    --grad-soft: linear-gradient(100deg, rgba(245, 196, 81, .22), rgba(249, 115, 22, .14));
    --on-accent: #1A1204; /* teks di atas gradasi aksen */
    --ok: #34D399;
    --warn: #FBBF24;
    --info: #60A5FA;
    --bad: #F87171;
    --mute: #9CA3C4;
    --r-sm: 12px;
    --r: 18px;
    --r-lg: 24px;
    --r-xl: 32px;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-d: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
}

/* ================================================================== */
/* 2. Dasar                                                            */
/* ================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Latar aurora: tiga cahaya lembut di bagian atas halaman. */
body::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    z-index: -1;
    height: 1100px;
    pointer-events: none;
    background:
        radial-gradient(620px 420px at 12% 6%, rgba(245, 196, 81, .30), transparent 70%),
        radial-gradient(700px 460px at 86% 12%, rgba(249, 115, 22, .16), transparent 70%),
        radial-gradient(900px 520px at 55% 48%, rgba(239, 162, 58, .12), transparent 72%);
}

a { color: inherit; text-decoration: none; }
/* font-size 0: teks alt tidak meluber dari sampul kecil bila gambar gagal dimuat. */
img { display: block; max-width: 100%; font-size: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }

.icon { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: 100%; max-width: 1232px; margin: 0 auto; padding: 0 24px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-3); font-size: 13px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--text-2); letter-spacing: -.01em; overflow-wrap: anywhere; }
.center { display: flex; justify-content: center; margin-top: 28px; }

/* ================================================================== */
/* 3. Komponen bersama                                                 */
/* ================================================================== */

/* ---------- Permukaan ----------
   Sengaja tanpa backdrop-filter: efek blur hanya dipakai di navbar, hero, dan
   bilah beli supaya grid panjang tetap ringan. */
.glass, .card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card { padding: 24px; }
.card.form-card { max-width: 620px; margin: 48px auto; }
.panel { padding: 30px; }
.panel-head { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.panel-head h2 { font-size: 20px; }
.panel-head p { margin-top: 2px; color: var(--text-3); font-size: 13.5px; }
.num { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--grad); box-shadow: 0 8px 20px -8px rgba(240, 169, 59, .9); color: var(--on-accent); font-family: var(--font-d); font-size: 16px; font-weight: 700; }

/* ---------- Judul bagian ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--violet-2); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::before { content: ""; flex: none; width: 18px; height: 2px; border-radius: 2px; background: var(--grad); }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 28px 0 16px; font-family: var(--font-d); font-size: 18px; font-weight: 700; }
.section-title h2 { font-size: 22px; }

/* ---------- Tombol ----------
   .btn tanpa modifier tampil sebagai tombol utama. Modifier bergaya mockup
   (.btn-ghost, .btn-sm, …) dan bergaya lama (.ghost, .small, …) sama-sama berlaku. */
.btn, .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--grad);
    box-shadow: 0 10px 28px -10px rgba(240, 169, 59, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
    color: var(--on-accent);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-ghost, .btn.ghost { background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); box-shadow: none; color: var(--text); }
.btn-ghost:hover, .btn.ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-danger, .btn.danger { background: rgba(248, 113, 113, .14); border: 1px solid rgba(248, 113, 113, .4); box-shadow: none; color: #FCA5A5; }
.btn-danger:hover, .btn.danger:hover { background: rgba(248, 113, 113, .22); }
.btn-sm, .btn.small { height: 38px; padding: 0 16px; font-size: 13.5px; }
.btn-block, .btn.block { width: 100%; }
.btn .icon { width: 17px; height: 17px; }

/* ---------- Chip & tab ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; transition: color .15s, border-color .15s; }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { border-color: rgba(245, 196, 81, .6); background: var(--grad-soft); color: #fff; }
.chip .icon { width: 16px; height: 16px; }
.chip-sm { height: 36px; padding: 0 15px; font-size: 13.5px; }

.tabs { display: inline-flex; gap: 4px; max-width: 100%; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 999px; background: rgba(5, 7, 15, .5); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; flex: none; align-items: center; height: 38px; padding: 0 18px; border-radius: 999px; color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--grad); box-shadow: 0 6px 16px -8px rgba(240, 169, 59, .9); color: var(--on-accent); }

/* ---------- Form ---------- */
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field, .form-group { min-width: 0; }
.form-group { margin-bottom: 18px; }
.field + .field { margin-top: 18px; }
.fields .field + .field { margin-top: 0; }
.field-phone { margin-top: 16px; }
.field-note { margin: 8px 0 0; color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.field label, .form-group label { display: block; margin-bottom: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.field-note { margin-top: 8px; color: var(--text-3); font-size: 12.5px; }
.field-note:empty { display: none; }

.input { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 14px; outline: 0; background: rgba(5, 7, 15, .55); color: var(--text); font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input::placeholder { color: var(--text-3); }
.input:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(245, 196, 81, .2); }
textarea.input { height: auto; min-height: 110px; padding: 14px 16px; resize: vertical; }
select.input {
    padding-right: 42px;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23BFC3D6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}
select.input option { background: var(--solid); color: var(--text); }

/* Input dengan tombol di sampingnya (lihat password, cek transaksi). */
.input-action { display: flex; gap: 10px; }
.input-action .input { flex: 1; min-width: 0; }
.input-action .btn { flex: none; height: 52px; }

/* Kotak cari berbentuk pil (navbar, katalog, daftar nominal). */
.search { position: relative; display: flex; flex: 1; align-items: center; gap: 10px; max-width: 460px; height: 44px; padding: 0 6px 0 16px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--text-3); transition: border-color .15s, box-shadow .15s; }
.search:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(245, 196, 81, .16); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font-size: 14px; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search .btn { height: 32px; padding: 0 14px; font-size: 13px; }

/* ---------- Alert & petunjuk ---------- */
.alert { position: relative; margin-bottom: 18px; padding: 13px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text-2); font-size: 14px; overflow-wrap: anywhere; }
.alert > .icon { position: absolute; top: 15px; left: 16px; }
.alert > .icon + * { display: block; padding-left: 28px; }
.alert.success { border-color: rgba(52, 211, 153, .32); background: rgba(52, 211, 153, .1); color: #6EE7B7; }
.alert.error { border-color: rgba(248, 113, 113, .34); background: rgba(248, 113, 113, .1); color: #FCA5A5; }
.alert.info { border-color: rgba(96, 165, 250, .3); background: rgba(96, 165, 250, .08); color: var(--text-2); }
.alert.info > .icon { color: var(--info); }
.alert.warn { border-color: rgba(239, 162, 58, .3); background: rgba(239, 162, 58, .09); color: var(--text-2); }
/* Teks hanya untuk pembaca layar (label tombol ikon, tautan yang teksnya disembunyikan di HP). */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -60px; left: 16px; z-index: 200; padding: 10px 16px; border-radius: 12px; background: var(--violet); color: #1A1406; font-weight: 700; }
.skip-link:focus { top: 12px; }
.main:focus { outline: none; }
.alert strong { color: var(--text); }
/* Mode offline toko: pemberitahuan di atas semua halaman publik. */
.store-rest { margin: 20px 0 0; border-color: rgba(245, 196, 81, .42); background: rgba(245, 196, 81, .1); color: #EAD9A8; }
.store-rest > .icon { color: #F5C451; }
.store-rest b { color: var(--text); font-weight: 700; }

.hint { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; padding: 13px 16px; border: 1px solid rgba(239, 162, 58, .25); border-radius: 14px; background: rgba(239, 162, 58, .09); color: var(--text-2); font-size: 13.5px; }
.hint .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--info); }

.empty-state { padding: 32px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--text-3); font-size: 14px; text-align: center; }
.empty-state .icon { display: block; width: 28px; height: 28px; margin: 0 auto 10px; }

/* ---------- Badge status ----------
   Class status berasal dari status_badge_class() di config/helpers.php.
   "pending" sengaja biru-abu (bukan kuning) supaya tidak bertabrakan dengan
   aksen emas tema ini. */
.badge { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 3px 12px 3px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text-2); font-size: 12.5px; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.badge::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.pending { border-color: rgba(148, 163, 208, .45); background: rgba(100, 116, 160, .2); color: #B6C2E2; }
.badge.paid { border-color: rgba(96, 165, 250, .36); background: rgba(96, 165, 250, .12); color: #93C5FD; }
.badge.processing { border-color: rgba(167, 139, 250, .4); background: rgba(167, 139, 250, .13); color: #C4B5FD; }
.badge.success { border-color: rgba(52, 211, 153, .32); background: rgba(52, 211, 153, .1); color: #6EE7B7; }
.badge.failed { border-color: rgba(248, 113, 113, .34); background: rgba(248, 113, 113, .1); color: #FCA5A5; }
.badge.cancelled { border-color: rgba(156, 163, 196, .22); background: rgba(156, 163, 196, .07); color: #8E93AD; }

/* ---------- Baris ringkasan (label kiri, nilai kanan) ---------- */
.sum-row, .summary-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.sum-row > span, .summary-row > span { flex: none; max-width: 45%; color: var(--text-2); }
.sum-row > b, .summary-row > strong { min-width: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.sum-total { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 0 22px; }
.sum-total span { color: var(--text-2); font-size: 14.5px; }
.sum-total b { font-family: var(--font-d); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.fine { margin-top: 14px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; text-align: center; }
.fine a, .legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.legal { max-width: 820px; margin: 32px auto; }
.legal h1 { margin: 10px 0 6px; font-size: 32px; overflow-wrap: anywhere; }
.legal-updated { margin: 0 0 22px; font-size: 13px; color: var(--text-3); }
.legal h2 { margin: 28px 0 10px; font-size: 18px; }
.legal h3 { margin: 18px 0 6px; font-size: 15.5px; color: var(--text); }
.legal p, .legal li { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; list-style: disc; }
.legal li { margin-bottom: 6px; }
.legal ol { margin: 0 0 12px; padding-left: 22px; list-style: decimal; }
.legal-steps li { margin-bottom: 10px; padding-left: 4px; }
.legal-steps li::marker { color: var(--violet-2); font-weight: 700; }
.legal-facts { padding: 16px 18px 10px 38px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(255, 255, 255, .03); }
.fine-warn { color: #FCA5A5; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 14px 20px; background: rgba(5, 7, 15, .35); color: var(--text-3); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 15px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: rgba(255, 255, 255, .025); }

/* ---------- Kartu angka (dashboard) ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.metric { padding: 22px 24px; }
.metric > span, .metric .top { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: 14px; font-weight: 600; }
.metric > strong, .metric .val { display: block; margin-top: 16px; font-family: var(--font-d); font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; white-space: nowrap; }
.metric .cap { margin-top: 6px; color: var(--text-3); font-size: 13px; }
.metric.hl { border-color: rgba(245, 196, 81, .4); background: linear-gradient(135deg, rgba(245, 196, 81, .2), rgba(249, 115, 22, .1)); }

/* ---------- Ikon dalam kotak ---------- */
.ico-tile { display: grid; flex: none; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(245, 196, 81, .4); border-radius: 14px; background: var(--grad-soft); color: #fff; }
.ico-tile .icon { width: 21px; height: 21px; }
.mono { display: grid; flex: none; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line-2); border-radius: 11px; background: rgba(255, 255, 255, .08); color: #fff; }
/* Logo resmi metode pembayaran (lihat payment_method_mark()): latar putih agar logo berwarna tetap terbaca. */
.mono:has(.pay-logo) { overflow: hidden; border-color: transparent; background: #fff; }
.pay-logo { width: 100%; height: 100%; padding: 4px; object-fit: contain; }

/* ---------- Sampul pengganti (game tanpa gambar) ----------
   Warna dipilih game_visual() di config/catalog.php lewat class "cover-{tone}". */
.cover-violet { background: linear-gradient(140deg, #2A2F55, #5B5FA8); }
.cover-orange { background: linear-gradient(140deg, #7A3413, #E88A3A); }
.cover-gold { background: linear-gradient(140deg, #5C4712, #D9AE45); }
.cover-red { background: linear-gradient(140deg, #6B1B36, #D9566A); }
.cover-blue { background: linear-gradient(140deg, #1C4A86, #4FB7C4); }

/* ================================================================== */
/* 4. Layout publik                                                    */
/* ================================================================== */

/* ---------- Navbar ---------- */
.nav { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: rgba(8, 11, 22, .72); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: flex; flex: none; align-items: center; gap: 10px; font-family: var(--font-d); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.logo-mark { display: block; flex: none; width: 36px; height: 36px; filter: drop-shadow(0 4px 12px rgba(245, 196, 81, .35)); }
.logo-accent { color: #F5C451; } /* "Topup" emas, seperti logo horizontal MYC Topup */
.nav-links { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-link:hover { background: var(--surface); color: var(--text); }
.nav-link span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }

/* Saran pencarian di bawah kotak cari navbar (diisi app.js). */
.search-suggest { position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 60; max-height: 64vh; overflow-y: auto; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--solid); box-shadow: var(--shadow); }
.search-suggest-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.search-suggest-item:last-child { border-bottom: 0; }
.search-suggest-item:hover, .search-suggest-item.is-active { background: rgba(245, 196, 81, .12); }
.search-suggest-item img, .search-suggest-ph { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.search-suggest-ph { display: grid; place-items: center; background: var(--grad); color: var(--on-accent); font-size: 13px; font-weight: 800; }
.search-suggest-name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.search-suggest-empty { padding: 14px; color: var(--text-3); font-size: 13.5px; }

.main { padding-bottom: 20px; }

/* ---------- Footer ---------- */
.footer { margin-top: 44px; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; padding: 52px 0 40px; }
.foot-grid p { max-width: 300px; margin-top: 14px; color: var(--text-3); font-size: 14px; }
.foot-grid h2 { margin-bottom: 14px; color: var(--text-3); font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.foot-grid li { margin-bottom: 10px; }
.foot-grid li a { color: var(--text-2); font-size: 14.5px; }
.foot-grid li a:hover { color: var(--text); }
.foot-bot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 22px 0 28px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13px; }

/* ================================================================== */
/* 5. Halaman: beranda                                                 */
/* ================================================================== */

/* ---------- Hero ---------- */
.hero { padding: 56px 0 28px; }
.hero-card { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; overflow: hidden; padding: 64px; border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(135deg, rgba(245, 196, 81, .16), rgba(255, 255, 255, .035) 45%, rgba(249, 115, 22, .09)); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
.hero-card::after { content: ""; position: absolute; top: -160px; right: -120px; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(closest-side, rgba(239, 162, 58, .28), transparent); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.pill-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .06); color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.pill-tag i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(249, 115, 22, .18); }
.hero h1 { margin: 22px 0 18px; font-size: 60px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; }
.lead { max-width: 460px; color: var(--text-2); font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--text-3); font-size: 13.5px; }
.hero-note .icon { width: 16px; height: 16px; color: var(--cyan); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.hero-stats li { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font-family: var(--font-d); font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.hero-stats span { color: var(--text-3); font-size: 12.5px; }

.showcase { position: relative; z-index: 1; height: 430px; }
.showcase a { position: absolute; display: block; aspect-ratio: 1 / 1; overflow: hidden; border: 1px solid rgba(255, 255, 255, .18); border-radius: 26px; background-color: var(--solid); box-shadow: var(--shadow); }
.showcase img { width: 100%; height: 100%; object-fit: cover; }
.showcase span { position: absolute; right: 10px; bottom: 10px; left: 10px; overflow: hidden; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; background: rgba(10, 14, 29, .86); font-size: 13.5px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.showcase .s1 { top: 70px; left: 0; z-index: 2; width: 54%; transform: rotate(-4deg); }
.showcase .s2 { top: 0; right: 0; width: 41%; transform: rotate(5deg); }
.showcase .s3 { right: 5%; bottom: 0; z-index: 3; width: 41%; transform: rotate(-2deg); }
.showcase-empty { display: grid; place-content: center; height: 100%; border: 1px dashed var(--line-2); border-radius: 26px; color: var(--text-2); font-family: var(--font-d); font-size: 24px; font-weight: 700; text-align: center; }

/* ---------- Bagian ---------- */
.section { padding: 44px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.sec-head h2 { margin-top: 10px; font-size: 30px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; color: var(--violet-2); font-size: 14px; font-weight: 600; white-space: nowrap; }
.link-more .icon { width: 16px; height: 16px; }

/* ---------- Kartu game ---------- */
.cover { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; overflow: hidden; }
/* Sampul bergambar yang belum termuat (lazy-load) tampil sebagai bidang lembut, bukan kotak hitam kosong. Hanya untuk
   sampul tanpa class "cover-{tone}", supaya warna sampul pengganti tidak tertimpa. */
.cover:not([class*="cover-"]) { background: linear-gradient(140deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), var(--solid); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover strong { color: #fff; font-family: var(--font-d); font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.badge-pop { position: absolute; top: 8px; left: 8px; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(10, 14, 29, .82); color: #fff; font-size: 11.5px; font-weight: 700; }
.badge-pop .icon { width: 13px; height: 13px; color: var(--cyan); }

/* Rak pilihan: kartu lebih besar dengan panah aksi. */
.pop-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.pop { display: flex; flex-direction: column; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); transition: transform .2s, border-color .2s, background .2s; }
.pop:hover { transform: translateY(-4px); border-color: rgba(245, 196, 81, .6); background: var(--surface-2); }
.pop .cover { border-radius: 17px; }
.pop-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 62px; padding: 12px 6px 6px; }
.pop-body > span:first-child { min-width: 0; }
.pop-body b { display: -webkit-box; overflow: hidden; font-size: 14.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.pop-body small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12.5px; }
.go { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(245, 196, 81, .45); border-radius: 50%; background: var(--grad-soft); color: #fff; }
.go .icon { width: 15px; height: 15px; }

/* Katalog: 12 kartu per halaman (lihat ajax/search_games.php), jadi jumlah
   kolom dijaga tetap pembagi 12 supaya baris terakhir selalu penuh. */
.cat-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cat-tools .search { flex: 1 1 240px; max-width: 300px; padding-right: 16px; }
.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.game { display: block; min-width: 0; padding: 8px 8px 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); transition: transform .2s, border-color .2s, background .2s; }
.game:hover { transform: translateY(-3px); border-color: rgba(245, 196, 81, .55); background: var(--surface-2); }
.game .cover { border-radius: 14px; }
.game small { display: block; margin: 12px 6px 0; color: var(--violet-2); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.game b { display: -webkit-box; overflow: hidden; margin: 3px 6px 0; font-size: 14px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cat-grid + .empty-state { margin-top: 0; }

/* ---------- Kenapa MYC ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.why { padding: 26px; }
.why h3 { margin: 20px 0 8px; font-size: 17px; }
.why p { color: var(--text-2); font-size: 14.5px; }

/* ---------- Metode pembayaran ---------- */
.pay-panel { display: grid; grid-template-columns: 300px 1fr; align-items: center; gap: 40px; padding: 36px 40px; }
.pay-panel h2 { margin-top: 10px; font-size: 26px; }
.pay-panel p { margin-top: 8px; color: var(--text-2); font-size: 14.5px; }
.pay-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pay-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .04); font-size: 14px; font-weight: 600; line-height: 1.3; }
.pay-item small { display: block; color: var(--text-3); font-size: 12.5px; font-weight: 500; }

/* ---------- Cara top up ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; min-height: 118px; padding: 26px 26px 26px 88px; }
.step::before { content: "0" counter(step); position: absolute; top: 24px; left: 26px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: var(--font-d); font-size: 30px; font-weight: 700; letter-spacing: -.04em; counter-increment: step; }
.step h3 { margin-bottom: 6px; font-size: 16.5px; }
.step p { color: var(--text-2); font-size: 14.5px; }
/* Langkah terakhir yang sendirian di barisnya mengisi selebar baris. */
.steps .step:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.help-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.help-list .pay-item { color: var(--text); overflow-wrap: anywhere; }
a.pay-item:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .07); }
.foot-legal { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; color: var(--text-3); font-size: 13px; }

/* ---------- Tentang + FAQ ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-card { padding: 40px; }
.about-card h2 { margin: 12px 0 14px; font-size: 28px; }
.about-card p { color: var(--text-2); }
.about-card .link-more { margin-top: 12px; }
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq details { padding: 0 22px; border-radius: var(--r); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 0; font-size: 15px; font-weight: 600; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--text-3); transition: transform .2s; }
.faq details[open] summary .icon { transform: rotate(180deg); color: var(--violet-2); }
.faq details p { margin-top: -4px; padding: 0 0 20px; color: var(--text-2); font-size: 14.5px; }

/* ================================================================== */
/* 6. Halaman: game / checkout                                         */
/* ================================================================== */

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 28px 0 18px; color: var(--text-3); font-size: 13.5px; }
.crumbs a:hover { color: var(--text); }
.crumbs .icon { width: 14px; height: 14px; }
.crumbs b { min-width: 0; color: var(--text-2); font-weight: 600; overflow-wrap: anywhere; }

.g-head { position: relative; display: flex; align-items: center; gap: 28px; overflow: hidden; padding: 32px; border: 1px solid var(--line); border-radius: var(--r-xl); background: linear-gradient(120deg, rgba(245, 196, 81, .2), rgba(255, 255, 255, .04) 50%, rgba(249, 115, 22, .1)); }
.g-head .bgart { position: absolute; top: 0; right: 0; bottom: 0; width: 46%; height: 100%; object-fit: cover; opacity: .22; -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.g-cover { position: relative; display: grid; flex: none; place-items: center; width: 120px; height: 120px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .2); border-radius: 26px; background: var(--grad); box-shadow: var(--shadow); }
.g-cover img { width: 100%; height: 100%; object-fit: cover; }
.g-cover-initial { color: var(--on-accent); font-family: var(--font-d); font-size: 46px; font-weight: 800; }
.g-info { position: relative; min-width: 0; }
.g-info h1 { margin: 10px 0 8px; font-size: 36px; overflow-wrap: anywhere; }
.g-info p { color: var(--text-2); }
.g-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.g-meta span { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 14, 29, .45); color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.3; }
.g-meta .icon { width: 14px; height: 14px; color: var(--cyan); }
.page-alert { margin-top: 24px; }

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 372px; align-items: start; gap: 24px; padding: 24px 0 40px; }
.co-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.opt { margin-left: 8px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-3); font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: 0; vertical-align: middle; }

/* Panduan langkah manual (mis. link pembayaran RF Online Next). */
.guide ol { margin-top: 8px; padding-left: 18px; list-style: decimal; font-size: 13.5px; line-height: 1.6; overflow-wrap: anywhere; }
.guide li + li { margin-top: 4px; }

.check-account { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 16px; }
.check-account .alert { margin-bottom: 0; }
.custom-amount { margin-bottom: 18px; }
.prod-search { max-width: none; margin-bottom: 16px; padding-right: 16px; }
.tiers { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 22px; }
.prod-search + .tiers { margin-top: 0; }

/* Pilihan nominal & pembayaran: <label> berisi radio tersembunyi + kartu.
   Kartu terpilih ditandai lewat input:checked, tanpa JS. */
.prod-group { grid-column: 1 / -1; margin: 8px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.prod-group:first-child { margin-top: 0; }
.prod-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.paym-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prod-opt, .paym-opt { position: relative; display: block; min-width: 0; cursor: pointer; }
.prod-opt input, .paym-opt input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.prod, .paym { position: relative; height: 100%; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .04); transition: border-color .15s, background .15s; }
.prod-opt:hover .prod, .paym-opt:hover .paym { border-color: var(--line-2); background: rgba(255, 255, 255, .07); }
.prod-opt input:checked + .prod, .paym-opt input:checked + .paym { border: 1.5px solid transparent; background: linear-gradient(var(--solid), var(--solid)) padding-box, var(--grad) border-box; box-shadow: 0 14px 34px -18px rgba(240, 169, 59, .9); }
.prod-opt input:focus-visible + .prod, .paym-opt input:focus-visible + .paym { outline: 2px solid var(--violet-2); outline-offset: 2px; }

.prod { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.prod .gem { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(249, 115, 22, .22); border-radius: 10px; background: rgba(249, 115, 22, .1); color: var(--cyan); }
.prod .gem .icon { width: 17px; height: 17px; }
.prod .gem img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }
.prod-note { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.prod-note .icon { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--violet-2); }
.sum-note { margin: -4px 0 8px; }
.sum-note[hidden] { display: none; }
.prod b { font-size: 14.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.prod .price { margin-top: auto; color: var(--violet-2); font-family: var(--font-d); font-size: 14.5px; font-weight: 600; }
.prod-opt input:checked + .prod .price { color: #fff; }
/* Centang kartu nominal terpilih. */
.prod-opt input:checked + .prod::after { content: ""; position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231A1204' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat, var(--grad); }
.prod-opt.off { cursor: not-allowed; }
.prod-opt.off .prod { opacity: .5; }
.prod-opt.off .price { color: var(--text-3); }
.tag-off { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border: 1px solid rgba(248, 113, 113, .35); border-radius: 999px; background: rgba(248, 113, 113, .14); color: #FCA5A5; font-size: 11.5px; font-weight: 700; }
#noProductResults { margin-top: 12px; }

.paym { display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 14px; }
.paym > span:nth-child(2) { min-width: 0; }
.paym b { display: block; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.paym small { display: block; color: var(--text-3); font-size: 12.5px; }
.paym small.paym-fee { margin-top: 2px; color: var(--text-2); font-weight: 600; }
.paym small.paym-limit { margin-top: 2px; color: #fca5a5; font-weight: 600; }
.paym-opt.paym-off { cursor: not-allowed; }
.paym-opt.paym-off .paym { opacity: .55; }
.paym-opt.paym-off:hover .paym { border-color: var(--line); background: rgba(255, 255, 255, .04); }
.btn.is-busy { opacity: .7; pointer-events: none; }
.paym .radio { display: grid; flex: none; place-items: center; width: 20px; height: 20px; margin-left: auto; border: 1.5px solid var(--line-2); border-radius: 50%; }
.paym-opt input:checked + .paym .radio { border: 0; background: var(--grad); }
.paym-opt input:checked + .paym .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

.summary { position: sticky; top: 96px; padding: 28px; }
/* Kolom samping checkout (game.php): ringkasan, lalu pilihan pembayaran + tombol beli tepat di bawahnya. Menempel saat
   halaman digulir; bila lebih tinggi dari layar, kolom ini bisa digulir sendiri. */
.co-side { position: sticky; top: 96px; display: grid; gap: 16px; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; border-radius: var(--r-lg); }
.co-side .summary { position: static; }
.co-side .summary .sum-total { padding-bottom: 0; }
.co-pay .panel-head p { font-size: 12.5px; }
.co-pay .paym-grid { grid-template-columns: 1fr; gap: 8px; }
.co-pay .paym { min-height: 60px; padding: 10px 12px; }
.co-buy .fine { margin-top: 12px; text-align: center; }
/* Desktop: kolom samping punya gulirnya sendiri; tombol beli menjadi kartu padat yang melekat di dasarnya supaya selalu
   terlihat walau daftar metode pembayaran panjang (keputusan pemilik 2026-10-24). Di layar laptop yang pendek ringkasan
   dipadatkan supaya judul dan metode pertama tetap terlihat di atas kartu beli. */
@media (min-width: 901px) {
    .co-side .co-buy { position: sticky; bottom: 0; z-index: 2; padding: 18px 22px 20px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: rgb(17, 20, 30); box-shadow: 0 -18px 32px -14px rgba(3, 5, 12, .85); }
}
@media (min-width: 901px) and (max-height: 880px) {
    .co-side .summary { padding: 22px 24px; }
    .co-side .summary h2 { margin-bottom: 12px; font-size: 18px; }
    .co-side .sum-game { padding: 8px 10px; }
    .co-side .sum-game img, .co-side .sum-game-initial { width: 40px; height: 40px; border-radius: 11px; font-size: 18px; }
    .co-side .sum-row { padding: 10px 0; }
    .co-side .sum-total { padding-top: 14px; }
    .co-side .sum-total b { font-size: 24px; }
}
.summary h2 { margin-bottom: 18px; font-size: 20px; }
.sum-game { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 7, 15, .45); }
.sum-game img, .sum-game-initial { flex: none; width: 52px; height: 52px; border-radius: 13px; object-fit: cover; background: var(--solid); }
.sum-game-initial { display: grid; place-items: center; background: var(--grad); color: var(--on-accent); font-family: var(--font-d); font-size: 22px; font-weight: 800; }
.sum-game div { min-width: 0; }
.sum-game b { display: block; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.sum-game small { color: var(--text-3); font-size: 12.5px; }

/* Bilah beli melekat: hanya tampil di layar kecil (lihat bagian Responsif). */
.buybar { display: none; }

/* ================================================================== */
/* 7. Halaman: invoice, cek transaksi, login, error                    */
/* ================================================================== */

/* ---------- Invoice (payment.php) ---------- */
.invoice { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin: 0 auto; padding: 40px 0 24px; }
.invoice .alert, .invoice .hint { margin: 0; }
.invoice .panel .hint, .invoice .panel .alert { margin-top: 16px; }
.invoice .panel .hint + .btn-block { margin-top: 16px; }
.inv-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 4px; }
.inv-success { margin: 18px 0; padding: 28px 24px; text-align: center; border-color: rgba(52, 211, 153, .4); background: linear-gradient(180deg, rgba(52, 211, 153, .14), rgba(52, 211, 153, .03)); }
.inv-success-mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: rgba(52, 211, 153, .18); color: #6EE7B7; }
.inv-success-mark .icon { width: 30px; height: 30px; }
.inv-success h2 { margin: 14px 0 8px; font-size: 24px; color: #6EE7B7; }
.inv-success p { margin: 0 auto 8px; max-width: 460px; line-height: 1.6; color: var(--text-2); }
.inv-head h1 { margin-top: 10px; font-size: 32px; overflow-wrap: anywhere; }
.inv-keep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; text-align: left; }
.inv-again { margin: 0; }
.countdown { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border: 1px solid rgba(148, 163, 208, .35); border-radius: 14px; background: rgba(100, 116, 160, .14); color: var(--text-2); font-size: 14px; }
.countdown .icon { color: #B6C2E2; }
.countdown strong { color: var(--text); font-family: var(--font-d); font-variant-numeric: tabular-nums; }
.invoice .sum-total { padding-bottom: 0; }
.copy-row { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 10px; }
.qris { margin-top: 20px; text-align: center; }
.crypto-qr { width: 100%; max-width: 220px; margin: 0 auto 10px; padding: 6px; border-radius: 16px; background: #fff; }
.crypto-qr svg { display: block; width: 100%; height: auto; }
.qris-dynamic .qris-code { max-width: 260px; }
.qris-dynamic .qris-framed { width: 100%; max-width: 340px; margin: 0 auto 10px; border-radius: 16px; overflow: hidden; background: #fff; }
.qris-dynamic .qris-framed canvas { display: block; width: 100%; height: auto; }
.qris-merchant { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 10px; }
.qris-merchant img { width: 64px; height: auto; margin-bottom: 4px; }
.qris-merchant b { font-size: 15px; }
.qris-merchant small { color: var(--text-3); font-size: 12px; }
.qris-static { margin-top: 12px; }
/* Midtrans tampil langsung di invoice (payment.php): QRIS, kotak VA / Mandiri, langkah bayar. */
.midtrans-direct .btn-block { max-width: 320px; margin: 12px auto 0; }
.qris .qris-merchant img { width: 76px; max-width: 76px; margin: 2px auto 6px; padding: 5px 10px; border-radius: 8px; background: #fff; }
.qris-amount { margin: 2px 0 0; font-family: var(--font-d); font-size: 22px; font-weight: 800; }
.va-box { display: grid; gap: 6px; margin-top: 16px; padding: 16px; border: 1px solid rgba(239, 162, 58, .35); border-radius: 16px; background: linear-gradient(180deg, rgba(245, 196, 81, .08), rgba(249, 115, 22, .03)); }
.va-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--text); font-size: 14px; font-weight: 700; }
.va-head .mono { width: 36px; height: 36px; border-radius: 10px; }
.va-label { display: block; color: var(--text-3); font-size: 12.5px; }
.va-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.va-line + .va-label { margin-top: 6px; }
.va-number { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 21px; font-weight: 700; letter-spacing: .03em; color: var(--text); }
.va-sub { margin-top: 8px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.va-sub b { font-size: 16px; }
.pay-steps { display: grid; gap: 10px; margin: 18px 0 0; padding: 14px 16px 14px 36px; list-style: decimal; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .03); color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.pay-steps li { padding-left: 4px; }
.pay-steps li::marker { color: var(--blue); font-weight: 800; }
.qris-static summary { cursor: pointer; color: var(--text-3); font-size: 12.5px; }
.qris-static img { display: block; max-width: 220px; margin: 12px auto 8px; border-radius: 12px; }
.lang-switch { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; font-weight: 700; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 11px; border-radius: 999px; color: var(--text-3); }
.lang-switch a.on { background: rgba(255, 255, 255, .1); color: var(--text); }
.price-alt { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.paym-group { margin: 18px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.paym-group:first-of-type { margin-top: 0; }
.qris img { width: 100%; max-width: 280px; margin: 0 auto; border-radius: 16px; background: #fff; }
.app-open { margin-top: 18px; }

/* ---------- Cek transaksi (history.php) ---------- */
.lookup { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; padding: 48px 0 24px; }
.lookup h1 { margin-top: -4px; font-size: 38px; }
.lookup .lead { max-width: none; margin-top: -8px; font-size: 16px; }
.lookup-form { margin-top: 8px; }
.trx-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.trx-head h2 { margin-top: 4px; font-size: 18px; }
.trx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trx-grid dt { color: var(--text-3); font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.trx-grid dd { margin-top: 6px; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.trx-actions { display: flex; justify-content: flex-end; margin-top: 20px; }

/* ---------- Login ---------- */
.auth { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 56px; padding: 64px 0 32px; }
.auth-intro h1 { margin: 18px 0 16px; font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.auth-features { display: grid; gap: 14px; margin-top: 30px; }
.auth-features li { display: flex; align-items: center; gap: 14px; color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.auth-features .ico-tile { width: 40px; height: 40px; border-radius: 12px; }
.auth-features .ico-tile .icon { width: 18px; height: 18px; }
.auth-card h2 { font-size: 24px; }
.auth-note { margin: 8px 0 24px; color: var(--text-3); font-size: 13.5px; }
.auth-card .btn-block { margin-top: 24px; }
/* Login admin, langkah 2: kode verifikasi dan pengaturan authenticator (panel-…/login.php). */
.otp-steps { display: grid; gap: 8px; margin: 0 0 18px; padding-left: 20px; list-style: decimal; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.otp-setup { display: grid; grid-template-columns: 148px 1fr; align-items: center; gap: 18px; margin-bottom: 22px; }
.otp-qr { padding: 6px; border-radius: 14px; background: #fff; }
.otp-qr svg { display: block; width: 100%; height: auto; }
.otp-label { display: block; margin-bottom: 6px; color: var(--text-3); font-size: 12.5px; }
.otp-secret { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; line-height: 1.7; color: var(--text); word-spacing: 4px; overflow-wrap: anywhere; }
.otp-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 20px; letter-spacing: .18em; text-align: center; }
.otp-help { display: block; margin-top: 8px; color: var(--text-3); font-size: 12.5px; }
.otp-cancel { margin-top: 14px; text-align: center; }
.passkey-login { margin-top: 18px; text-align: center; }
.passkey-login .btn-block { margin-top: 12px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Error (abort()) ---------- */
.error-page { display: grid; place-items: center; min-height: 52vh; padding: 56px 0 24px; }
.error-page .panel { width: 100%; max-width: 520px; padding: 44px 32px; text-align: center; }
.error-code { display: block; font-family: var(--font-d); font-size: 76px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.error-page h1 { margin: 18px 0 10px; font-size: 26px; }
.error-page p { color: var(--text-2); overflow-wrap: anywhere; }
.error-page .btn { margin-top: 28px; }
.error-page .btn + .btn { margin-left: 10px; }

/* ================================================================== */
/* 8. Responsif                                                        */
/* ================================================================== */

@media (max-width: 1100px) {
    .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .pop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .pay-panel { grid-template-columns: 1fr; gap: 24px; }
    .hero-card { gap: 28px; padding: 44px; }
    .hero h1 { font-size: 48px; }
    .prod-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .checkout { grid-template-columns: 1fr; }
    .summary { position: static; }
    .co-side { position: static; max-height: none; overflow: visible; }
    .co-pay .paym-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about { grid-template-columns: 1fr; }
    .hero-card { grid-template-columns: 1fr; }
    .showcase { width: 100%; max-width: 520px; margin: 0 auto; }
    .paym-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
    .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    html { scroll-padding-top: 140px; }
    .wrap { padding: 0 16px; }
    .panel { padding: 22px 18px; border-radius: 22px; }
    .panel-head { margin-bottom: 18px; }
    .panel-head h2 { font-size: 18px; }
    .fields, .two-col { grid-template-columns: 1fr; }
    .metrics { gap: 12px; }
    .trx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chips.scroll { flex-wrap: nowrap; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
    .chips.scroll::-webkit-scrollbar { display: none; }

    /* Navbar: kotak cari turun ke baris kedua; tautan menjadi tombol ikon. */
    .nav-in { flex-wrap: wrap; gap: 12px; height: auto; padding-top: 12px; padding-bottom: 12px; }
    .nav .search { flex: 1 0 100%; order: 3; max-width: none; }
    .nav-link { justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); background: var(--surface); }
    .nav-link span, .nav-link-home { display: none; }
    .nav-links .btn { height: 44px; padding: 0 16px; }

    .footer { margin-top: 24px; }
    .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding: 36px 0 28px; }
    .foot-grid > div:first-child { grid-column: span 2; }

    /* Beranda */
    .hero { padding: 20px 0; }
    .hero-card { gap: 28px; padding: 28px 22px 26px; border-radius: 26px; }
    .hero h1 { margin: 18px 0 14px; font-size: 38px; }
    .lead { font-size: 15.5px; }
    .hero-cta { margin-top: 24px; }
    .hero-cta .btn { flex: 1 1 140px; }
    .hero-note { align-items: flex-start; font-size: 13px; }
    .hero-note .icon { margin-top: 3px; }
    .showcase { max-width: 340px; height: 280px; }
    .showcase a { border-radius: 20px; }
    .showcase span { right: 7px; bottom: 7px; left: 7px; padding: 6px 8px; border-radius: 11px; font-size: 11px; }
    .showcase-empty { font-size: 18px; }
    .section { padding: 30px 0; }
    .sec-head { margin-bottom: 18px; }
    .sec-head h2 { font-size: 24px; }
    /* Di HP hanya panah yang terlihat; teksnya tetap dibaca pembaca layar (bukan display: none). */
    .sec-head .link-more span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .sec-head .link-more { padding: 12px; margin: -12px; }
    .pop-grid { display: flex; gap: 12px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scroll-padding-left: 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .pop-grid::-webkit-scrollbar { display: none; }
    .pop { flex: 0 0 164px; border-radius: 22px; scroll-snap-align: start; }
    .cat-tools { gap: 12px; margin-bottom: 18px; }
    .cat-tools .chips { max-width: calc(100% + 32px); }
    .cat-tools .search { flex: 1 0 100%; order: -1; max-width: none; }
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .why-grid { grid-template-columns: 1fr; gap: 12px; }
    .why { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; padding: 20px; }
    .why .ico-tile { grid-row: span 2; }
    .why h3 { margin: 0 0 4px; font-size: 16px; }
    .why p { font-size: 14px; }
    .pay-panel { padding: 24px 20px; }
    .pay-panel h2 { font-size: 22px; }
    .pay-list { grid-template-columns: 1fr; gap: 10px; }
    .help-list { grid-template-columns: 1fr; gap: 10px; }
    .legal-facts { padding: 14px 14px 8px 32px; }
    .pay-item { gap: 10px; padding: 10px; font-size: 13px; }
    .pay-item .mono { width: 32px; height: 32px; border-radius: 10px; }
    .steps { grid-template-columns: 1fr; gap: 12px; }
    .step { min-height: 0; padding: 20px 20px 20px 74px; }
    .step::before { top: 18px; left: 20px; font-size: 26px; }
    .about-card { padding: 26px 22px; }
    .about-card h2 { font-size: 23px; }
    .faq details { padding: 0 18px; }

    /* Game / checkout */
    .crumbs { padding: 18px 0 14px; }
    .g-head { align-items: flex-start; gap: 16px; padding: 20px; border-radius: 24px; }
    .g-head .bgart { display: none; }
    .g-cover { width: 76px; height: 76px; border-radius: 20px; }
    .g-cover-initial { font-size: 30px; }
    .g-info h1 { margin: 6px 0 4px; font-size: 23px; }
    .g-info p { font-size: 13.5px; }
    .g-meta { margin-top: 12px; }
    .g-meta span { min-height: 28px; padding: 3px 10px; font-size: 12px; }
    .checkout { gap: 16px; padding: 16px 0 24px; }
    .co-main { gap: 16px; }
    .tabs { display: flex; gap: 8px; margin: 0 -18px; padding: 5px 18px; border: 0; border-radius: 0; background: none; }
    .tab { border: 1px solid var(--line); background: var(--surface); }
    .tab.on { border-color: transparent; }
    .tiers { flex-wrap: nowrap; margin: 12px -18px 18px; padding: 0 18px; overflow-x: auto; scrollbar-width: none; }
    .tiers::-webkit-scrollbar { display: none; }
    .tiers .chip { height: 40px; }
    .prod-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .prod { gap: 3px; padding: 13px 14px; }
    .prod .gem { display: none; }
    .prod b, .prod .price { font-size: 14px; }
    .prod-opt input:checked + .prod b { padding-right: 24px; }
    .prod-opt input:checked + .prod::after { top: 10px; right: 10px; width: 20px; height: 20px; }
    .tag-off { top: -9px; right: -5px; background: #3A1D2E; }
    .paym-grid { grid-template-columns: 1fr; gap: 10px; }
    .summary { padding: 22px 18px; border-radius: 22px; }
    .summary .btn, .co-buy .btn { display: none; }
    .co-pay .paym-grid { grid-template-columns: 1fr; }
    .summary .sum-total { padding-bottom: 0; }
    body.has-buybar { padding-bottom: 84px; }
    .buybar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); background: rgba(10, 14, 29, .86); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
    .buybar > div { min-width: 0; }
    .buybar small { display: block; overflow: hidden; color: var(--text-3); font-size: 12px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
    .buybar b { font-family: var(--font-d); font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
    .buybar .btn { flex: none; height: 50px; padding: 0 26px; }

    /* Invoice, cek transaksi, login, error */
    .invoice { padding-top: 24px; }
    .inv-head h1 { font-size: 24px; }
    .lookup { padding-top: 28px; }
    .lookup h1 { font-size: 28px; }
    .lookup-form .input-action { flex-direction: column; }
    .lookup-form .input-action .input { flex: none; }
    .auth { padding-top: 28px; }
    .otp-setup { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .otp-qr { width: 168px; }
    .auth-intro h1 { font-size: 32px; }
    .error-page { min-height: 0; padding-top: 32px; }
    .error-page .panel { padding: 36px 22px; }
    .error-code { font-size: 60px; }
}

/* ================================================================== */
/* 9. Gerakan dikurangi                                                */
/* ================================================================== */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .btn:hover, .pop:hover, .game:hover { transform: none; }
}

/* ── Fitur baru halaman produk: lencana Terlaris, tombol bagikan, catatan autofill akun (game.php) ── */
.tag-hot { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border: 1px solid rgba(249, 115, 22, .4); border-radius: 999px; background: rgba(249, 115, 22, .15); color: #FBBF24; font-size: 11.5px; font-weight: 700; }
.tag-hot .icon { width: 12px; height: 12px; }
.g-share { margin-top: 14px; }
.autofill-note { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) { .tag-hot { top: -9px; right: -5px; background: #2A1E10; } }
