body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

.info-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 300px;
    opacity: 0.85;
}

.info-panel h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.info-panel-content {
    margin-top: 10px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.info-panel.collapsed .info-panel-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.info-panel p {
    margin: 5px 0;
    font-size: 12px;
    color: #333;
}

.toggle-btn {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.collapsed .toggle-btn {
    transform: rotate(-90deg);
}

.status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status.connected {
    background-color: #4CAF50;
}

.status.disconnected {
    background-color: #f44336;
}

.legend {
    position: absolute;
    bottom: 30px;
    left: 10px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0.9;
}

.legend h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.legend-content {
    margin-top: 10px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

.legend.collapsed .legend-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 15px;
    margin-right: 8px;
    border: 1px solid #ccc;
}

.error-message {
    background: #f44336;
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
}

.raster-overlay {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}
