:root {
    --bg-dark: #090a0f;
    --glass-bg: rgba(15, 16, 25, 0.55);
    --glass-border: rgba(176, 38, 255, 0.2);
    --neon-purple: #b026ff;
    --neon-blue: #00d2ff;
    --text-main: #ffffff;
    --text-dim: #a3a4b5;
    --radius-lg: 20px;
    --radius-full: 999px;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --aurora: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-blue) 100%);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, sans-serif; }
body { background: var(--bg-dark); color: var(--text-main); overflow: hidden; }

/* 🗺 Map Container (90%+ Screen) */
#map-container { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1; }

/* 🔮 Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
    border-radius: var(--radius-lg);
}

.aurora-bg { background: var(--aurora); border: none; }

/* 📱 Header Fix Mobile & Desktop */
header {
    position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
    width: 95%; max-width: 1200px; min-height: 64px; height: auto; z-index: 1000;
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; 
    padding: 12px 15px; gap: 12px;
}
.logo-area { display: flex; align-items: center; gap: 8px; font-weight: 800; }

.neon-text {
    font-size: clamp(1.1rem, 4vw, 1.4rem); /* Mengecil otomatis di HP */
    white-space: nowrap; /* Mencegah teks turun ke baris baru */
    background: var(--aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(176, 38, 255, 0.3);
}

/* Kotak Pencarian Turun ke Bawah di HP */
.search-box { 
    flex: 1 1 100%; /* Memaksa lebar 100% di HP */
    order: 3; /* Memindahkannya ke baris bawah */
    position: relative; margin: 0; 
}
.search-box input {
    width: 100%; padding: 12px 40px 12px 20px; border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1); border: 1px solid var(--glass-border);
    color: var(--text-main); outline: none; transition: var(--transition-smooth);
}
.search-box input:focus { border-color: var(--neon-purple); box-shadow: 0 0 15px rgba(176, 38, 255, 0.3); }
.search-icon { 
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%); 
}

/* Tombol Kanan (Settings & Profile) */
.header-actions { display: flex; gap: 15px; align-items: center; order: 2; }
.icon-btn, .profile-btn { 
    background: transparent; border: none; color: white; font-size: 1.2rem; 
    cursor: pointer; transition: transform 0.2s; display: flex;
}
.profile-btn img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* Kalau layarnya lebar (Tablet/Desktop), balikkan ke satu baris */
@media (min-width: 768px) {
    .search-box { flex: 1; max-width: 400px; order: 2; margin: 0 20px; }
    .header-actions { order: 3; }
    header { top: 20px; padding: 0 20px; }
}

/* 🕹 Mode Selector */
.mode-selector {
    position: absolute; top: 100px; left: 50%; transform: translateX(-50%);
    z-index: 1000; display: flex; gap: 5px; padding: 5px; border-radius: var(--radius-full);
}
/* Penyesuaian agar mode selector tidak tertabrak search box di HP */
@media (max-width: 767px) {
    .mode-selector { top: 140px; }
}

.mode-btn {
    padding: 8px 20px; background: transparent; border: none; color: var(--text-dim);
    border-radius: var(--radius-full); cursor: pointer; transition: var(--transition-smooth);
}
.mode-btn.active { background: rgba(255, 255, 255, 0.1); color: var(--text-main); font-weight: bold; }

/* 🔘 Floating Action Button */
.fab-container { position: absolute; bottom: 40px; right: 20px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
.fab-main { width: 56px; height: 56px; border-radius: 50%; color: white; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.fab-main:hover { transform: scale(1.1); }
.fab-menu { display: flex; flex-direction: column; gap: 10px; opacity: 0; pointer-events: none; transform: translateY(20px); transition: var(--transition-smooth); }
.fab-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.fab-item { padding: 10px 15px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); color: white; cursor: pointer; backdrop-filter: blur(10px); }

/* 📉 Bottom Sheet */
.bottom-sheet {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) translateY(110%);
    width: 100%; max-width: 600px; background: var(--glass-bg); border-bottom-left-radius: 0;
    border-bottom-right-radius: 0; padding: 20px; z-index: 1001; transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bottom-sheet.open { transform: translateX(-50%) translateY(0); }
.drag-handle { width: 40px; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; margin: 0 auto 15px; }
.close-sheet { position: absolute; top: 15px; right: 20px; background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; }
.sheet-content { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.data-card { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; }
.data-label { font-size: 0.8rem; color: var(--text-dim); }
.data-value { font-size: 1.1rem; font-weight: bold; }

/* Custom Markers & UI Utils */
.custom-marker { filter: drop-shadow(0 0 5px var(--neon-purple)); transition: transform 0.1s linear; }
#fps-counter { position: absolute; bottom: 20px; left: 20px; z-index: 1000; padding: 5px 10px; font-size: 12px; }

/* 📍 GPS Locator Pulse Animation */
.user-gps-pulse {
    width: 16px;
    height: 16px;
    background: var(--neon-purple);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 12px var(--neon-purple);
    animation: gpsPulse 1.8s infinite ease-out;
}

@keyframes gpsPulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(176, 38, 255, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 12px rgba(176, 38, 255, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(176, 38, 255, 0);
    }
}
