/* =========================================================
   JAYDREAM STORE - FULL UNIFIED DARK THEME CSS
   Mengatur Body, Background, Navbar, Footer, Top Up, Joki & Popup
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --jd-bg-main: #090d16;
    --jd-bg-secondary: #0f1626;
    --jd-card-bg: #151d30;
    --jd-card-hover: #1b253d;
    --jd-card-border: rgba(255, 255, 255, 0.1);
    --jd-primary: #6366f1;
    --jd-primary-glow: rgba(99, 102, 241, 0.35);
    --jd-accent: #38bdf8;
    --jd-gold: #f59e0b;
    --jd-success: #22c55e;
    --jd-danger: #ef4444;
    --jd-text-main: #f8fafc;
    --jd-text-muted: #94a3b8;
    --jd-radius: 16px;
}

/* Reset & Background Utama Seluruh Halaman */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background-color: var(--jd-bg-main) !important;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.14) 0%, transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(56, 189, 248, 0.12) 0%, transparent 35%) !important;
    background-attachment: fixed !important;
    color: var(--jd-text-main) !important;
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* =========================================================
   NAVBAR & FOOTER (Agar rapi, tidak kepotong & menyatu)
   ========================================================= */
nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 76px !important;
    padding: 14px 6% !important;
    background: rgba(9, 13, 22, 0.88) !important;
    backdrop-filter: blur(14px) !important;
    border-bottom: 1px solid var(--jd-card-border) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

nav .logo {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer;
}

nav .logo img {
    width: 42px !important;
    height: 42px !important;
    object-fit: contain !important;
    border-radius: 8px;
}

nav .logo h2 {
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    background: linear-gradient(90deg, #f59e0b, #fbbf24) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    margin: 0 !important;
}

nav ul {
    display: flex !important;
    align-items: center !important;
    gap: 26px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

nav ul li a {
    color: var(--jd-text-muted) !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    padding: 8px 14px !important;
    border-radius: 10px !important;
    transition: all 0.25s ease !important;
}

nav ul li a:hover,
nav ul li a.active {
    color: #ffffff !important;
    background: rgba(99, 102, 241, 0.18) !important;
}

#nav-auth-btn {
    padding: 10px 24px !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.92rem !important;
    border: none !important;
    border-radius: 999px !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3) !important;
}

#nav-auth-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45) !important;
}

footer {
    margin-top: auto !important;
    padding: 26px 20px !important;
    background: rgba(9, 13, 22, 0.95) !important;
    border-top: 1px solid var(--jd-card-border) !important;
    text-align: center !important;
    color: var(--jd-text-muted) !important;
    font-size: 0.9rem !important;
}

/* =========================================================
   CONTAINER & HEADER HALAMAN
   ========================================================= */
.jd-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 45px 20px 80px;
}

.jd-page-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 40px;
}

.jd-badge {
    display: inline-block;
    padding: 7px 18px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: var(--jd-accent);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.jd-page-header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: 0.5px;
    color: #ffffff !important;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.jd-page-header h1 span {
    background: linear-gradient(90deg, var(--jd-primary), var(--jd-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.jd-page-header p {
    color: var(--jd-text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* =========================================================
   TAB KATEGORI GAME (TOP UP)
   ========================================================= */
.jd-category-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.jd-tab-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 22px;
    background: var(--jd-card-bg);
    border: 1.5px solid var(--jd-card-border);
    border-radius: 14px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: left;
    min-width: 230px;
}

.jd-tab-btn img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #090d16;
}

.jd-tab-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff !important;
}

.jd-tab-sub {
    display: block;
    font-size: 0.78rem;
    color: var(--jd-text-muted) !important;
    margin-top: 3px;
}

.jd-tab-btn:hover {
    background: var(--jd-card-hover);
    border-color: var(--jd-accent);
    transform: translateY(-2px);
}

.jd-tab-btn.active {
    background: linear-gradient(135deg, #252f59, #1b2847) !important;
    border-color: var(--jd-accent) !important;
    box-shadow: 0 8px 25px var(--jd-primary-glow);
}

.jd-tab-btn.active .jd-tab-title {
    color: #ffffff !important;
}

.jd-tab-btn.active .jd-tab-sub {
    color: #bae6fd !important;
}

/* =========================================================
   GRID LAYOUT & KARTU TOP UP
   ========================================================= */
.jd-topup-grid {
    display: grid;
    grid-template-columns: 1fr 370px;
    gap: 28px;
    align-items: start;
}

.jd-card {
    background: var(--jd-card-bg);
    border: 1px solid var(--jd-card-border);
    border-radius: var(--jd-radius);
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.jd-sticky-card {
    position: sticky;
    top: 98px;
}

.jd-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--jd-card-border);
    background: rgba(255, 255, 255, 0.03);
}

.jd-step-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--jd-primary), var(--jd-accent));
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.jd-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
}

