/* ==========================================================================
   JEPE STORE — Top Up (tambahan di atas style.css)
   ========================================================================== */

/* Hero game di halaman Top Up */
.topup-hero {
    position: relative;
    margin-top: 18px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    min-height: 118px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}
.topup-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 15, 26, 0.15) 0%, rgba(11, 15, 26, 0.88) 100%);
}
.topup-hero-text { position: relative; z-index: 1; padding: 14px 16px; }
.topup-hero-text h1 { font-size: 19px; margin: 0 0 2px; }
.topup-hero-text p { margin: 0; font-size: 12.5px; color: var(--text-1); }

/* Judul langkah */
.step-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
}
.step-title .n {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Cek ID */
.id-row { display: flex; gap: 8px; align-items: stretch; }
.id-row .btn { width: auto; flex-shrink: 0; padding: 0 18px; border-radius: var(--radius-sm); }
.input-wrap { position: relative; flex: 1; min-width: 0; }
.input-wrap .icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-2);
    pointer-events: none;
    transition: color 0.15s ease;
}
.input-wrap input {
    width: 100%;
    background: var(--surface-raised);
    border: 1.5px solid var(--border);
    color: var(--text-0);
    border-radius: var(--radius-sm);
    padding: 14px 14px 14px 42px;
    font-size: 15px;
    font-family: var(--font-body);
    letter-spacing: 0.4px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input-wrap input::placeholder { color: var(--text-2); letter-spacing: 0; }
.input-wrap input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}
.input-wrap:focus-within .icon { color: var(--gold); }
.player-ok {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--success-soft);
    border: 1px solid rgba(52, 211, 153, 0.3);
    color: var(--success);
    font-size: 13px;
    font-weight: 600;
    display: none;
}

/* Grid produk */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-card {
    position: relative;
    appearance: none;
    text-align: left;
    background: linear-gradient(160deg, var(--surface-raised) 0%, var(--surface) 100%);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 12px 12px;
    color: var(--text-0);
    font-family: inherit;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.product-card:hover { border-color: rgba(245, 185, 66, 0.5); }
.product-card:active { transform: scale(0.98); }
.product-card .p-top { display: flex; align-items: center; gap: 9px; }
.product-card .p-coin {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.product-card .p-coin .icon { width: 17px; height: 17px; }
.product-card .p-title { font-family: var(--font-display); font-weight: 800; font-size: 16px; line-height: 1.15; }
.product-card .p-old { font-size: 11.5px; color: var(--text-2); text-decoration: line-through; margin-top: 1px; }
.product-card .p-price {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed var(--border);
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
}
.product-card .p-note { margin-top: 2px; font-size: 10.5px; color: var(--text-2); }
.product-card .p-disc {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #ff6a3d, #f1554c);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 9px 4px 11px;
    border-radius: 0 12px 0 12px;
    letter-spacing: 0.2px;
}
.product-card.is-selected {
    border-color: var(--gold);
    background: linear-gradient(160deg, rgba(245, 185, 66, 0.2) 0%, var(--gold-soft) 100%);
    box-shadow: 0 0 0 3px var(--gold-soft);
}
.product-empty { grid-column: 1 / -1; text-align: center; color: var(--text-2); font-size: 13px; padding: 10px 0; }

.form-error { display: none; margin-top: 14px; }

/* Halaman pembayaran */
.pay-total { text-align: center; padding: 6px 0 2px; }
.pay-total .lbl { font-size: 12px; color: var(--text-2); }
.pay-total .amt { font-family: var(--font-display); font-size: 27px; font-weight: 800; color: var(--gold); margin-top: 2px; }
.pay-total .sub { font-size: 12px; color: var(--text-1); margin-top: 4px; }

.qr-box {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 12px;
    margin: 14px auto 0;
    width: 100%;
    max-width: 290px;
}
.qr-box img { width: 100%; height: auto; display: block; }

.countdown {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-0);
}
.countdown.is-low { color: var(--danger); }

/* Kartu game di Home (Top Up) */
.topup-cta-row { display: flex; gap: 10px; margin-top: 14px; }
.topup-cta-row .btn { flex: 1; }

.trust-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.trust-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 12.5px;
    color: var(--text-1);
    line-height: 1.4;
}
.trust-item b { display: flex; align-items: center; gap: 6px; color: var(--text-0); font-size: 13px; margin-bottom: 3px; }
.trust-item .icon { color: var(--gold); }

.bongkar-promo {
    margin-top: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #1a2337 0%, #131a2b 100%);
}
.bongkar-promo h3 { margin: 0 0 4px; font-size: 16px; }
.bongkar-promo p { margin: 0 0 12px; font-size: 13px; color: var(--text-1); line-height: 1.45; }

