body {
    font-family: 'Inter', sans-serif;
    overscroll-behavior-y: contain;
}

#map {
    height: calc(100vh - 64px);
    width: 100%;
    z-index: 10;
}

.sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 20;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 0 16px 16px 0;
}

.sidebar.active {
    transform: translateX(0);
}

.modal {
    backdrop-filter: blur(8px);
    z-index: 50;
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.location-dot {
    width: 20px;
    height: 20px;
    background-color: #0ea5e9;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.fade-in {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.header {
    z-index: 30;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}

.popup {
    z-index: 40;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.swipe-indicator {
    width: 40px;
    height: 5px;
    background-color: #e2e8f0;
    border-radius: 10px;
    margin: 0 auto;
}

.onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #cbd5e0;
    transition: all 0.3s ease;
}

.onboarding-dot.active {
    background-color: #0ea5e9;
    width: 12px;
    height: 12px;
}

.dark-mode {
    background-color: #1a1a1a;
    color: #fff;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0ea5e9;
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.light-card {
    transition: all 0.2s ease;
    border-radius: 12px;
    border-left: 4px solid transparent;
}

.light-card:hover {
    transform: translateY(-2px);
}

.light-card.active {
    border-left-color: #0ea5e9;
}

.draggable-modal {
    touch-action: none;
    user-select: none;
}

.modal-overlay {
    transition: opacity 0.3s ease;
}

.modal-body {
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.modal-body.slide-down {
    transform: translateY(100%);
}

.mapboxgl-ctrl-logo {
    display: none !important;
}

.mapboxgl-ctrl-bottom-right {
    bottom: 10px;
    right: 10px;
}

.mapboxgl-ctrl-geocoder {
    min-width: 100%;
    width: 100%;
    max-width: none;
    box-shadow: none !important;
    font-family: 'Inter', sans-serif;
}

.mapboxgl-ctrl-geocoder--input {
    font-family: 'Inter', sans-serif;
    height: 40px;
}

.mapboxgl-ctrl-geocoder--icon {
    top: 10px;
}

.mapboxgl-ctrl-geocoder--button {
    top: 6px;
}

.mapboxgl-popup {
    max-width: none !important;
}

.mapboxgl-popup-content {
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
}

.travel-type-btn.active {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

.route-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.route-red {
    background-color: #ef4444;
}

.route-green {
    background-color: #10b981;
}

.route-amber {
    background-color: #f59e0b;
}

@media (display-mode: standalone) {
    .header {
        padding-top: env(safe-area-inset-top);
        height: calc(64px + env(safe-area-inset-top));
    }
    #map {
        height: calc(100vh - 64px - env(safe-area-inset-top));
    }
    .sidebar {
        top: calc(64px + env(safe-area-inset-top));
        height: calc(100vh - 64px - env(safe-area-inset-top));
    }
    .modal {
        padding-top: env(safe-area-inset-top);
    }
}