:root {
    --bg-color: #0b0f19;
    --panel-bg: #131c2e;
    --text-primary: #f8fafc;
    --text-secondary: #d8b372;
    --text-city: #d5e0f0;
    --accent: #38bdf8;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --gold: #d4af37; 
    --blue: #3498db; 
    --danger: #ff4d4d;
    --nav-h: 50px; 
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    margin: 0;
    padding: 0 0 calc(var(--nav-h) + 24px) 0;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header {
    text-align: center;
    margin-top: 16px;
    padding: 0 12px;
}

header h1 {
    font-size: clamp(1.25rem, 4vw, 1.6rem);
    color: var(--gold);
    margin: 0 0 4px 0;
}

.subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    margin: 0 0 12px 0;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ==========================================================================
   4. FOOTER STYLES (DESKTOP DEFAULT)
   ========================================================================== */
footer {
    text-align: center;
    padding: 20px 10px;
    color: #e8bb6b;
    font-size: 0.8rem;
    line-height: 1.2; /* Ditingkatkan dari 1.0 ke 1.2 supaya teks bawah tidak rapat/berlapis pada Safari iOS */
    margin-bottom: -45px; 
    margin-top: auto;     
}

/* ==========================================================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* --- VERSI MOBILE (Skrin 768px dan ke bawah) --- */
@media (max-width: 768px) {
    .main-container {
        gap: 10px !important; 
    }

    footer {
        margin-top: -15px;    
        margin-bottom: 0px;   
        padding: 10px 10px;   
        position: static;     
        top: 0;
    }
}

/* --- VERSI DESKTOP (Skrin 960px dan ke atas) --- */
@media (min-width: 960px) {
    header h1 { font-size: 1.62rem; } /* Skala berasaskan desktop */
    .subtitle { font-size: 0.88rem; }
    .main-container {
        flex-direction: row-reverse; 
        align-items: flex-start;
        justify-content: center;
        max-width: 1200px;
        padding: 0 30px;
        margin-top: 20px;
    }
}

/* =========================================================================
   🌍 INTERFACE FOOTER NAVIGATION BAR - BASELINE PORTAL
   ========================================================================= */
.mobile-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: var(--nav-h, 0px) !important;
    background-color: rgba(15, 23, 42, 0.95) !important; /* Gelap legap premium */
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    justify-content: space-around !important;
    align-items: center !important;
    
    /* 🛠️ AMANAH KUNCI KEDUA: Lebih tinggi dari panel overlay (8000) */
    z-index: 9000 !important; 
    
    padding-bottom: env(safe-area-inset-bottom) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6) !important;
    box-sizing: border-box !important;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #94a3b8;
    cursor: pointer;
    font-weight: 600;
    gap: 4px;
    transition: color 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
}

.nav-item b {
    font-size: 12px; /* Saiz ikon emoji hiasan */
}

/* Keadaan aktif menu yang dipilih */
.nav-item.active-miqat, .nav-item:hover {
    color: var(--theme, #d4af37);
}

@media (min-width: 960px) {
    .main-container {
        flex-direction: row-reverse;
        align-items: flex-start;
        justify-content: center;
        max-width: 1200px;
        margin-top: 24px;
    }
}

/* Sembunyikan elemen pada skrin peranti mudah alih (lebar skrin kurang dari 768px) */
@media screen and (max-width: 767px) {
    .sorok-mobile {
        display: none !important;
    }
}