/* ==========================================================================
   JEPE STORE — Stylesheet
   ------------------------------------------------------------------------
   Direction: a coin cash-out service, not a generic SaaS panel. The palette
   reads "coins into cash" — deep ink surfaces, one warm gold accent standing
   in for the coin itself, teal for in-progress/trust states. Sora carries
   headlines and numbers (the things people actually came here to see –
   totals, prices); Plus Jakarta Sans carries everything you read.
   ========================================================================== */

:root {
    /* Color */
    --ink: #0b0f1a;
    --surface: #131a2b;
    --surface-raised: #1a2337;
    --border: #262f47;

    --gold: #f5b942;
    --gold-deep: #c9860a;
    --gold-soft: rgba(245, 185, 66, 0.14);

    --teal: #2dd4bf;
    --teal-soft: rgba(45, 212, 191, 0.14);

    --text-0: #eef1f8;
    --text-1: #aab1c7;
    --text-2: #6d7590;

    --success: #34d399;
    --success-soft: rgba(52, 211, 153, 0.14);
    --danger: #f1554c;
    --danger-soft: rgba(241, 85, 76, 0.14);

    /* Type */
    --font-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;

    /* Shape */
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 9px;
    --max-width: 460px;
}

* { box-sizing: border-box; }

/* Icons — inline SVGs used in place of emoji everywhere in the app */
.icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

html, body { margin: 0; padding: 0; }

body {
    background: var(--ink);
    color: var(--text-0);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 78px;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url('/assets/images/background.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(3px);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(11, 15, 26, 0.2) 0%, rgba(11, 15, 26, 0.9) 100%);
}

h1, h2, h3 { font-family: var(--font-display); }

a { color: var(--teal); text-decoration: none; }

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 18px 32px;
}

/* ---------------------------------------------------------------------- */
/* Top bar                                                                  */
/* ---------------------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(11, 15, 26, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.brand-logo {
    height: 28px;
    width: auto;
    display: block;
}

.navlinks { display: flex; gap: 4px; }

.navlinks a {
    font-size: 13px;
    color: var(--text-1);
    padding: 6px 10px;
    border-radius: 8px;
}

.navlinks a.active, .navlinks a:hover { color: var(--text-0); background: var(--surface); }

/* ---------------------------------------------------------------------- */
/* Bottom tab bar                                                          */
/* ---------------------------------------------------------------------- */

.bottomnav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: rgba(15, 19, 32, 0.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
}

.bottomnav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 0 11px;
    font-size: 11px;
    color: var(--text-2);
}

.bottomnav a.active { color: var(--gold); }
.bottomnav .ic { line-height: 1; display: flex; }
.bottomnav .ic .icon { width: 20px; height: 20px; vertical-align: 0; }

/* ---------------------------------------------------------------------- */
/* Hero                                                                     */
/* ---------------------------------------------------------------------- */

/* Auto-rotating hero banner — two game-branded photos crossfading, with
   dot indicators. Copy sits below it, not on top, so the artwork (which
   already carries each game's name) stays clean and readable. Background
   art subtle blur + dark gradient overlay for texture. */
.hero-slider {
    margin-top: 20px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface);
    border: 1px solid var(--border);
}

.hero-slider::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('/assets/images/background.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(2px);
}

.hero-slide {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.is-active { opacity: 1; }

.hero-slider::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, transparent 50%, rgba(11, 15, 26, 0.3) 70%, rgba(11, 15, 26, 0.85) 100%);
    pointer-events: none;
}

.hero-slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.hero-slider-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, width 0.2s ease;
}

.hero-slider-dots .dot.is-active {
    background: var(--gold);
    width: 18px;
}

.hero-content { margin-top: 20px; }

.hero-content h1 {
    margin: 0 0 10px;
    font-size: 23px;
    line-height: 1.28;
    font-weight: 700;
    color: var(--text-0);
    max-width: 24ch;
}

.hero-content p {
    margin: 0 0 18px;
    color: var(--text-1);
    font-size: 14px;
    max-width: 36ch;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                  */
/* ---------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary,
.btn-solid {
    background: var(--gold);
    color: var(--ink);
}

.btn-primary:hover, .btn-solid:hover { background: #f7c667; }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-0);
}

.btn-outline:hover { border-color: var(--teal); color: var(--teal); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #06241a; }
.btn-sm { padding: 10px 16px; font-size: 13px; width: auto; }

/* ---------------------------------------------------------------------- */
/* Section titles / cards                                                  */
/* ---------------------------------------------------------------------- */

.section-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    margin: 30px 0 12px;
    color: var(--text-0);
    display: flex;
    align-items: center;
    gap: 7px;
}

.section-title .icon { color: var(--gold); }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

.game-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Each card carries its game's own art as a blurred, darkened backdrop —
   set per-card via the --card-bg custom property — instead of a flat
   icon-on-a-tile look. The blur + gradient keep text readable and keep
   this from reading like a stock/AI-generated tile. */
.game-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    min-height: 176px;
    display: flex;
    align-items: flex-end;
}

.game-card-bg {
    position: absolute;
    inset: -8px;
    background-image: var(--card-bg, none);
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.55) saturate(1.05);
    transform: scale(1.1);
    z-index: 0;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 15, 26, 0.1) 0%, rgba(11, 15, 26, 0.55) 55%, rgba(11, 15, 26, 0.93) 100%);
    z-index: 1;
}

.game-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--gold);
    color: var(--ink);
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
}

.game-card-badge .icon { width: 10px; height: 10px; }

.game-card-body {
    position: relative;
    z-index: 2;
    padding: 14px;
    width: 100%;
}

