:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-glass: rgba(15, 23, 42, 0.85);
    --border-glass: rgba(255, 255, 255, 0.12);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --accent: #38bdf8;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100vw;
    height: 100vh;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    background-color: #090d16;
    color: var(--text-main);
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
    background: #090d16;
}

/* OpenStreetMap Dark Filter (No API Key Required) */
.leaflet-tile-pane {
    filter: invert(100%) hue-rotate(180deg) brightness(90%) contrast(90%);
}

/* Floating Navigation / Search Header */
.map-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 18px;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
}

.brand-icon {
    color: var(--accent);
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 9px 16px 9px 38px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    outline: none;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.search-box input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    z-index: 1001;
}

.search-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-item:hover {
    background: var(--primary);
}

/* Sidebar Info Card */
.info-panel {
    position: absolute;
    bottom: 25px;
    right: 20px;
    width: 300px;
    z-index: 1000;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 18px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.info-panel.hidden {
    transform: translateY(15px);
    opacity: 0;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.badge {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

/* Custom Tooltip Styling */
.custom-tooltip {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid var(--border-glass) !important;
    color: #fff !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    box-shadow: var(--shadow) !important;
}