.jd-card-body {
    padding: 24px;
}

/* Form Input Akun */
.jd-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.jd-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.jd-form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #e2e8f0;
}

.jd-input {
    width: 100%;
    padding: 13px 16px;
    background: #090d16;
    border: 1px solid var(--jd-card-border);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.jd-input::placeholder {
    color: #64748b;
}

.jd-input:focus {
    border-color: var(--jd-accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.jd-helper-text {
    font-size: 0.82rem;
    color: var(--jd-text-muted);
    margin: 6px 0 0;
    line-height: 1.5;
}

/* Grid Item Nominal Top Up */
.jd-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 14px;
}

.jd-item-card {
    position: relative;
    background: #0d1322;
    border: 1.5px solid var(--jd-card-border);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.jd-item-card:hover {
    background: #131c31;
    border-color: rgba(56, 189, 248, 0.6);
    transform: translateY(-2px);
}

.jd-item-card.selected {
    background: linear-gradient(145deg, #1e294d, #152238);
    border-color: var(--jd-accent);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.28);
}

.jd-item-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(90deg, #f43f5e, #fb923c);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 99px;
    text-transform: uppercase;
}

.jd-item-badge.best {
    background: linear-gradient(90deg, #6366f1, #38bdf8);
}

.jd-item-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jd-item-top img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.jd-item-name {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
}

.jd-item-prices {
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.jd-price-final {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--jd-accent);
}

.jd-price-strike {
    font-size: 0.76rem;
    color: var(--jd-text-muted);
    text-decoration: line-through;
}

/* Sidebar Ringkasan */
.jd-summary-box {
    background: #090d16;
    border: 1px solid var(--jd-card-border);
    border-radius: 12px;
    padding: 16px;
}

.jd-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--jd-text-muted);
    gap: 10px;
}

.jd-summary-row strong {
    color: #ffffff;
    text-align: right;
}

.jd-summary-total {
    border-top: 1px solid var(--jd-card-border);
    padding-top: 12px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 1.05rem;
}

.jd-summary-total strong {
    color: var(--jd-accent);
    font-size: 1.2rem;
}

.jd-error-msg {
    color: var(--jd-danger);
    font-size: 0.85rem;
    margin: 10px 0;
    min-height: 18px;
}

.jd-btn-wa {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.jd-btn-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.45);
}

.jd-safe-note {
    display: block;
    margin-top: 12px;
    font-size: 0.76rem;
    color: var(--jd-text-muted);
    text-align: center;
    line-height: 1.4;
}

/* =========================================================
   HALAMAN JASA / JOKI
   ========================================================= */
.jd-joki-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.jd-joki-tab {
    padding: 11px 24px;
    background: var(--jd-card-bg);
    border: 1.5px solid var(--jd-card-border);
    border-radius: 999px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.jd-joki-tab:hover,
.jd-joki-tab.active {
    background: linear-gradient(90deg, var(--jd-primary), var(--jd-accent));
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 6px 20px var(--jd-primary-glow);
}

.jd-joki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}

.jd-joki-card {
    background: var(--jd-card-bg);
    border: 1px solid var(--jd-card-border);
    border-radius: var(--jd-radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.jd-joki-card:hover {
    transform: translateY(-5px);
    border-color: var(--jd-accent);
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.5);
}

.jd-joki-cat-tag {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--jd-accent);
    background: rgba(56, 189, 248, 0.14);
    padding: 5px 12px;
    border-radius: 99px;
    margin-bottom: 14px;
    width: fit-content;
}

.jd-joki-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #ffffff;
}

.jd-joki-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--jd-success);
    margin-bottom: 14px;
}

.jd-joki-desc {
    color: var(--jd-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 18px;
}

.jd-joki-features {
    list-style: none;
    padding: 14px 0 0;
    margin: 0 0 24px;
    border-top: 1px solid var(--jd-card-border);
}

.jd-joki-features li {
    font-size: 0.88rem;
    color: #e2e8f0;
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================================
   POPUP IKLAN / PROMO MODAL
   ========================================================= */
.jd-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 8, 15, 0.82);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.jd-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.jd-popup-box {
    position: relative;
    max-width: 460px;
    width: 100%;
    background: #121829;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.jd-popup-overlay.show .jd-popup-box {
    transform: scale(1);
}

.jd-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: background 0.2s ease;
}

.jd-popup-close:hover {
    background: var(--jd-danger);
    border-color: var(--jd-danger);
}

.jd-popup-img-wrap {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: #090d16;
}

