:root {
    --blue-light: #8FD3F4;
    --blue: #2E86C1;
    --blue-dark: #1B4F72;
    --orange-light: #FDD98B;
    --orange: #F5A623;
    --orange-dark: #E67E22;

    --text-dark: #2C3E50;
    --text-muted: #5D6D7E;

    --bg-start: #EAF6FB;
    --bg-end: #FFF7E8;

    --surface: #FFFFFF;
    --surface-alt: #F9FBFD;
    --border-color: #DDE3EA;
    --header-bg: rgba(255, 255, 255, 0.75);
    --tab-bg: #EEF3F8;

    --card-shadow: 0 2px 10px rgba(44, 62, 80, 0.08);
    --card-shadow-hover: 0 8px 20px rgba(44, 62, 80, 0.14);
    --modal-overlay: rgba(27, 40, 56, 0.5);
}

[data-theme="dark"] {
    --text-dark: #F1EEFB;
    --text-muted: #A79FD1;

    --bg-start: #0B0F2A;
    --bg-end: #1B1440;

    --surface: #171337;
    --surface-alt: #241C4D;
    --border-color: #322A5C;
    --header-bg: rgba(23, 19, 55, 0.85);
    --tab-bg: #241C4D;

    --card-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    --card-shadow-hover: 0 8px 22px rgba(0, 0, 0, 0.6);
    --modal-overlay: rgba(5, 4, 20, 0.65);
}

* { box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }

body {
    margin: 0;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    background-attachment: fixed;
    min-height: 100vh;
    transition: background 0.2s ease, color 0.2s ease;
}

header {
    background: var(--header-bg);
    backdrop-filter: blur(6px);
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.08);
}

nav { display: flex; justify-content: center; gap: 10px; }

.tab-btn {
    background: var(--tab-bg);
    color: var(--text-muted);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tab-icon { width: 16px; height: 16px; flex-shrink: 0; }
.tab-btn.active {
    background: linear-gradient(135deg, var(--blue), var(--orange));
    color: #fff;
}

main { 
    max-width: 1200px; /* Dilebarkan dari 900px menjadi 1200px */
    margin: 0 auto; 
    padding: 20px; 
}
.tab-content { display: none; }
.tab-content.active { display: block; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }

.card {
    background: var(--surface);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: 0.15s;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
    border-color: var(--orange-light);
}
.card .price { color: var(--orange-dark); font-weight: bold; margin-top: 8px; }

.modal { display: none; position: fixed; inset: 0; background: var(--modal-overlay); align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); padding: 24px; border-radius: 12px; width: 90%; max-width: 380px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }
.modal-box h3 { color: var(--text-dark); }
.modal-box input, .modal-box textarea {
    width: 100%;
    padding: 10px;
    margin: 6px 0;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--surface-alt);
    color: var(--text-dark);
}
.modal-box button { width: 100%; padding: 10px; margin-top: 8px; border-radius: 6px; border: none; cursor: pointer; font-weight: bold; }
.modal-box button:first-of-type {
    background: linear-gradient(135deg, var(--blue), var(--orange));
    color: #fff;
}
.modal-box .close { background: var(--tab-bg); color: var(--text-muted); }
.modal-box .price { color: var(--orange-dark); font-weight: bold; }

.status-box {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface);
    color: var(--text-dark);
    padding: 14px 18px;
    border-radius: 8px;
    box-shadow: var(--card-shadow-hover);
}

.game-name {
    font-size: 18px;
    font-weight: bold;
    padding: 10px 0;
}

.back-btn {
    background: none;
    border: none;
    color: var(--blue);
    cursor: pointer;
    margin-bottom: 12px;
    font-size: 14px;
    padding: 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    grid-column: 1 / -1;
}
.breadcrumb-nav a {
    color: var(--blue);
    text-decoration: none;
    font-weight: bold;
}
.breadcrumb-nav a:hover {
    text-decoration: underline;
    color: var(--orange-dark);
}
.breadcrumb-sep {
    color: var(--border-color);
}
.breadcrumb-current {
    color: var(--text-muted);
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none !important;
}
.back-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.game-nav {
    display: block;
}
.game-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.game-link:hover .game-name {
    color: var(--orange-dark);
}
.game-nav .game-name {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 0;
}
.game-icon { width: 100%; max-width: 100px; height: 100px; object-fit: contain; margin-bottom: 8px; cursor: pointer; }

