/* home.css - Jebz Topup v3 clean */
:root {
    --bg: #0a0a0a;
    --bg-2: #0f0f0f;
    --bg-3: #141414;
    --surface: #1a1a1a;
    --surface-2: #222;
    --border: #282828;
    --text: #fafafa;
    --text-dim: #a3a3a3;
    --text-muted: #6b6b6b;
    --accent: #fbbf24;
    --accent-2: #f59e0b;
    --accent-glow: rgba(251,191,36,0.25);
    --success: #22c55e;
    --danger: #ef4444;
    --radius: 12px;
    --radius-sm: 8px;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ============ HEADER ============ */
.site-header {
    background: rgba(10,10,10,0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 12px;
}
.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    clip-path: polygon(0 0, 100% 0, 100% 40%, 50% 100%, 0 40%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #000;
    font-size: 16px;
    transform: rotate(-8deg);
    box-shadow: 0 3px 10px var(--accent-glow);
}
.header-actions { display: flex; gap: 6px; align-items: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #000;
    box-shadow: 0 3px 12px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ============ HERO ============ */
.hero {
    padding: 32px 0 40px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(251,191,36,0.12) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(50px);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 32px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.3);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}
.hero-title {
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -1.2px;
    font-weight: 900;
    margin-bottom: 12px;
}
.hero-title > span {
    background: linear-gradient(135deg, var(--accent), #fcd34d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-sub {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 20px;
    max-width: 460px;
}
.hero-search { position: relative; max-width: 460px; margin-bottom: 16px; }
.hero-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.hero-search input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
}
.hero-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.hero-search input::placeholder { color: var(--text-muted); }

.hero-trust { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
}
.trust-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(34,197,94,0.6);
}

.hero-banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}
.banner-slider { position: absolute; inset: 0; }
.banner-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.banner-slide.active { opacity: 1; }
.banner-slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}
.dot.active { background: var(--accent); width: 20px; border-radius: 3px; }

/* ============ FEATURES ============ */
.features {
    padding: 20px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
}
.features-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: all 0.2s;
}
.feature:hover { border-color: var(--accent); }
.feature-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    flex-shrink: 0;
}
.feature div > strong { display: block; font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.feature div > span { font-size: 11px; color: var(--text-muted); }

/* ============ SECTION ============ */
.section { padding: 32px 0; }
.section-dark { background: var(--bg-2); }
.section-head { margin-bottom: 20px; }
.section-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.6px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-title .emoji-fire { font-size: 24px; }
.section-sub { font-size: 13px; color: var(--text-dim); }

/* ============ CAT TABS ============ */
.cat-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-dim);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}
.cat-tab:hover { color: var(--text); }
.cat-tab.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 3px 10px var(--accent-glow);
}

/* ============ GAME GRID (RAPIH!) ============ */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.game-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s;
    position: relative;
}
.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 20px var(--accent-glow);
}

/* COVER UNIFORM 1:1 - KUNCI KERAPIHAN */
.game-cover {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--bg-3), var(--surface));
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.game-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.game-card:hover .game-cover img { transform: scale(1.06); }

/* FALLBACK - initial 2 huruf jadi LOGO kotak */
.cover-fallback {
    width: 60%;
    height: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 900;
    color: #000;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-radius: 16px;
    box-shadow: 0 6px 20px var(--accent-glow);
    letter-spacing: -1px;
}

.game-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #000;
    font-size: 9px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    z-index: 2;
}

.game-info {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    min-height: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.game-name {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.game-cat {
    font-size: 10.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
}

/* ============ POPULAR ROW ============ */
.popular-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}
.popular-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.25s;
    display: block;
}
.popular-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}
.popular-cover {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--bg-3), var(--surface));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.popular-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.popular-cover .cover-fallback {
    width: 50%;
    height: 50%;
    font-size: 32px;
    border-radius: 12px;
}
.popular-info {
    padding: 10px 12px;
    background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(245,158,11,0.05));
    border-top: 2px solid var(--accent);
}
.popular-info .name {
    font-size: 13.5px;
    font-weight: 800;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.popular-info .cat {
    font-size: 10.5px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ JOKI ============ */
.joki-header-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(245,158,11,0.05));
    border: 1px solid rgba(251,191,36,0.2);
    border-radius: var(--radius);
    margin-bottom: 18px;
}
.joki-header-highlight svg { color: var(--accent); flex-shrink: 0; }
.joki-header-highlight strong { color: var(--accent); }
.joki-header-highlight p { font-size: 12.5px; color: var(--text-dim); }

/* ============ EMPTY ============ */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
}
.empty-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.5; }
.empty-state h3 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.empty-state p { font-size: 12px; color: var(--text-muted); }

/* ============ FOOTER ============ */
.site-footer {
    background: #050505;
    border-top: 1px solid var(--border);
    padding: 32px 0 0;
    margin-top: 24px;
}
.footer-intro {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.footer-intro p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 800px;
}
.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-bottom: 24px;
}
.footer-col h4 {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-col a {
    display: block;
    font-size: 12.5px;
    color: var(--text-dim);
    padding: 4px 0;
    transition: all 0.15s;
}
.footer-col a:hover { color: var(--accent); padding-left: 4px; }
.footer-bottom {
    padding: 16px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-bottom p { font-size: 11.5px; color: var(--text-muted); }

/* ============ POPUP ============ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: popup-fade 0.35s ease-out;
}
@keyframes popup-fade { from { opacity: 0; } to { opacity: 1; } }
.popup-modal {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.8), 0 0 50px var(--accent-glow);
    animation: popup-scale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes popup-scale {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s;
    line-height: 1;
    padding: 0 0 3px 0;
}
.popup-close:hover { background: var(--danger); border-color: var(--danger); }
.popup-body { display: block; line-height: 0; }
.popup-body img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.popup-body a { display: block; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 24px; }
    .hero-title { font-size: 30px; }
    .hero-banner { aspect-ratio: 16/10; }
    .features-inner { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

@media (max-width: 640px) {
    .container { padding: 0 12px; }
    .hero { padding: 24px 0 28px; }
    .hero-title { font-size: 26px; letter-spacing: -0.8px; }
    .hero-sub { font-size: 13px; }
    .hero-trust { gap: 10px; }
    .trust-item { font-size: 11px; }
    .section { padding: 26px 0; }
    .section-title { font-size: 18px; }
    .section-sub { font-size: 12px; }

    /* GRID 3 KOLOM DI HP - compact */
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .game-info { padding: 8px 10px; min-height: 50px; }
    .game-name { font-size: 11.5px; }
    .game-cat { font-size: 9.5px; }
    .game-tag { font-size: 8px; padding: 2px 6px; top: 6px; right: 6px; }
    .cover-fallback { font-size: 26px; width: 65%; height: 65%; border-radius: 12px; }

    .popular-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .popular-info { padding: 8px 10px; }
    .popular-info .name { font-size: 12px; }
    .popular-info .cat { font-size: 9.5px; }

    .features-inner { grid-template-columns: 1fr; gap: 8px; }
    .feature { padding: 10px; }
    .feature-icon { width: 32px; height: 32px; }
    .feature div > strong { font-size: 12.5px; }
    .feature div > span { font-size: 10.5px; }

    .footer-cols { grid-template-columns: 1fr; gap: 16px; }

    .cat-tab { padding: 7px 14px; font-size: 12px; }
    .joki-header-highlight { padding: 10px 12px; }
    .joki-header-highlight p { font-size: 11.5px; }

    .popup-modal { max-width: 90vw; }
}

@media (max-width: 380px) {
    .game-grid { grid-template-columns: repeat(2, 1fr); }
}