/* --- GLOBAL RESET & VARIABLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rajdhani', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-color: #090b11;
    --surface-color: rgba(20, 24, 38, 0.75);
    --border-color: rgba(255, 255, 255, 0.07);
    --cyber-blue: #00bcff;
    --cyber-orange: #ff7700;
    --text-main: #ffffff;
    --text-muted: #8596b0;
    --header-height: 65px;
    --nav-height: 65px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    padding-top: calc(var(--header-height) + 15px);
    padding-bottom: calc(var(--nav-height) + 40px);
    background-image: 
        radial-gradient(circle at 5% 15%, rgba(0, 188, 255, 0.04) 0%, transparent 35%),
        radial-gradient(circle at 95% 75%, rgba(255, 119, 0, 0.04) 0%, transparent 35%);
    background-attachment: fixed;
}

/* =======================================================
   LOADING SCREEN (CYBER EQUALIZER BARU)
======================================================= */
#loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #04060a;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.pulse-container {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    height: 50px;
    align-items: center;
}

.pulse-bar {
    width: 6px;
    height: 20px;
    background: linear-gradient(180deg, #00bcff, #ff7700);
    border-radius: 10px;
    animation: cyberWave 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 188, 255, 0.5);
}

.pulse-bar:nth-child(1) { animation-delay: 0.1s; }
.pulse-bar:nth-child(2) { animation-delay: 0.2s; }
.pulse-bar:nth-child(3) { animation-delay: 0.3s; }
.pulse-bar:nth-child(4) { animation-delay: 0.4s; }
.pulse-bar:nth-child(5) { animation-delay: 0.5s; }

@keyframes cyberWave {
    0%, 100% { height: 15px; transform: scaleY(1); filter: brightness(1); }
    50% { height: 45px; transform: scaleY(1.2); filter: brightness(1.5); background: #ffffff; box-shadow: 0 0 20px #00bcff; }
}

.loader-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: glowText 1.5s ease-in-out infinite alternate;
}
.loader-logo span { color: #00bcff; }

@keyframes glowText {
    0% { opacity: 0.7; text-shadow: 0 0 5px rgba(0, 188, 255, 0.3); }
    100% { opacity: 1; text-shadow: 0 0 20px #00bcff, 0 0 30px rgba(0, 188, 255, 0.6); }
}

/* =======================================================
   HEADER (CLEAN, ELEGANT, RAPI & LURUS)
======================================================= */
.glass-header {
    position: fixed;
    top: 0; left: 0; width: 100%; height: var(--header-height);
    background: #0b0f19;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    justify-content: center;
}

.header-container {
    width: 100%; max-width: 800px;
    height: 100%;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

/* Logo Vionix - FIX Anti Patah 2 Baris */
.logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.logo .neon-icon {
    font-size: 1.3rem;
    color: var(--cyber-blue);
}
.logo .brand-name {
    color: #fff;
}
.logo .glow-orange {
    color: var(--cyber-orange);
}

/* Header Kanan */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

/* Kotak Pencarian */
.search-box-header {
    position: relative;
    max-width: 220px;
    flex: 1;
}
.search-box-header input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px 8px 32px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
}
.search-box-header input:focus {
    background: rgba(0, 188, 255, 0.05);
    border-color: var(--cyber-blue);
    box-shadow: 0 0 10px rgba(0, 188, 255, 0.2);
}
.search-box-header i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Tombol Profil/Login */
.login-trigger-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 188, 255, 0.08);
    border: 1px solid rgba(0, 188, 255, 0.3);
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.login-trigger-btn:hover {
    background: var(--cyber-blue);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 188, 255, 0.4);
}
#login-status-indicator {
    width: 8px; height: 8px; border-radius: 50%;
    background: #ff3b30; box-shadow: 0 0 6px #ff3b30;
    display: inline-block;
}
.login-trigger-btn img {
    width: 22px; height: 22px; border-radius: 50%;
    object-fit: cover;
}

/* =======================================================
   RESPONSIVE HEADER UNTUK LAYAR HP KECIL
======================================================= */
@media (max-width: 500px) {
    .glass-header {
        height: 60px;
    }
    .header-container {
        gap: 8px;
        padding: 0 10px;
    }
    .logo {
        font-size: 1.1rem;
    }
    .logo .neon-icon {
        font-size: 1.1rem;
    }
    .header-actions {
        gap: 8px;
    }
    .search-box-header {
        max-width: 150px;
    }
    .search-box-header input {
        padding: 7px 10px 7px 28px;
        font-size: 0.8rem;
    }
    .search-box-header i {
        left: 10px;
    }
    .login-trigger-btn {
        padding: 6px 10px;
        border-radius: 12px;
    }
    #login-btn-text {
        display: none;
    }
    #login-status-indicator {
        display: none;
    }
}