/* ============================== */
/* HALAMAN DETAIL GAME (Step 1 & 2) */
/* ============================== */

.game-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
    grid-column: 1 / -1;
}
.game-hero-icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--tab-bg);
}
.game-hero-icon img { width: 100%; height: 100%; object-fit: cover; }
.game-hero-info h3 { margin: 0 0 4px; font-size: 18px; }
.game-hero-sub { margin: 0 0 10px; color: var(--text-muted); font-size: 13px; }

.trust-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}
.trust-badge svg { width: 14px; height: 14px; color: var(--orange-dark); flex-shrink: 0; }

.step-section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    margin-bottom: 18px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    grid-column: 1 / -1;
}
.step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--tab-bg);
    font-weight: bold;
    font-size: 14.5px;
    border-bottom: 1px solid var(--border-color);
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--orange));
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}
.step-body {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    flex-wrap: wrap;
}
.field { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.field input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-alt);
    color: var(--text-dark);
    font-size: 14px;
}

.price-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 18px;
}
.price-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    transition: 0.15s;
}
.price-card:hover {
    border-color: var(--orange-light);
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}
.price-card-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    color: var(--blue);
}
.price-card-icon svg { width: 100%; height: 100%; }
.price-card-info { flex: 1; min-width: 0; }
.price-card-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.price-card-price { font-size: 12.5px; color: var(--orange-dark); font-weight: bold; margin-top: 2px; }
.price-card-btn {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--blue), var(--orange));
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: bold;
    cursor: pointer;
    pointer-events: none;
}
.price-card.selected {
    border-color: var(--orange);
    background: var(--surface);
    box-shadow: 0 0 0 2px var(--orange-light) inset;
}
.price-card.selected .price-card-btn { background: var(--orange-dark); }

/* ============================== */
/* PILIH PEMBAYARAN (accordion) */
/* ============================== */

.payment-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    width: 100%;
}
.payment-category {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-alt);
    overflow: hidden;
}
.payment-category.selected { border-color: var(--orange); }
.payment-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: transparent;
    border: none;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    text-align: left;
}
.payment-header .chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.payment-category.open .payment-header .chevron { transform: rotate(180deg); }
.payment-options {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, padding 0.2s ease;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 14px;
}
.payment-category.open .payment-options {
    max-height: 200px;
    padding: 0 14px 14px;
}
.payment-chip {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* ============================== */
/* DETAIL KONTAK & KODE PROMO */
/* ============================== */

.contact-note {
    flex-basis: 100%;
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}
.promo-row {
    display: flex;
    gap: 10px;
    width: 100%;
}
.promo-row input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-alt);
    color: var(--text-dark);
    font-size: 14px;
}
.promo-btn {
    flex-shrink: 0;
    background: var(--tab-bg);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 8px;
    padding: 0 18px;
    font-weight: bold;
    cursor: pointer;
}

.checkout-btn {
    display: block;
    width: 100%;
    padding: 16px;
    margin-top: 4px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--orange));
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    grid-column: 1 / -1;
}
.checkout-btn:hover { opacity: 0.92; }

/* ============================== */
/* POPULER SEKARANG */
/* ============================== */

.popular-section {
    grid-column: 1 / -1;
    margin-bottom: 26px;
}
.popular-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    font-size: 17px;
}
.popular-title svg { width: 20px; height: 20px; color: var(--orange); flex-shrink: 0; }
.popular-sub {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 13px;
}
.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Diperbesar dari 240px */
    gap: 16px;
}
.popular-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: var(--card-shadow);
    transition: transform 0.15s ease;
}
.popular-card:hover { transform: translateY(-2px); }
.popular-card img {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.popular-card-name { font-weight: bold; font-size: 14.5px; }
.popular-card-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }

/* ============================== */
/* GRID GAME - GAYA POSTER */
/* ============================== */

.poster-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); /* Diperbesar dari 130px ke 170px */
    gap: 16px; /* Jarak antar card dilebarkan sedikit */
}

.poster-card {
    position: relative;
    aspect-ratio: 3 / 4.1; /* Proporsi dibuat sedikit lebih tinggi */
    border-radius: 12px;
    overflow: hidden;
    display: block;
    background: var(--tab-bg);
    box-shadow: var(--card-shadow);
    border: 2px solid transparent; 
    transition: all 0.25s ease; 
}

