/* --- 1. VARIABEL & RESET --- */
:root {
    --gold-primary: #D4AF37;
    --gold-dark: #B8860B;
    --silver-dark: #A9A9A9;
    --copper: #B87333;
    --dark-bg: #1A1A1A;
    --white: #ffffff;
    --light-gray: #f8f8f8;
    --text-main: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--light-gray);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    /* Tambahkan ini agar aman di semua device */
    min-height: 100vh; 
}

/* --- 2. NAVBAR DESKTOP --- */
.navbar {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 9999; /* Tingkatkan z-index */
    border-bottom: 3px solid var(--gold-primary);
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column; 
    align-items: center;    
    justify-content: center;
}

.logo { 
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-decoration: none;
    margin-top: 10px;
}

.logo-img { 
    height: 100px; 
    width: auto; 
    object-fit: contain; 
}

.navbar ul { 
    list-style: none; 
    display: flex; 
    justify-content: center; 
    align-items: center;
    gap: 25px; 
    margin: 0; 
    padding: 15px 0;
}

.navbar ul li a { 
    text-decoration: none; 
    color: #333; 
    font-weight: 700; 
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: 0.3s;
}

.navbar ul li a:hover {
    color: var(--gold-primary);
}

/* --- 3. HERO & CONTENT --- */
.hero { 
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%); 
    color: white; 
    padding: 40px 5%;
    text-align: center;
    border-bottom: 5px solid var(--gold-dark);
}

.hero h1 { 
    font-size: 2rem; 
    color: var(--gold-primary); 
    letter-spacing: 2px; 
    text-transform: uppercase;
}

/* --- 4. GRID SYSTEM --- */
.grid-container { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 20px auto;
    padding: 0 20px;
    max-width: 1200px;
}

.card { 
    background: white; 
    padding: 20px; 
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    border-bottom: 4px solid var(--gold-primary);
    display: flex;
    flex-direction: column;
}

/* --- 5. RESPONSIVE (MOBILE FIX) --- */

@media (max-width: 768px) {
    body { 
        padding-bottom: 80px !important; /* Ruang agar kartu poin tidak tertutup menu bawah */
    }

    /* Perbaikan Navbar Bawah */
    .navbar {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0;
        width: 100%;
        height: 70px !important;
        background: #fff !important;
        z-index: 1000 !important; /* Di bawah loading screen */
        border-top: 3px solid var(--gold-primary) !important;
        border-bottom: none !important;
    }

    /* Paksa Kontainer Navigasi agar horizontal */
    .nav-container {
        flex-direction: row !important;
        height: 100% !important;
        padding: 0 !important;
    }

    .navbar ul {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        width: 100% !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    .logo, .logo-img, .hero-mini {
        /* Hapus hero-mini dari sini jika ingin tetap muncul di HP */
    }

    /* Pastikan Modal Login dan Loading tetap di depan */
    #loginOverlay, #loadingScreen {
        z-index: 99999 !important;
    }
}

    .navbar ul li { 
        flex: 1 !important; 
        height: 100% !important; 
    }

    .navbar ul li a {
        font-size: 0.7rem !important;
        height: 100% !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .grid-container { 
        grid-template-columns: repeat(2, 1fr); 
    }

    .market-grid { 
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 480px) {
    .navbar ul li a { 
        font-size: 0.6rem !important; 
    }
    .grid-container { 
        grid-template-columns: 1fr; 
    }
    .hero h1 { 
        font-size: 1.3rem; 
    }
}