:root {
    --primary: #c06f8e;
    --primary-hover: #a05a76;
    --bg-dark: #ffffff;
    --card-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    --text-main: #121216;
    --text-muted: #4e5061;
    --accent: #c06f8e;
    --error: #ef4444;
    --font-sans: 'Roboto', 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    overflow-x: hidden;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
}

.container {
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    padding: 2rem;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
}

button {
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(192, 111, 142, 0.4);
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Geocoder Customization */
.leaflet-control-geocoder {
    background: white !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 0.5rem !important;
    color: var(--text-main) !important;
}

.leaflet-control-geocoder-icon {
    filter: none;
}

.leaflet-control-geocoder-form input {
    background: transparent !important;
    color: var(--text-main) !important;
    padding: 0.5rem !important;
}

.leaflet-control-geocoder-results {
    background: white !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
}

.leaflet-control-geocoder-results li:hover {
    background: var(--primary) !important;
}

/* Search and Saved List Hover Effects */
.search-result-item:hover {
    background-color: rgba(192, 111, 142, 0.05) !important;
    color: var(--primary);
}

.saved-route-item {
    transition: var(--transition-smooth);
}

.saved-route-item:hover {
    border-color: var(--primary) !important;
    transform: translateX(5px);
    background: white !important;
}

.saved-route-item span {
    transition: color 0.3s ease;
}

.saved-route-item:hover span:first-child {
    color: var(--primary);
}

/* Hide redundant Leaflet controls in top right */
.leaflet-top.leaflet-right {
    display: none !important;
}

/* Style default Leaflet controls to match theme if visible */
.leaflet-bar {
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.75rem !important;
    overflow: hidden;
}

.leaflet-bar a {
    background-color: white !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

.leaflet-bar a:hover {
    background-color: #f8fafc !important;
    color: var(--primary) !important;
}
/* Responsive Mobile Styles */
@media (max-width: 900px) {
    header {
        padding: 1rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    header h1 {
        font-size: 1.2rem !important;
    }
    header nav span {
        display: none;
    }
    
    #app-container {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        position: relative;
    }

    .sidebar-container {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        z-index: 2000;
        background: white;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 1rem;
        box-shadow: 20px 0 50px rgba(0,0,0,0.1);
    }

    .sidebar-container.open {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1999;
        display: none;
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .mobile-sidebar-header {
        display: flex !important;
    }
    .mobile-toggle {
        display: flex !important;
    }

    #map-container {
        border-radius: 0 !important;
    }
}

.mobile-toggle {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    box-shadow: 0 10px 25px rgba(192, 111, 142, 0.4);
    border: none;
}
