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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

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

/* DSGVO Consent Overlay */
#consent-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #2d7a2d 0%, #1a4d1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    text-align: center;
    padding: 20px;
}

#consent-content {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#consent-content h2 {
    margin-bottom: 15px;
    font-size: 1.8em;
}

#accept-button {
    background: #ffffff;
    color: #2d7a2d;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#accept-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

#accept-button:active {
    transform: translateY(0);
}

.info-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 250px;
}

.info-panel h2 {
    color: #2d3748;
    font-size: 1.5em;
    margin-bottom: 15px;
    border-bottom: 2px solid #2d7a2d;
    padding-bottom: 10px;
}

.info-panel h3 {
    color: #2d3748;
    font-size: 1.1em;
    margin: 15px 0 10px 0;
}

#stats {
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.stat-icon {
    font-size: 1.3em;
    margin-right: 10px;
}

.stat-label {
    flex: 1;
    color: #4a5568;
    font-weight: 500;
}

.stat-value {
    color: #2d7a2d;
    font-weight: 700;
    font-size: 1.2em;
}

#legend {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 0.95em;
    color: #4a5568;
}

.legend-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid #1a4d1a;
}

.legend-marker.tree {
    background-color: #2d7a2d;
}

.legend-marker.area {
    background-color: #8fbc8f;
    border-radius: 3px;
}

/* Popup Styling */
.leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.popup-content {
    min-width: 300px;
    max-width: 400px;
}

.popup-content h3 {
    background: linear-gradient(135deg, #2d7a2d 0%, #1a4d1a 100%);
    color: white;
    padding: 12px 15px;
    margin: 0 0 15px 0;
    border-radius: 5px 5px 0 0;
    font-size: 1.2em;
}

.popup-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    padding: 0 15px;
}

.popup-content table tr {
    border-bottom: 1px solid #e2e8f0;
}

.popup-content table tr:last-child {
    border-bottom: none;
}

.popup-content table td {
    padding: 8px 5px;
    font-size: 0.9em;
}

.popup-content table td:first-child {
    color: #4a5568;
    width: 40%;
}

.popup-content table td:last-child {
    color: #2d3748;
}

.massnahmen {
    background: #fff5e6;
    padding: 12px 15px;
    margin: 10px 0;
    border-left: 4px solid #ff9800;
    border-radius: 4px;
}

.massnahmen h4 {
    color: #e67e22;
    margin-bottom: 8px;
    font-size: 1em;
}

.massnahmen p {
    color: #4a5568;
    font-size: 0.9em;
    margin: 5px 0;
}

.warning {
    background: #ffe6e6;
    padding: 12px 15px;
    margin: 10px 0;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
}

.warning p {
    color: #c0392b;
    font-size: 0.9em;
    margin: 5px 0;
    font-weight: 600;
}

.bemerkung {
    background: #e8f4f8;
    padding: 10px 15px;
    margin: 10px 0;
    border-left: 4px solid #3498db;
    border-radius: 4px;
    font-size: 0.9em;
    color: #2c3e50;
}

.meta {
    padding: 10px 15px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 10px;
}

.meta small {
    color: #718096;
    font-size: 0.85em;
    line-height: 1.6;
}

/* Cluster Styling */
.marker-cluster-small {
    background-color: rgba(45, 122, 45, 0.6);
}

/* Mobile UX Popups */
@media (max-width: 768px) {
    .leaflet-popup-content {
        font-size: 1.1em;
        line-height: 1.4;
        max-width: 280px;
    }
    .leaflet-popup-content-wrapper {
        border-radius: 14px;
    }
    .leaflet-popup-close-button {
        font-size: 18px;
        padding: 6px;
    }
}

/* Buttons im Popup */
.leaflet-popup-content a.popup-btn {
    display: block;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    color: white;
    transition: opacity 0.2s ease;
}

.leaflet-popup-content a.popup-btn:hover {
    opacity: 0.9;
}

.leaflet-popup-content a.popup-btn.nav {
    background-color: #2e7d32; /* Grün für Navigation */
}

.leaflet-popup-content a.popup-btn.copy-btn {
    background-color: #f57c00; /* Orange für Koordinaten kopieren */
}

.leaflet-popup-content a.popup-btn:active {
    opacity: 0.8;
}

/* Cluster Styling */
.marker-cluster-small {
    background-color: rgba(45, 122, 45, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(45, 122, 45, 0.8);
}

.marker-cluster-medium {
    background-color: rgba(45, 122, 45, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(45, 122, 45, 0.8);
}

.marker-cluster-large {
    background-color: rgba(45, 122, 45, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(45, 122, 45, 0.8);
}

/* Layer Control */
.leaflet-control-layers {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .info-panel {
        top: auto;
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-height: 30vh;
        overflow-y: auto;
    }
    
    .popup-content {
        min-width: 250px;
    }
}
