body {
    margin: 0;
    font-family: sans-serif;
    background: #23272b;
    color: #eee;
}

#search {
    padding: 16px;
    background: #333;
    display: flex;
    gap: 8px;
    align-items: center;
}

#search input[type="text"],
#search input[type="number"] {
    padding: 6px 12px;
    font-size: 1em;
    border-radius: 6px;
    border: 1px solid #555;
    background: #222;
    color: #eee;
    width: 220px;
}

#search input[type="number"] {
    width: 90px;
}

#search button {
    background: #0078a8;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s, transform 0.1s;
}

#search button:hover {
    background: #005e83;
    transform: translateY(-1px);
}

#search button:active {
    transform: translateY(0);
}

/* Spezielles Styling für Etappenplanungs-Button */
#stageModeBtn {
    font-weight: bold;
    transition: all 0.3s ease;
}

#stageModeBtn:hover {
    background: #005e83;
}

/* Aktiver Zustand für Etappenplanung (wird via JavaScript gesetzt) */
#stageModeBtn.active {
    background: #e22134 !important;
    box-shadow: 0 0 10px rgba(226, 33, 52, 0.4);
}

#filters {
    background: #23272b;
    padding: 8px 16px;
    border-bottom: 1px solid #333;
}

#map {
    width: 100vw;
    height: 78vh;
}

/* Cursor-Styles für verschiedene Modi */
.map-container.stage-mode {
    cursor: crosshair;
}

.map-container.lineal-mode {
    cursor: crosshair;
}

/* Zusätzliche Styles für bessere UX */
.maplibregl-marker {
    cursor: move;
}

.maplibregl-popup {
    font-family: sans-serif;
}

.maplibregl-popup-content {
    background: #333;
    color: #eee;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip {
    border-bottom-color: #333;
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
    border-top-color: #333;
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
    border-right-color: #333;
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
    border-left-color: #333;
}

/* www/style.css - Füge diese Styles am Ende der Datei hinzu */

/* Verbessertes Progress Modal */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(4px);
}

#importProgress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2a2a2a;
    color: #fff;
    padding: 30px;
    border-radius: 16px;
    z-index: 10001;
    min-width: 500px;
    max-width: 600px;
    display: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 2px solid #333;
}

#importProgress h3 {
    margin: 0 0 20px 0;
    color: #FFD600;
    font-size: 1.4em;
    text-align: center;
}

#progressText {
    margin: 15px 0;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 8px;
    border-left: 4px solid #0078a8;
    font-family: 'Courier New', monospace;
    min-height: 50px;
    line-height: 1.5;
}

.progress-bar {
    background: #444;
    height: 25px;
    border-radius: 12px;
    overflow: hidden;
    margin: 15px 0;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    background: linear-gradient(90deg, #0078a8, #00a8d8);
    height: 100%;
    transition: width 0.8s ease, background 0.3s ease;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

#progressPercent {
    text-align: center;
    font-weight: bold;
    font-size: 1.2em;
    color: #FFD600;
    margin: 10px 0;
}

.import-details {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    border: 1px solid #333;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #333;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span:first-child {
    font-weight: bold;
    color: #4CAF50;
}

.detail-row span:last-child {
    color: #ccc;
    font-size: 0.9em;
}

.error-count {
    margin-top: 10px;
    padding: 8px 12px;
    background: #ff6b35;
    color: white;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    animation: pulse-orange 2s infinite;
}

@keyframes pulse-orange {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.import-tips {
    background: #1a3a1a;
    border: 1px solid #2ecc40;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    font-size: 0.9em;
}

.import-tips p {
    margin: 5px 0;
    line-height: 1.4;
}

.import-tips strong {
    color: #2ecc40;
}

.progress-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.cancel-btn, .hide-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 150px;
}

.hide-btn {
    background: #95a5a6;
}

.cancel-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.hide-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.cancel-btn:active, .hide-btn:active {
    transform: translateY(0);
}

/* Responsive Design für kleinere Bildschirme */
@media (max-width: 768px) {
    #importProgress {
        min-width: 90vw;
        max-width: 90vw;
        margin: 0 5vw;
        padding: 20px;
    }
    
    .progress-actions {
        flex-direction: column;
    }
    
    .cancel-btn, .hide-btn {
        max-width: none;
    }
}

/* Notification Improvements */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    z-index: 10002;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    font-family: sans-serif;
    max-width: 400px;
    line-height: 1.4;
    white-space: pre-line;
    border-left: 4px solid currentColor;
    animation: slide-in-right 0.3s ease;
}

@keyframes slide-in-right {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: linear-gradient(135deg, #2ecc40, #27ae60);
    color: white;
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.notification.info {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

/* Loading States für bestehende Elemente */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top: 2px solid #0078a8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}