/* Pertahankan efek animasi menyala yang tadi sudah ditambahkan */
.poster-card:hover { 
    transform: translateY(-4px) scale(1.03); 
    box-shadow: 0 12px 24px rgba(0,0,0,0.3); 
    border-color: #d4af37; 
}

.poster-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease; 
}

.poster-card:hover img {
    transform: scale(1.08); 
}

.poster-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.05) 55%);
}

.poster-card-name {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1;
    color: #fff;
    font-weight: 800; /* Font nama game lebih tebal */
    font-size: 14.5px; /* Huruf sedikit lebih besar */
    line-height: 1.25;
}

/* Brand / Logo */
.header-top { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; text-decoration: none; }
.site-logo { height: 52px; width: auto; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.brand-name {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.brand-tagline { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.search-container { flex-grow: 1; position: relative; max-width: 700px; }
.search-container input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-dark);
    font-size: 15px;
}
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: flex; }
.search-icon svg { width: 16px; height: 16px; }

.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--card-shadow-hover);
    max-height: 380px;
    overflow-y: auto;
    padding: 6px;
    z-index: 50;
}
.search-dropdown.open { display: block; }

.search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    cursor: pointer;
}
.search-row:hover { background: var(--tab-bg); }
.search-row img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--tab-bg);
}
.search-row-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--tab-bg);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.search-row-icon svg { width: 18px; height: 18px; }
.search-row-text { min-width: 0; }
.search-row-name {
    font-weight: bold;
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-row-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.search-row-empty { padding: 18px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Switch geser mode terang/gelap */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
    flex-shrink: 0;
    cursor: pointer;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.switch-track {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    border-radius: 999px;
    transition: background 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
}
.theme-switch input:checked ~ .switch-track {
    background: linear-gradient(135deg, #241C4D, #0B0F2A);
}
.switch-icon {
    font-size: 12px;
    line-height: 1;
    color: #fff;
    z-index: 1;
    pointer-events: none;
    display: flex;
}
.switch-icon svg { width: 13px; height: 13px; }
.switch-ball {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.25s ease;
}
.theme-switch input:checked ~ .switch-ball {
    transform: translateX(26px);
}

/* Menu Navigasi Bawah Header */
.sub-nav { display: flex; gap: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 0; }
.sub-nav .tab-btn { background: transparent; color: var(--text-muted); padding: 10px 15px; font-size: 16px; border-radius: 0; }
.sub-nav .tab-btn.active {
    color: var(--orange-dark);
    border-bottom: 2px solid var(--orange);
    font-weight: bold;
    background: transparent;
}

/* Kotak Cek Transaksi */
.cek-transaksi-box { background: var(--surface); padding: 20px; border-radius: 10px; max-width: 500px; box-shadow: var(--card-shadow); }
.cek-transaksi-box input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--surface-alt);
    color: var(--text-dark);
}
.cek-transaksi-box button {
    background: linear-gradient(135deg, var(--blue), var(--orange));
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
    font-weight: bold;
}

/* Gaya Barisan Tombol Filter */
.kategori-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.filter-btn {
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px; /* Mengubah dari 999px menjadi 8px agar lebih kotak */
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-btn:hover {
    border-color: var(--orange-light);
    color: var(--orange-dark);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--blue), var(--orange));
    color: #fff;
    border: 1px solid transparent;
}

/* ============================== */
/* BANNER HUBUNGI KAMI */
/* ============================== */

.contact-banner {
    margin: 40px 0 0; /* Menghilangkan margin kiri dan kanan */
}
.contact-banner-img {
    display: block;
    width: 100%;
    max-width: none; /* Menghilangkan batasan lebar maksimal */
    margin: 0;
    border-radius: 0; /* Menghilangkan sudut melengkung agar pas menyentuh ujung layar */
    box-shadow: var(--card-shadow-hover);
}

@media (max-width: 600px) {
    .contact-banner {
        margin: 28px 0 0; /* Menghilangkan margin kiri dan kanan di tampilan HP */
    }
    .contact-banner-img {
        border-radius: 0;
    }
}

/* ============================== */
/* FOOTER */
/* ============================== */

