:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --danger: #ef4444;
    --source: #10b981;
    /* Green for Start */
    --surface: rgba(255, 255, 255, 0.98);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --text-dark: #1f2937;
    --text-light: #6b7280;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

body,
html {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
    z-index: 1;
    background: #e5e7eb;
}

/* UI Overlays */
.nav-overlay {
    position: absolute;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Top Bar Layout */
.top-bar {
    top: 20px;
    left: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 600px;
    margin: 0 auto;
}

.search-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-container {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    padding: 0 15px;
    position: relative;
    height: 50px;
}

.search-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.search-icon.dest-icon {
    color: var(--danger);
}

.search-icon.source-icon {
    color: var(--source);
}

input[type="text"] {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    outline: none;
    color: var(--text-dark);
}

.icon-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: var(--surface);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 1.4rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-btn.active-mode {
    color: var(--primary);
    background: #eff6ff;
}

/* Results Dropdown */
.results-dropdown {
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-height: 200px;
    overflow-y: auto;
    z-index: 2000;
}

.result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
}

.result-item:hover {
    background: #f9fafb;
}

/* Bottom Panel */
.bottom-panel {
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(110%);
    padding-bottom: 20px;
}

.bottom-panel.active {
    transform: translateY(0);
}

.panel-handle {
    width: 40px;
    height: 5px;
    background: #d1d5db;
    border-radius: 10px;
    margin: 12px auto;
}

.panel-content {
    padding: 0 20px 20px;
}

.location-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.location-thumb-container {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    overflow: hidden;
    background: #eee;
    flex-shrink: 0;
}

.location-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Nav Status */
.nav-status {
    position: absolute;
    top: 140px;
    left: 15px;
    right: 15px;
    background: var(--primary-dark);
    color: white;
    padding: 15px;
    border-radius: 16px;
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.danger-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* MAP MARKERS */
.user-marker-icon {
    background: #2563eb;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
    width: 20px !important;
    height: 20px !important;
}

.checkpoint-marker {
    background: #ef4444;
    /* RED CHECKPOINT */
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.start-marker {
    color: #10b981;
    font-size: 32px;
    margin-top: -32px;
}