/* =======================================================
   FOOTER (RAPID & CLEAN)
======================================================= */
.site-footer { 
    margin: 40px 0 10px 0; 
    padding: 30px 16px 40px 16px; 
    width: 100%; 
    border-top: 1px solid var(--border-color); 
    background: #0b0f19;
    border-radius: 20px 20px 0 0; 
}
.footer-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-brand { font-family: 'Orbitron', sans-serif; font-size: 1.3rem; color: #fff; margin-bottom: 6px; letter-spacing: 1px;}
.footer-tagline { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; }
.footer-social-minimal { display: flex; justify-content: center; gap: 15px; margin-bottom: 20px; }
.footer-social-minimal a { 
    display: flex; align-items: center; justify-content: center; 
    width: 40px; height: 40px; 
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); border-radius: 50%; 
    color: #fff; font-size: 1.1rem; text-decoration: none; transition: all 0.3s; 
}
.footer-social-minimal a:hover { 
    background: var(--cyber-blue); color: #000; border-color: var(--cyber-blue); 
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,188,255,0.4);
}
.footer-bottom-minimal { font-size: 0.75rem; color: rgba(255,255,255,0.4); border-top: 1px solid rgba(255,255,255,0.05); width: 100%; padding-top: 15px; }

/* =======================================================
   BANNER SLIDER AREA (STANDAR LANDSCAPE 16:9 ANTI KEPOTONG)
======================================================= */
.promo-slider {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 25px auto;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 25px rgba(0, 188, 255, 0.15);
    background-color: transparent;
    aspect-ratio: 16 / 9; 
}

