/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}
/* Header */
.footer {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #764ba2;
    background-color: #f0f4ff;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-area h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.upload-area p {
    color: #666;
    margin-bottom: 20px;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.file-info {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.file-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.analyze-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.results {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

    .results h2 {
        color: #333;
        margin-bottom: 30px;
        text-align: center;
        font-size: 2rem;
    }

    /* Export Section */
    .export-section {
        display: flex;
        gap: 15px;
        justify-content: center;
        margin-bottom: 30px;
        flex-wrap: wrap;
    }

    .export-btn {
        background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
        color: white;
        border: none;
        padding: 12px 25px;
        border-radius: 25px;
        font-size: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    }

    .export-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }

    .export-btn:active {
        transform: translateY(-1px);
    }.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2.5rem;
    margin-right: 20px;
}

.stat-content h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.stat-unit {
    color: #999;
    font-size: 0.9rem;
}

/* Leistungskilometer Section */
.leistungskilometer-section {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.leistungskilometer-section h3 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}

.lkm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.lkm-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 4px solid;
}

.lkm-anstieg {
    border-left-color: #4CAF50;
}

.lkm-gefaelle {
    border-left-color: #FF9800;
}

.lkm-gesamt {
    border-left-color: #667eea;
    grid-column: span 1;
}

.lkm-card h4 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.lkm-rule {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 15px;
    font-style: italic;
}

.lkm-value {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.lkm-value.large {
    font-size: 2.5rem;
    color: #764ba2;
}

.lkm-unit {
    color: #999;
    font-size: 1rem;
}

.total-kilometers {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
}

.total-kilometers h4 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.total-value {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Route Info */
.route-info {
    background: #f8f9ff;
    border-radius: 12px;
    padding: 25px;
}

.route-info h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.route-details {
    display: grid;
    gap: 15px;
}

.route-point {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .route-point strong {
        color: #667eea;
        display: inline-block;
        width: 120px;
    }

    /* Map Section */
    .map-section {
        background: #f8f9ff;
        border-radius: 12px;
        padding: 25px;
        margin-top: 30px;
    }

    .map-section h3 {
        color: #333;
        margin-bottom: 20px;
        text-align: center;
        font-size: 1.3rem;
    }

    .map-container {
        background: white;
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .route-map {
        height: 400px;
        width: 100%;
        border-radius: 6px;
        overflow: hidden;
    }

    .map-controls {
        display: flex;
        gap: 10px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .map-btn {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 0.9rem;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .map-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .map-btn:active {
        transform: translateY(0);
    }

    /* Elevation Profile */
    .elevation-profile {
        background: #f8f9ff;
        border-radius: 12px;
        padding: 25px;
        margin-top: 30px;
    }

    .elevation-profile h3 {
        color: #333;
        margin-bottom: 20px;
        text-align: center;
        font-size: 1.3rem;
    }

    .canvas-container {
        background: white;
        border-radius: 8px;
        padding: 20px;
        margin-bottom: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        overflow-x: auto;
    }

    #elevationChart {
        display: block;
        margin: 0 auto;
        max-width: 100%;
        height: auto;
    }

    .elevation-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .elevation-stat {
        background: white;
        padding: 15px;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .elevation-stat .label {
        color: #666;
        font-weight: 500;
    }

    .elevation-stat .value {
        color: #667eea;
        font-weight: bold;
        font-size: 1.1rem;
    }/* Error */
.error {
    background: #ffebee;
    border: 1px solid #f44336;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    color: #c62828;
}

.error-icon {
    font-size: 2rem;
    margin-right: 20px;
}

.error-content h3 {
    margin-bottom: 10px;
}

.error-content p {
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .lkm-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .total-value {
        font-size: 2rem;
    }

    .elevation-stats {
        grid-template-columns: 1fr;
    }

    .canvas-container {
        padding: 10px;
    }

    #elevationChart {
        width: 100%;
    }

    .route-map {
        height: 300px;
    }

    .map-controls {
        flex-direction: column;
        align-items: center;
    }
}
