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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.upload-section {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.file-input-label:hover {
    background-color: #2980b9;
}

#sampleBtn {
    padding: 12px 24px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#sampleBtn:hover {
    background-color: #27ae60;
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.view-btn {
    padding: 10px 20px;
    background-color: #ecf0f1;
    color: #34495e;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.view-btn:hover {
    background-color: #d5dbdb;
}

.view-btn.active {
    background-color: #3498db;
    color: white;
}

#map, #map3d {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

#map3d {
    background-color: #000;
}

.hidden {
    display: none;
}

.info-panel {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.track-info h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

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

.detail-item {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
}

.detail-item h4 {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.detail-item p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c3e50;
}

.elevation-profile {
    margin-top: 10px;
}

.elevation-chart {
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 10px;
    font-family: monospace;
}

.elevation-row {
    height: 15px;
    line-height: 15px;
    white-space: nowrap;
}

.elevation-point {
    color: #3498db;
    font-weight: bold;
}

.elevation-empty {
    color: #ddd;
}

.elevation-scale {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Tooltip styling for time information */
.time-tooltip {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.time-tooltip div {
    margin: 3px 0;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    #map, #map3d {
        height: 400px;
    }
    
    .upload-section {
        flex-direction: column;
        align-items: center;
    }
    
    .file-input-label, #sampleBtn {
        width: 100%;
        text-align: center;
    }
    
    .view-toggle {
        flex-direction: column;
        align-items: center;
    }
    
    .view-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}