/* Admin: baris aksi kecil */
.admin-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.admin-inline form { margin: 0; }
.admin-inline .btn { width: auto; padding: 9px 14px; font-size: 12.5px; }
.kv { font-size: 12px; color: var(--text-2); margin-top: 4px; word-break: break-all; }
.kv b { color: var(--text-1); font-weight: 600; }


/* ==========================================================================
   Home & halaman game — tampilan lebih modern
   ========================================================================== */

html { scroll-behavior: smooth; }

.home-tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 10px;
    margin: 14px -4px 0;
    padding: 8px 4px;
    background: linear-gradient(180deg, var(--ink) 70%, rgba(11, 15, 26, 0));
}
.home-tabs .btn { flex: 1; border-radius: 999px; }

section[id] { scroll-margin-top: 70px; }

.section-head { margin: 26px 0 12px; }
.section-head .section-title { margin: 0 0 3px; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.section-head .section-title .icon { color: var(--gold); }
.section-head p { margin: 0; font-size: 13px; color: var(--text-1); line-height: 1.45; }
.page-title { font-family: var(--font-display); font-size: 20px; margin: 0 0 3px; }

/* Kartu game (dipakai Top Up & Bongkar) */
a.game-card { color: inherit; text-decoration: none; min-height: 200px; border-radius: 16px; transition: transform 0.15s ease, border-color 0.15s ease; }
a.game-card:hover { border-color: rgba(245, 185, 66, 0.55); transform: translateY(-2px); }
a.game-card:active { transform: scale(0.98); }
.game-card .card-bg { filter: brightness(0.62); transform: scale(1.04); transition: transform 0.4s ease; }
a.game-card:hover .card-bg { transform: scale(1.1); }
.game-card .card-badges {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: auto;
}
.gbadge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 999px;
    letter-spacing: 0.1px;
}
.gbadge .icon { width: 9px; height: 9px; vertical-align: 0; }
.gbadge-popular { background: var(--gold); color: var(--ink); }
.gbadge-best { background: linear-gradient(135deg, #ff6a3d, #f1554c); color: #fff; }
.game-card .game-name { font-size: 15px; margin-top: 12px; line-height: 1.25; }
.game-card .game-price { font-size: 12px; }
.game-card .card-cta { border-radius: 999px; padding: 8px 14px; }

.topup-hero-text .card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.topup-hero-text .gbadge { font-size: 10px; padding: 4px 8px; }
.topup-hero-text .gbadge .icon { width: 10px; height: 10px; }

/* Kartu "Cara ..." */
.how-card {
    margin-top: 14px;
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(160deg, var(--surface) 0%, #10162a 100%);
}
.how-title {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}
.how-title .icon { color: var(--gold); }

.promo-strip {
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--gold);
    background: rgba(255, 200, 80, 0.07);
    font-size: 13px;
    line-height: 1.5;
}
.promo-strip > b:first-child { display: block; color: var(--gold); }

.trust-row { margin-top: 18px; }

/* Admin: form edit produk & label game */
.admin-edit { margin-top: 10px; }
.admin-edit summary {
    cursor: pointer;
    list-style: none;
    display: inline-block;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-1);
}
.admin-edit summary::-webkit-details-marker { display: none; }
.admin-edit[open] summary { border-color: var(--teal); color: var(--teal); }
.admin-edit form { margin-top: 12px; }
.check-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 4px; }
.check-row label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-0); margin: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Admin: hapus massal produk */
.bulk-bar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 4px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.bulk-bar .btn { width: auto; padding: 8px 12px; font-size: 12px; }
.bulk-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-1); cursor: pointer; }
.bulk-count { font-size: 12px; color: var(--text-2); margin-right: auto; }
.pick-wrap { display: inline-flex; align-items: center; margin-right: 10px; }
.pick, #pick-all, .pick-game { width: 18px; height: 18px; accent-color: var(--gold); }
.req-top { display: flex; align-items: center; }


/* ==========================================================================
   Cloudflare Turnstile — ruang dipesan dulu supaya layout tidak loncat
   (flexible: 100% x 65px, compact: 150 x 140px)
   ========================================================================== */
.ts-wrap { margin-top: 16px; }
.ts-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-1);
}
.ts-label .icon { color: var(--gold); }
.ts-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-height: 65px;
    overflow: hidden;
    border-radius: 10px;
}
.ts-box.is-compact { min-height: 140px; }
.ts-box iframe { max-width: 100%; }
.ts-error { display: none; margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: var(--danger); text-align: center; }
.modal-box .ts-wrap { margin: 14px 0 4px; }
