body, html { 
    margin: 0; padding: 0; height: 100%; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: #f4f7f6; color: #333; overflow: hidden; display: flex; flex-direction: column;
}

#p2r-indicator {
    height: 0; width: 100%; background: #e8f6f3; color: #117864; display: flex; align-items: center; 
    justify-content: center; font-size: 14px; font-weight: bold; overflow: hidden; opacity: 0; 
}

#mobile-header {
    display: flex; height: 50px; background: #2c3e50; color: white; align-items: center; 
    padding: 0 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 1002; flex-shrink: 0; width: 100%; box-sizing: border-box;
}
#mobile-header .header-title { font-weight: bold; font-size: 16px; margin-left: 15px; }

.lang-switch { margin-left: auto; display: flex; gap: 8px; font-size: 12px; font-weight: bold; margin-right: 15px; }
.lang-switch a { color: #bdc3c7; text-decoration: none; }
.lang-switch a.active { color: #fff; border-bottom: 2px solid #27ae60; }

.header-logo { height: 32px; width: 32px; border-radius: 50%; object-fit: cover; background-color: white; }

#burger-btn { background: #27ae60; color: white; border: none; padding: 6px 12px; border-radius: 4px; font-size: 18px; cursor: pointer;}

.dashboard { display: flex; flex-grow: 1; width: 100vw; position: relative; min-height: 0; }

.sidebar { 
    position: absolute; left: -100%; top: 0; height: 100%; width: 85%; max-width: 360px; 
    background: #ffffff; box-shadow: 2px 0 15px rgba(0,0,0,0.5); z-index: 2000; padding: 20px; 
    display: flex; flex-direction: column; box-sizing: border-box; overflow-y: auto; transition: left 0.3s ease;
}
.sidebar.open { left: 0; }
#close-btn { display: block; background: none; border: none; font-size: 16px; color: #c0392b; text-align: right; cursor: pointer; margin-bottom: 10px; font-weight: bold; align-self: flex-end; }
.sidebar h1 { display: none; }

.mont-rigi-box { background: #e8f6f3; padding: 14px; border-left: 4px solid #1abc9c; border-radius: 6px; font-size: 12px; color: #117864; margin-bottom: 15px; flex-shrink: 0; }
.mont-rigi-box h3 { margin: 0 0 8px 0; font-size: 15px; color: #0e6251; border-bottom: 1px solid #1abc9c; padding-bottom: 4px;}
.mont-rigi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin-top: 8px; }
.mont-rigi-item { background: rgba(255,255,255,0.6); padding: 5px 8px; border-radius: 4px; border: 1px solid rgba(26,188,156,0.2); }
.mont-rigi-item b { color: #0e6251; font-size: 11px; display: block; margin-bottom: 1px; }

.track-box { background: #fdfefe; border: 1px solid #d5d8dc; padding: 12px; border-radius: 6px; margin-bottom: 15px; flex-shrink: 0; }
.track-box h3 { margin: 0 0 8px 0; font-size: 14px; color: #2c3e50; }
.track-item { display: flex; justify-content: space-between; align-items: center; background: #ecf0f1; padding: 8px; margin-bottom: 6px; border-radius: 4px; font-size: 12px; border-left: 3px solid #3498db; }
.track-btn-group { display: flex; gap: 4px; }
.track-btn { background: #27ae60; color: white; border: none; padding: 5px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: bold; }
.track-btn.del { background: #e74c3c; }

.legend { margin-bottom: 15px; background: #f8f9fa; padding: 12px; border-radius: 8px; border: 1px solid #e9ecef; flex-shrink: 0;}
.legend h3 { margin-top: 0; font-size: 15px; color: #2c3e50; margin-bottom: 10px; }
.legend ul { list-style: none; padding: 0; margin: 0; }
.legend li { display: flex; align-items: center; margin-bottom: 8px; font-size: 13px; line-height: 1.4; color: #34495e;}
.legend .icon { font-size: 18px; min-width: 35px; height: 20px; display: flex; align-items: center; justify-content: center; margin-right: 8px; flex-shrink: 0; }

.upload-box { background: #fdfefe; border: 1px dashed #27ae60; padding: 12px; border-radius: 6px; margin-bottom: 15px; text-align: center; flex-shrink: 0; }
.upload-box h4 { margin: 0 0 6px 0; font-size: 13px; color: #2c3e50; }
.upload-label { display: inline-block; padding: 6px 12px; background: #27ae60; color: white; border-radius: 4px; font-size: 12px; cursor: pointer; font-weight: bold; }

.action-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 0; flex-shrink: 0; margin-bottom: 15px; }

.action-btn { 
    padding: 10px; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-size: 13px; 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    width: 100%; 
    box-sizing: border-box; 
}

#radarButton { background-color: #3498db; }
#radarButton.active { background-color: #34495e; }

.hint-text { font-size: 11px; color: #7f8c8d; margin-top: -10px; text-align: center; margin-bottom: 15px; flex-shrink: 0; }
.webcam-box { background: #fdfefe; border: 1px solid #d5d8dc; padding: 10px; border-radius: 6px; margin-bottom: 15px; flex-shrink: 0; }
.webcam-box h3 { margin: 0 0 8px 0; font-size: 14px; color: #2c3e50; }
.webcam-box ul { padding-left: 20px; margin: 0; font-size: 13px; }
.disclaimer-box { margin-top: 20px; padding-top: 15px; border-top: 1px solid #ecf0f1; font-size: 10px; color: #95a5a6; line-height: 1.4; text-align: center; flex-shrink: 0; }

.map-container { flex-grow: 1; height: 100%; position: relative; width: 100vw; transition: background-color 0.3s; }
#map { width: 100%; height: 100%; }

.flag-marker, .infra-marker { display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0px 3px 4px rgba(0,0,0,0.5)); }
.infra-marker { font-size: 24px; align-items: center; }

.clear-icon { background: none !important; border: none !important; margin: 0 !important; padding: 0 !important; }

.water-label-inner { 
    background-color: #2980b9 !important; 
    color: #ffffff !important; 
    border: 1px solid #ffffff !important; 
    border-radius: 4px !important; 
    padding: 4px 8px !important; 
    font-size: 11px !important; 
    font-weight: bold !important; 
    text-align: center !important; 
    white-space: nowrap !important; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important; 
    width: max-content !important; 
    display: inline-block;
}

.map-water-marker {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    transform: translate(-50%, -50%) !important;
}

.weather-badge {
    background: rgba(255, 255, 255, 0.95); border: 1.5px solid #3498db;
    border-radius: 4px; padding: 2px 4px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    color: #2c3e50; font-family: sans-serif; width: max-content;
}
.weather-badge-top { display: flex; align-items: center; gap: 2px; font-size: 11px; font-weight: bold; }
.weather-badge-wind { font-size: 12px; font-weight: 900; color: #e74c3c; line-height: 1; margin-top: 1px; }

.user-loc-dot { width: 14px; height: 14px; background-color: #3498db; border: 3px solid #ffffff; border-radius: 50%; box-shadow: 0 0 10px rgba(0,0,0,0.5); position: relative; }
.user-loc-dot::after { content: ''; position: absolute; top: -6px; left: -6px; width: 26px; height: 26px; border-radius: 50%; background-color: rgba(52, 152, 219, 0.4); animation: pulse 2s infinite; z-index: -1; }
@keyframes pulse { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

.leaflet-control-layers, .leaflet-control-zoom, .offline-btn-control, .locate-btn-control { box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important; border-radius: 8px !important; overflow: hidden; }
.leaflet-control-layers, .leaflet-control-zoom { border: 2px solid #27ae60 !important; }
.offline-btn-control { border: 2px solid #3498db !important; }
.locate-btn-control { border: 2px solid #e74c3c !important; margin-top: 10px !important; }
.leaflet-control-scale-line { border: 2px solid #2c3e50; border-top: none; background: rgba(255, 255, 255, 0.85); color: #2c3e50; font-weight: bold; padding: 2px 5px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); border-radius: 0 0 4px 4px; }

#radar-status { position: absolute; bottom: 45px; left: 10px; z-index: 1000; background: rgba(255,255,255,0.9); padding: 8px 15px; border-radius: 20px; font-size: 11px; font-weight: bold; box-shadow: 0 2px 8px rgba(0,0,0,0.3); border-left: 4px solid #e74c3c; color: #2c3e50; }
.altitude-legend { position: absolute; bottom: 25px; right: 15px; background: rgba(255, 255, 255, 0.9); padding: 10px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.3); font-size: 11px; z-index: 1000; display: flex; flex-direction: column; align-items: center; border: 1px solid #bdc3c7; }
.altitude-legend-title { font-weight: bold; margin-bottom: 5px; color: #2c3e50; }
.altitude-colorbar { width: 15px; height: 120px; border: 1px solid #7f8c8d; border-radius: 3px; background: linear-gradient(to top, #e74c3c, #e67e22, #f1c40f, #2ecc71, #3498db, #9b59b6); }
.altitude-labels { display: flex; flex-direction: column; justify-content: space-between; height: 120px; margin-left: 8px; }
.altitude-label { line-height: 1; color: #34495e; font-weight: bold; }
.altitude-legend-container { display: flex; align-items: center; }

#dl-progress-box { display: none; position: absolute; top: 70px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,0.95); padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); z-index: 3000; width: 80%; max-width: 400px; text-align: center; border: 2px solid #3498db; }
#dl-progress-bar-container { width: 100%; height: 15px; background: #ecf0f1; border-radius: 8px; overflow: hidden; margin-top: 10px; }
#dl-progress-bar { width: 0%; height: 100%; background: #3498db; transition: width 0.2s; }

.weather-popup-table { border-collapse: collapse; width: 100%; font-size: 12px; margin-top: 5px; }
.weather-popup-table td { padding: 3px 6px; border-bottom: 1px solid #f1f2f6; }
.weather-popup-table td:first-child { font-weight: 600; color: #57606f; }

@media (min-width: 769px) { #radar-status { bottom: 50px; left: 15px; font-size: 12px; } }

.map-blank { background-color: #000000 !important; }

/* NEU: EINGABEFELD FÜR KOORDINATEN */
.coord-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    outline: none;
    background-color: #fdfefe;
}
.coord-input:focus {
    border-color: #3498db;
}