body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#map-container {
    flex: 1;
    position: relative;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

#profile-section {
    background: white;
    border-top: 1px solid #ddd;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

#profile-header {
    padding: 10px 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#profile-stats {
    display: flex;
    gap: 20px;
}

.profile-stat {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.stat-value {
    font-weight: bold;
    font-size: 16px;
}

#profile-container {
    height: 200px;
    padding: 10px;
}

#elevation-chart {
    width: 100%;
    height: 100%;
}

.control-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    max-width: 300px;
    width: calc(100% - 40px);
}

.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.drop-zone.highlight {
    border-color: #4CAF50;
    background-color: #f8f8f8;
}

.button-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.button {
    flex: 1;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    text-align: center;
    white-space: nowrap;
    min-width: 0;
}

.button:hover {
    background-color: #45a049;
}

.button.secondary {
    background-color: #2196F3;
}

.button.secondary:hover {
    background-color: #0b7dda;
}

.button.reset {
    background-color: #f44336;
}

.button.reset:hover {
    background-color: #d32f2f;
}

.basemap-container {
    position: relative;
    margin-top: 8px;
}

.basemap-toggle {
    width: 100%;
    padding: 10px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.basemap-toggle i {
    transition: transform 0.3s;
}

.basemap-toggle.collapsed i {
    transform: rotate(-90deg);
}

.basemap-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-top: 5px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.basemap-buttons.expanded {
    max-height: 200px;
}

.basemap-btn {
    padding: 8px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    font-size: 13px;
}

.basemap-btn:hover {
    background-color: #555;
}

.basemap-btn.active {
    background-color: #4CAF50;
}

@media (max-width: 768px) {
    #profile-section {
        height: 180px;
    }
    
    #profile-container {
        height: 120px;
    }
    
    .control-panel {
        top: 5px;
        left: 5px;
        padding: 8px;
        width: calc(100% - 26px);
    }
    
    .button {
        padding: 8px;
        font-size: 12px;
    }
    
    .basemap-btn {
        padding: 6px;
        font-size: 12px;
    }
    
    .drop-zone {
        padding: 10px;
        font-size: 14px;
    }
    
    #profile-stats {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .profile-stat {
        min-width: 80px;
    }
    
    .stat-value {
        font-size: 14px;
    }
}