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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    overflow: hidden;
    scroll-behavior: smooth;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.coffee-link {
    position: absolute;
    top: 20px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
}

.coffee-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.controls {
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
}

.autocomplete-dropdown.show {
    display: block;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f5;
    transition: background 0.2s;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item-name {
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.autocomplete-item-address {
    font-size: 13px;
    color: #6c757d;
}

.autocomplete-loading {
    padding: 12px 15px;
    text-align: center;
    color: #667eea;
    font-size: 14px;
}

.autocomplete-no-results {
    padding: 12px 15px;
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.filter-btn:hover {
    border-color: #667eea;
}

.checkbox-label {
    font-weight: 500;
    color: #495057;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.main-content {
    display: flex;
    height: calc(100vh - 300px);
    min-height: 500px;
}

.sidebar {
    width: 400px;
    overflow-y: auto;
    border-right: 2px solid #e9ecef;
    background: #f8f9fa;
}

.map-container {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.restroom-card {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    margin: 10px;
    border-radius: 10px;
    position: relative;
}

.restroom-card:hover {
    background: #f1f3f5;
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.restroom-name {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
    padding-right: 30px;
}

.restroom-info {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.status-operational {
    background: #d4edda;
    color: #155724;
}

.status-not-operational {
    background: #f8d7da;
    color: #721c24;
}

.status-construction {
    background: #fff3cd;
    color: #856404;
}

.source-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
    margin-left: 8px;
}

.source-nyc {
    background: #e3f2fd;
    color: #1565c0;
}

.source-refuge {
    background: #f3e5f5;
    color: #6a1b9a;
}

.source-kml {
    background: #fff3e0;
    color: #e65100;
}

.distance {
    font-weight: 700;
    color: #667eea;
    font-size: 16px;
}

.navigate-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.navigate-btn:hover {
    background: #3367d6;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.no-results {
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

.stats {
    padding: 15px 30px;
    background: white;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 18px;
}

.mobile-view-toggle {
    display: none;
    background: #f8f9fa;
    padding: 15px;
    gap: 10px;
    justify-content: center;
    border-bottom: 2px solid #e9ecef;
}

.mobile-toggle-btn {
    flex: 1;
    max-width: 200px;
    padding: 12px 20px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-toggle-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.mobile-toggle-btn:hover {
    border-color: #667eea;
}

@media (max-width: 768px) {
    .mobile-view-toggle {
        display: flex;
    }

    .main-content {
        flex-direction: column;
        height: calc(100vh - 420px);
    }
    
    .sidebar {
        width: 100%;
        height: 100%;
        display: none;
    }

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

    .map-container {
        width: 100%;
        height: 100%;
        display: none;
    }

    .map-container.mobile-active {
        display: block;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }

    .coffee-link {
        position: static;
        margin-top: 10px;
        display: inline-flex;
    }

    .stats {
        gap: 10px;
    }

    .stat-item {
        flex: 0 0 calc(50% - 10px);
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 12px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 0.95em;
    }
}

.leaflet-popup-content {
    margin: 15px;
    min-width: 200px;
}

.popup-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #212529;
}

.popup-info {
    font-size: 13px;
    margin-bottom: 5px;
    color: #495057;
}

.popup-navigate {
    margin-top: 10px;
    padding: 8px 16px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
}

.popup-navigate:hover {
    background: #3367d6;
}