.slider-track { display: flex; width: 200%; height: 100%; transition: transform 0.5s ease-in-out; }
.slide { width: 50%; height: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.slide-banner { 
    width: 100%; height: 100%; 
    background-size: contain !important; 
    background-repeat: no-repeat !important;
    background-position: center !important; 
    display: flex; align-items: flex-end; padding: 14px; 
}
.slide-info h4 { font-size: 1.2rem; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

/* =======================================================
   MODAL & ALERTS (TIDAK DIUBAH)
======================================================= */
.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(4, 5, 8, 0.85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 99999 !important; justify-content: center; align-items: center;
}
.glass-card {
    background: var(--surface-color); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color); border-radius: 24px; padding: 24px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.modal-content {
    width: 90%; max-width: 380px; position: relative; animation: popModal 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes popModal {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}
.close-btn {
    background: none; border: none; color: var(--text-muted); font-size: 1.8rem; cursor: pointer; line-height: 1;
}

/* =======================================================
   GRID PACKAGES & LAINNYA (SISTEM INTI 100% TIDAK DIUBAH)
======================================================= */
.game-grid { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 12px !important; margin-bottom: 30px; }
.game-card { background: var(--surface-color); border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1); }
.game-card:hover { transform: translateY(-4px); border-color: var(--cyber-blue); box-shadow: 0 8px 20px rgba(0,188,255,0.15); }
.game-img-wrapper { aspect-ratio: 1 / 1; width: 100%; background: #0d1017; overflow: hidden; }
.game-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.game-card:hover img { transform: scale(1.05); }
.game-info { padding: 8px 4px; text-align: center; }
.game-info h3 { font-size: 0.8rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-populer { position: absolute; top: 6px; right: 6px; background: linear-gradient(135deg, #ff3b30, #ff9500); color: #fff; padding: 2px 6px; font-size: 0.6rem; font-weight: 900; border-radius: 8px; z-index: 10; }

.app-container { max-width: 600px; margin: 0 auto; padding: 0 14px; }
.section-title { margin-top: 25px; margin-bottom: 20px; }
.section-title h2 { font-family: 'Orbitron', sans-serif; font-size: 1.35rem; display: flex; align-items: center; gap: 8px; letter-spacing: 0.5px; }
.section-title p { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--cyber-blue); cursor: pointer; margin-bottom: 14px; font-size: 0.9rem; font-weight: 600; }
.page { display: none; }
.page.active { display: block; animation: pageTransitionIn 0.4s ease forwards; }
@keyframes pageTransitionIn { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: translateY(0); } }

.warning-alert-box { background: rgba(255, 119, 0, 0.08); border: 1px solid rgba(255, 119, 0, 0.25); border-radius: 12px; padding: 12px; display: flex; gap: 10px; margin-bottom: 15px; }
.warning-icon-wrapper { color: var(--cyber-orange); font-size: 1.2rem; }
.warning-text-content h4 { color: var(--cyber-orange); font-size: 0.9rem; font-family: 'Orbitron', sans-serif; }
.warning-text-content p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }

.package-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.package-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); border-radius: 14px; cursor: pointer; transition: all 0.2s; }
.package-item:hover { border-color: var(--cyber-orange); background: rgba(255,119,0,0.04); transform: translateY(-2px); }
.package-title { font-size: 0.95rem; font-weight: 700; }
.package-price { font-size: 0.8rem; color: var(--cyber-orange); font-weight: 700; margin-top: 2px; }
.pkg-icon { font-size: 1.3rem; color: var(--cyber-blue); }

.form-container, .summary-container { padding: 24px 20px; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.form-group label i { color: var(--cyber-blue); margin-right: 4px; }
.form-group input { width: 100%; background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255,255,255,0.1); color: #fff; padding: 14px; border-radius: 10px; font-size: 1rem; transition: all 0.2s; }
.form-group input:focus { border-color: var(--cyber-blue); outline: none; background: rgba(0,188,255,0.02); }

.btn-neon { width: 100%; padding: 14px; border: none; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 1rem; font-family: 'Orbitron', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; color: #fff; transition: all 0.25s; }
.btn-orange { background: linear-gradient(135deg, #ff7a00 0%, #ff5200 100%); box-shadow: 0 4px 15px rgba(255,122,0,0.2); }
.btn-wa { background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important; box-shadow: 0 4px 15px rgba(37,211,102,0.2); display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-neon:hover { transform: translateY(-2px); filter: brightness(1.1); }

.summary-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 0.95rem; }
.summary-item .label { color: rgba(255,255,255,0.5); }
.summary-item .value { font-weight: 600; color: #fff; }
.text-glow-blue { color: var(--cyber-blue); }
.text-glow-orange { color: var(--cyber-orange); }
hr.neon-divider { border: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); margin: 15px 0; }

.total-item { border-top: 1px dashed rgba(255,255,255,0.2); padding-top: 15px; margin-top: 15px; }
.label-total { font-family: 'Orbitron', sans-serif; font-weight: 700; }
.value-total { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; font-weight: 900; color: var(--cyber-orange); text-shadow: 0 0 10px rgba(255,119,0,0.3); }

.payment-method-box { display: flex; align-items: center; background: rgba(37,211,102,0.06); border: 1px solid rgba(37,211,102,0.2); border-radius: 12px; padding: 14px; margin: 20px 0; text-align: left; }
.wa-icon { font-size: 1.8rem; color: #25D366; margin-right: 12px; }
.payment-method-box h4 { font-size: 0.95rem; color: #fff; }
.payment-method-box p { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.btn-promo-claim { background: rgba(255,107,0,0.1); border: 1px solid var(--cyber-orange); color: var(--cyber-orange); padding: 0 16px; border-radius: 8px; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; cursor: pointer; transition: all 0.2s; }
.btn-promo-claim:hover { background: var(--cyber-orange); color: #000; }
.btn-promo-claim:disabled { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.2); cursor: not-allowed; }

.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: var(--cyber-blue); color: #000; padding: 12px 24px; border-radius: 50px; font-weight: 700; font-size: 0.9rem; opacity: 0; pointer-events: none; z-index: 999999; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.toast.show { opacity: 1; top: 85px; pointer-events: auto; }
.toast.sukses { background: var(--cyber-blue); color: #000; }
.toast.gagal { background: #ff3b30; color: #fff; box-shadow: 0 0 15px rgba(255,59,48,0.3); }
.toast.info { background: var(--cyber-orange); color: #fff; }

.empty-state { text-align: center; padding: 40px 0; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; margin-bottom: 10px; opacity: 0.3; }

.history-card { background: var(--surface-color); border: 1px solid var(--border-color); padding: 14px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-details h4 { font-size: 1.05rem; font-weight: 700; }
.history-details p { color: var(--text-muted); font-size: 0.8rem; margin-top: 4px; }
.history-right { text-align: right; }
.history-price { font-weight: 700; color: var(--cyber-orange); }
.history-status-tag { font-size: 0.7rem; padding: 2px 6px; background: rgba(255,119,0,0.1); color: var(--cyber-orange); border: 1px solid rgba(255,119,0,0.2); border-radius: 4px; display: inline-block; margin-top: 6px; font-weight: 700; }

.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; height: var(--nav-height); background: rgba(9, 11, 17, 0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border-color); display: flex; justify-content: space-around; align-items: center; z-index: 999; }
.nav-item { background: none; border: none; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; width: 35%; height: 100%; justify-content: center; }
.nav-item i { font-size: 1.1rem; }
.nav-item span { font-size: 0.8rem; font-weight: 600; }
.nav-item.active { color: var(--cyber-blue); filter: drop-shadow(0 0 4px rgba(0,188,255,0.4)); }

.floating-wa { position: fixed; bottom: 85px; right: 20px; width: 52px; height: 52px; background: linear-gradient(135deg, #25D366, #128C7E); color: #fff !important; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 26px; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); text-decoration: none !important; border: none !important; outline: none !important; z-index: 999; transition: all 0.3s ease; }
.floating-wa:hover { transform: scale(1.08) rotate(5deg); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5); }

@media (min-width: 768px) {
    .app-container { max-width: 750px; }
    .game-grid { grid-template-columns: repeat(4, 1fr) !important; gap: 16px !important; }
    .package-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