.site-footer {
    margin-top: 60px;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 48px 20px 0;
}

.footer-top {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}

.footer-brand { max-width: 340px; }

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    margin-bottom: 12px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--tab-bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.2s ease;
}
.social-icon svg { width: 17px; height: 17px; }
.social-icon:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--orange));
}

.footer-col h4 {
    color: var(--orange-dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 14px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
}
.footer-col a:hover {
    color: var(--blue);
}

.footer-bottom {
    max-width: 1100px;
    margin: 40px auto 0;
    padding: 18px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 12.5px;
}

@media (max-width: 720px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
    .footer-brand {
        grid-column: 1 / -1;
        max-width: none;
    }
}

/* ============================== */
/* RESPONSIVE - TAMPILAN HP */
/* ============================== */

@media (max-width: 600px) {

    header { padding: 14px; }

    .header-top {
        gap: 10px;
        margin-bottom: 14px;
        justify-content: space-between;
    }
    .brand { order: 1; gap: 8px; }
    .theme-switch { order: 2; }
    .search-container { order: 3; flex-basis: 100%; max-width: none; }

    .site-logo { height: 38px; }
    .brand { min-width: 0; }
    .brand-text { min-width: 0; }
    .brand-name { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }
    .brand-tagline { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw; }

    .search-container input { padding: 10px 14px 10px 38px; font-size: 14px; }
    .search-dropdown { max-height: 300px; }
    .search-row img, .search-row-icon { width: 34px; height: 34px; }
    .search-row-name { font-size: 13px; }

    .sub-nav { gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .sub-nav .tab-btn { padding: 8px 10px; font-size: 14px; white-space: nowrap; }

    main { padding: 14px; }

    .kategori-filter { gap: 8px; margin-bottom: 16px; }
    .filter-btn { padding: 9px 14px; font-size: 13px; border-radius: 10px; }

    .grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 10px; }
    .card { padding: 12px; border-radius: 8px; }
    .card .price { font-size: 13px; }

    .game-icon { max-width: 72px; height: 72px; }
    .game-nav .game-name { font-size: 14px; padding: 6px 0; }

    .modal-box { padding: 18px; width: 92%; }
    .modal-box h3 { font-size: 16px; }

    .footer-top { grid-template-columns: 1fr; gap: 24px; }
    .footer-brand { grid-column: auto; }
    .site-footer { padding: 32px 16px 0; margin-top: 40px; }
    .footer-bottom { margin-top: 28px; }

    .status-box {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        text-align: center;
        font-size: 13px;
    }

    .cek-transaksi-box { padding: 16px; }

    .game-hero { padding: 12px; gap: 12px; }
    .game-hero-icon { width: 48px; height: 48px; }
    .game-hero-info h3 { font-size: 15px; }
    .trust-badges { gap: 10px; }
    .trust-badge { font-size: 10.5px; }

    .step-header { padding: 11px 14px; font-size: 13px; }
    .step-body { padding: 12px 14px; gap: 10px; }
    .field input { padding: 9px 10px; font-size: 13px; }

    .price-grid { grid-template-columns: repeat(2, 1fr); padding: 12px 14px; gap: 8px; }
    .price-card { padding: 8px; flex-wrap: wrap; }
    .price-card-icon { width: 24px; height: 24px; }
    .price-card-name { font-size: 12px; white-space: normal; }
    .price-card-price { font-size: 11px; }
    .price-card-btn { padding: 5px 9px; font-size: 11px; }

    .popular-title { font-size: 15px; }
    .popular-sub { font-size: 12px; }
    .popular-grid { grid-template-columns: 1fr; gap: 10px; }
    .popular-card { padding: 11px; }
    .popular-card img { width: 38px; height: 38px; }
    .popular-card-name { font-size: 13px; }

    .poster-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .poster-card-name { font-size: 11px; left: 7px; right: 7px; bottom: 7px; }
}

/* Ekstra kecil (HP layar sempit, ~360px ke bawah) */
@media (max-width: 380px) {
    .poster-grid { grid-template-columns: repeat(2, 1fr); }
    .price-grid { grid-template-columns: 1fr; }
    .price-card-btn { display: none; }
    .step-body { flex-direction: column; }
    .field { min-width: 0; width: 100%; }
}