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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#timeline {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    background: rgba(255, 255, 255, 0.97);
    z-index: 1000;
    overflow-y: auto;
    padding: 16px;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
}

#timeline h2 {
    font-size: 1.1rem;
    color: #2d5016;
    margin-bottom: 12px;
}

#timeline-entries {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-card {
    padding: 10px 12px;
    border-radius: 6px;
    background: #f5f5f0;
    cursor: pointer;
    transition: background 0.15s;
}

.timeline-card:hover {
    background: #e8f5e9;
}

.timeline-card-current {
    border-left: 3px solid #FF4500;
}

.timeline-card-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d5016;
}

.timeline-card-trail {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 2px;
}

.timeline-card-mile {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-top: 2px;
}

.timeline-card-notes {
    font-size: 0.8rem;
    color: #555;
    margin-top: 4px;
    white-space: pre-wrap;
}

#map {
    position: absolute;
    top: 0;
    left: 320px;
    right: 0;
    bottom: 0;
    z-index: 1;
}

#stats {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 200px;
}

#stats h1 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #2d5016;
}

#miles {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

#last-update {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

.marker-icon {
    background: none !important;
    border: none !important;
}

.marker-dot {
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.marker-dot-current {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 1px 4px rgba(0,0,0,0.3), 0 0 0 0 rgba(0,0,0,0.35); }
    70% { box-shadow: 0 1px 4px rgba(0,0,0,0.3), 0 0 0 10px rgba(0,0,0,0); }
    100% { box-shadow: 0 1px 4px rgba(0,0,0,0.3), 0 0 0 0 rgba(0,0,0,0); }
}

.leaflet-popup-content {
    font-size: 14px;
    line-height: 1.4;
}

.leaflet-popup-content strong {
    color: #2d5016;
}

@media (max-width: 600px) {
    #timeline {
        display: none;
    }

    #map {
        left: 0;
    }

    #stats {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
        text-align: center;
    }

    #stats h1 {
        font-size: 1rem;
    }
}
