body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Map container */
#map {
    width: 100%;
    height: 100vh;
    position: fixed;
    background-color: #f0f0f0;
    z-index: 1;
}

/* Ensure map canvas is visible */
#map .ol-viewport {
    width: 100% !important;
    height: 100% !important;
    position: absolute !important;
}

#map canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Floating home button */
.floating-button {
    position: absolute;
    z-index: 1000;
    left: 60px;
    top: 30px;
}

.floating-button .btn {
    background-color: #003a6b;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.floating-button .btn:hover {
    background-color: #1B5886;
    color: white;
    text-decoration: none;
}

/* Map controls panel */
.map-controls {
    position: absolute;
    top: 80px;
    left: 20px;
    z-index: 999;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-width: 280px;
    font-family: Arial, sans-serif;
    border: 1px solid #ddd;
}

.map-controls h3 {
    margin: 0 0 15px 0;
    color: #003a6b;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 2px solid #003a6b;
    padding-bottom: 8px;
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: bold;
}

.layer-control {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 3px 0;
}

.layer-control:hover {
    background-color: #f8f9fa;
    border-radius: 3px;
    padding: 3px 5px;
}

.layer-control input[type="radio"],
.layer-control input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.layer-control label {
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    user-select: none;
}

/* Legend container 
.legend-container {
    position: absolute;
    z-index: 999;
    background-color: white;
    right: 20px;
    bottom: 80px;
    width: 250px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}

.legend-title {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    background-color: #003a6b;
    color: white;
    margin: 0;
    border-radius: 8px 8px 0 0;
}

.legend-content {
    padding: 15px;
}

.legend-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    padding: 3px 0;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 20px;
    height: 15px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-label {
    font-size: 12px;
    color: #333;
    line-height: 1.3;
}
*/
/* Popup styles */
.ol-popup {
    position: absolute;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    bottom: 12px;
    left: -50px;
    min-width: 250px;
    font-family: Arial, sans-serif;
}

.ol-popup:after,
.ol-popup:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    height: 0;
    width: 0;
    position: absolute;
    pointer-events: none;
}

.ol-popup:after {
    border-top-color: white;
    border-width: 10px;
    left: 48px;
    margin-left: -10px;
}

.ol-popup:before {
    border-top-color: #ddd;
    border-width: 11px;
    left: 48px;
    margin-left: -11px;
}

.ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 8px;
    right: 12px;
    color: #999;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.ol-popup-closer:hover {
    color: #333;
}

.ol-popup h4 {
    margin: 0 0 10px 0;
    color: #003a6b;
    font-size: 16px;
}

.ol-popup p {
    margin: 0 0 8px 0;
    font-size: 13px;
    line-height: 1.4;
}

.ol-popup p:last-child {
    margin-bottom: 0;
}

/* Custom OpenLayers control styling */
.ol-control {
    background-color: rgba(255,255,255,0.8);
    border-radius: 4px;
    padding: 2px;
}

.ol-control:hover {
    background-color: rgba(255,255,255,0.9);
}

.ol-scale-line {
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    margin: 8px;
    padding: 2px 8px;
    color: white;
    font-size: 12px;
}

.ol-mouse-position {
    top: 8px;
    right: 8px;
    position: absolute;
    background: rgba(255,255,255,0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .map-controls {
        top: 70px;
        left: 10px;
        right: 10px;
        max-width: none;
        width: auto;
    }
    
    .legend-container {
        right: 10px;
        bottom: 10px;
        left: 10px;
        width: auto;
    }
    
    .floating-button {
        left: 10px;
        top: 10px;
    }
    
    .floating-button .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .map-controls {
        padding: 15px;
    }
    
    .legend-container {
        bottom: 20px;
    }
    
    .ol-popup {
        min-width: 200px;
        font-size: 12px;
    }
    
    .control-group h4 {
        font-size: 13px;
    }
    
    .layer-control label {
        font-size: 12px;
    }
}

/* Additional styling for better UX */
.map-controls,
.legend-container {
    transition: opacity 0.3s ease;
}

.map-controls:hover,
.legend-container:hover {
    opacity: 1;
}

/* Loading indicator */
.ol-viewport-loading {
    cursor: wait;
}

/* Attribution styling */
.ol-attribution {
    background: rgba(255,255,255,0.8);
    border-radius: 4px 0 0 0;
    transition: opacity 0.3s;
}

.ol-attribution:hover {
    background: rgba(255,255,255,0.9);
}

.custom-control {
position: absolute;
bottom: 30px;
right: 15px;
background: white;
border: 2px solid cadetblue;
padding: 10px;
}