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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    overflow: hidden;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

#search-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 350px;
    max-width: calc(100vw - 40px);
}

#search-input {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

#search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-result {
    padding: 12px 15px;
    border-top: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.search-result:hover {
    background: #f5f5f5;
}

.search-result-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.search-result-address {
    font-size: 13px;
    color: #666;
}

#route-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
}

#route-panel h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

#route-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#route-options label {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
}

#route-options input[type="radio"] {
    display: none;
}

#route-options input[type="radio"]:checked + span {
    background: #007bff;
    color: white;
    border-radius: 4px;
    padding: 4px 8px;
}

#route-info {
    margin-bottom: 15px;
    font-size: 14px;
}

#route-info div {
    margin-bottom: 8px;
}

button {
    width: 100%;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 8px;
}

button:hover {
    background: #0056b3;
}

#clear-route {
    background: #dc3545;
}

#clear-route:hover {
    background: #c82333;
}

#start-navigation {
    background: #28a745;
}

#start-navigation:hover {
    background: #218838;
}

.maplibregl-popup-content {
    padding: 15px;
    border-radius: 8px;
}

.maplibregl-popup-close-button {
    font-size: 20px;
    padding: 5px;
}

@media (max-width: 768px) {
    #search-panel, #route-panel {
        width: calc(100vw - 40px);
    }
}