.jd-popup-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.jd-popup-content {
    padding: 20px 22px 24px;
}

.jd-popup-content h4 {
    margin: 0 0 8px;
    font-size: 1.18rem;
    color: #ffffff;
}

.jd-popup-content p {
    margin: 0 0 18px;
    font-size: 0.9rem;
    color: var(--jd-text-muted);
}

/* =========================================================
   RESPONSIF UNTUK TABLET & HP (ANTI TABRAKAN)
   ========================================================= */
@media (max-width: 900px) {
    .jd-topup-grid {
        grid-template-columns: 1fr;
    }
    .jd-sticky-card {
        position: static;
    }
    .jd-page-header h1 {
        font-size: 2rem;
    }

    /* Susunan Navbar: Logo Kiri, Login Kanan, Menu UL di Bawah (Bisa Geser) */
    nav {
        position: sticky !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        padding: 12px 18px !important;
        gap: 10px !important;
        min-height: auto !important;
    }

    nav .logo {
        order: 1 !important;
    }

    #nav-auth-btn {
        order: 2 !important;
        padding: 9px 18px !important;
        font-size: 0.85rem !important;
    }

    nav ul {
        order: 3 !important;
        width: 100% !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 8px !important;
        padding: 8px 0 4px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
        scrollbar-width: none; /* Sembunyikan scrollbar di Firefox */
        -ms-overflow-style: none;
    }

    nav ul::-webkit-scrollbar {
        display: none; /* Sembunyikan scrollbar di Chrome/Safari/HP */
    }

    nav ul li {
        flex: 0 0 auto !important;
    }

    nav ul li a {
        display: inline-block !important;
        white-space: nowrap !important;
        padding: 7px 12px !important;
        font-size: 0.88rem !important;
    }
}

/* Penyesuaian Khusus Layar HP (Mobile) */
@media (max-width: 560px) {
    /* Perkecil sedikit ukuran Logo & Teks di HP agar tidak sesak */
    nav .logo {
        gap: 8px !important;
    }
    nav .logo img {
        width: 36px !important;
        height: 36px !important;
    }
    nav .logo h2 {
        font-size: 1.15rem !important;
    }

    /* Container & Header Halaman lebih pas di layar HP */
    .jd-container {
        padding: 28px 16px 60px;
    }
    .jd-page-header {
        margin-bottom: 26px;
    }
    .jd-page-header h1 {
        font-size: 1.75rem;
    }
    .jd-page-header p {
        font-size: 0.9rem;
    }

    /* Tab Kategori Joki bisa di-swipe menyamping di HP (nggak numpuk ke bawah) */
    .jd-joki-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        margin-bottom: 24px;
        gap: 10px;
        scrollbar-width: none;
    }
    .jd-joki-tabs::-webkit-scrollbar {
        display: none;
    }
    .jd-joki-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .jd-joki-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .jd-joki-card {
        padding: 20px;
    }
    .jd-joki-title {
        font-size: 1.15rem;
    }
    .jd-joki-price {
        font-size: 1.25rem;
    }

    /* Sekalian merapikan halaman Top Up kalau dibuka di HP (2 Kolom) */
    .jd-category-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .jd-tab-btn {
        min-width: 0;
        padding: 10px 12px;
        gap: 10px;
    }
    .jd-tab-btn img {
        width: 38px;
        height: 38px;
    }
    .jd-tab-title {
        font-size: 0.88rem;
    }
    .jd-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .jd-card-header, .jd-card-body {
        padding: 16px;
    }
}

#bg-particles {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

/* Pastikan seluruh container Top Up, Joki & Footer tampil di atas partikel */
.jd-container,
footer {
    position: relative !important;
    z-index: 1 !important;
}

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #6366f1;          /* Indigo seperti Top Up & Joki */
  --primary-2: #38bdf8;        /* Sky Blue Accent */
  --gold: #f59e0b;             /* Gold untuk Logo & Tombol Auth */
  --primary-soft: rgba(99, 102, 241, 0.16);
  --background: #090d16;       /* Sama persis dengan --jd-bg-main */
  --background-alt: #0f1626;   /* Sama persis dengan --jd-bg-secondary */
  --surface: #151d30;          /* Sama persis dengan --jd-card-bg */
  --surface-2: #1b253d;        /* Sama persis dengan --jd-card-hover */
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.1);
  --border-hover: #38bdf8;
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-primary: 0 8px 25px rgba(99, 102, 241, 0.35);
  --radius: 16px;
  --page-space: clamp(18px, 6vw, 90px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--background);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.14) 0%, transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(56, 189, 248, 0.12) 0%, transparent 35%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  line-height: 1.5;
}