.game-card .game-name {
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-0);
}

.game-card .game-price {
    font-size: 12px;
    color: var(--teal);
    margin-top: 4px;
    font-weight: 600;
}

.game-card-btn {
    margin-top: 10px;
    width: 100%;
    padding: 9px 10px;
}

/* Numbered steps — a literal sequence, styled as small coin discs */
.steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.step {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.step-num {
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: linear-gradient(155deg, var(--gold) 0%, var(--gold-deep) 100%);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-text { font-size: 13.5px; color: var(--text-1); padding-top: 4px; }
.step-text b { color: var(--text-0); font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* Forms                                                                    */
/* ---------------------------------------------------------------------- */

.field { margin-bottom: 16px; }

.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 7px;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="password"],
.field select {
    width: 100%;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    color: var(--text-0);
    border-radius: var(--radius-sm);
    padding: 13px 14px;
    font-size: 14.5px;
    font-family: var(--font-body);
}

.field input:focus, .field select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; }

.file-drop {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 24px 14px;
    text-align: center;
    background: var(--surface-raised);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-2);
}

.file-drop.has-file { border-color: var(--teal); color: var(--text-0); }
.file-preview { max-width: 100%; border-radius: 10px; margin-top: 10px; display: none; }

.hint { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.error-text { font-size: 12.5px; color: var(--danger); margin-top: 6px; display: none; }

/* ---------------------------------------------------------------------- */
/* Status badges                                                            */
/* ---------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px 5px 9px;
    border-radius: 999px;
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge-pending { background: var(--gold-soft); color: var(--gold); }
.badge-processing { background: var(--teal-soft); color: var(--teal); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }

/* ---------------------------------------------------------------------- */
/* Summary / preview rows                                                   */
/* ---------------------------------------------------------------------- */

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    gap: 12px;
}

.summary-row:last-child { border-bottom: none; }
.summary-row .label { color: var(--text-2); }
.summary-row .value { color: var(--text-0); font-weight: 600; text-align: right; }
.summary-row .value.total {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 19px;
    font-weight: 700;
}

/* ---------------------------------------------------------------------- */
/* Alerts                                                                    */
/* ---------------------------------------------------------------------- */

.alert {
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.alert-error { background: var(--danger-soft); border-color: rgba(241, 85, 76, 0.3); color: #fca19b; }
.alert-success { background: var(--success-soft); border-color: rgba(52, 211, 153, 0.3); color: #86e8c3; }
.alert-info { background: var(--teal-soft); border-color: rgba(45, 212, 191, 0.3); color: #7de9dc; }

/* ---------------------------------------------------------------------- */
/* Misc                                                                       */
/* ---------------------------------------------------------------------- */

.center { text-align: center; }
.muted { color: var(--text-2); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

.spinner {
    width: 15px; height: 15px;
    border: 2px solid rgba(11, 15, 26, 0.25);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tx-search { display: flex; gap: 8px; }

.result-box img { width: 100%; border-radius: 10px; margin-top: 10px; }

/* ---------------------------------------------------------------------- */
/* Admin                                                                      */
/* ---------------------------------------------------------------------- */

.admin-body { padding-bottom: 32px; }

.admin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    text-align: center;
}

.stat-card .num { font-family: var(--font-display); font-size: 27px; font-weight: 700; color: var(--gold); }
.stat-card .lbl { font-size: 12px; color: var(--text-2); margin-top: 3px; }

.admin-menu { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.req-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 15px;
    margin-bottom: 10px;
}

.req-item .req-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.req-item .req-id { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--text-0); }

.req-item .req-meta { font-size: 12.5px; color: var(--text-1); }
.req-item .req-meta .req-meta-primary { color: var(--text-0); font-weight: 600; }
.req-item .req-meta .req-meta-line { display: flex; justify-content: space-between; padding: 3px 0; }
.req-item .req-meta .req-meta-line .amt { color: var(--gold); font-weight: 600; }

.req-item .req-actions { margin-top: 12px; display: flex; gap: 8px; }

.filter-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; }
.filter-tabs a {
    flex: 0 0 auto;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-1);
    border: 1px solid var(--border);
}
.filter-tabs a.active { background: var(--gold); color: var(--ink); border-color: transparent; }

.detail-image {
    width: 100%;
    border-radius: var(--radius-md);
    margin-top: 8px;
    border: 1px solid var(--border);
}

/* ---------------------------------------------------------------------- */
/* Target ID Bongkar — destination box                                     */
/* ---------------------------------------------------------------------- */

.target-box {
    background: var(--gold-soft);
    border: 1px solid rgba(245, 185, 66, 0.35);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.target-label {
    display: block;
    font-size: 11.5px;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 6px;
}

.target-value {
    display: block;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--text-0);
    letter-spacing: 0.5px;
}

/* ---------------------------------------------------------------------- */
/* Confirmation modal                                                      */
/* ---------------------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(5, 7, 13, 0.72);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.modal-box {
    width: 100%;
    max-width: var(--max-width);
    max-height: 88vh;
    overflow-y: auto;
    background: var(--ink);
    border: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 22px 18px 24px;
}

@media (min-width: 540px) {
    .modal-overlay { align-items: center; }
    .modal-box { border-radius: var(--radius-lg); }
}

.modal-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text-0);
}

.modal-subtitle {
    font-size: 12.5px;
    color: var(--text-2);
    margin: 0 0 18px;
}

.modal-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-1);
    text-transform: none;
    margin: 16px 0 8px;
}

.modal-section-title:first-of-type { margin-top: 0; }

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.modal-actions .btn { width: auto; flex: 1; }
