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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #000;
    color: #333;
    overflow: hidden;
}

/* Full-screen map */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}


/* Floating home link */
.floating-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.home-link {
    display: inline-block;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.3);
    color: #333;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.home-link:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    color: #667eea;
}


/* Floating legend */
.floating-legend {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.3);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 320px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}


.filter-section {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.filter-section label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

#year-filter {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-width: 120px;
}

#year-filter:focus {
    outline: none;
    border-color: #667eea;
}

.legend-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.legend-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.legend-item.disabled {
    opacity: 0.4;
}

.legend-item.disabled .legend-marker {
    opacity: 0.3;
}


.legend-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.legend-marker.home {
    background: #9C27B0;
}

.legend-marker.adventure {
    background: #4CAF50;
}

.legend-marker.city {
    background: #2196F3;
}

.legend-marker.trek {
    background: #8D6E63;
}

.legend-marker.photos {
    background: #FFFFFF;
    border: 2px solid #FFD700;
}



.legend-item span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

/* Popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 15px;
    font-family: 'Inter', sans-serif;
}

.popup-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.popup-year {
    color: #667eea;
    font-weight: 500;
    margin-bottom: 10px;
}

.popup-country {
    color: #666;
    font-weight: 500;
    margin-top: 5px;
}

.popup-photos {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.popup-photos a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.popup-photos a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.popup-description {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Responsive design */
@media (max-width: 768px) {
    .floating-title {
        top: 20px;
        left: 20px;
        padding: 15px 20px;
    }
    
    .floating-title h1 {
        font-size: 2rem;
    }
    
    
    .floating-legend {
        bottom: 20px;
        right: 20px;
        padding: 15px;
        min-width: 280px;
        max-width: 350px;
    }
    
    
    .stats {
        gap: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .floating-title h1 {
        font-size: 1.8rem;
    }
    
    
    .floating-legend {
        min-width: 260px;
        max-width: 100%;
        padding: 12px;
    }
    
    .legend-items {
        gap: 6px;
    }
    
    .legend-item span {
        font-size: 0.8rem;
    }
}

/* Location Drawer */
.location-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.location-drawer.open {
    right: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.drawer-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Drawer tabs */
.drawer-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    background: #e9ecef;
    color: #333;
}

.tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background: white;
}

.tab-button:focus {
    outline: none;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.drawer-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.drawer-toggle:hover {
    background-color: #e9ecef;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.country-counter {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 8px;
}

.country-counter .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #007bff;
}

.country-counter .stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.drawer-open-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 12px;
}

.drawer-open-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.drawer-open-btn:hover .hamburger-line {
    background: #007bff;
}

.drawer-open-btn.hidden {
    display: none;
}

/* Location List */
.loading-message {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.country-group {
    border-bottom: 1px solid #eee;
}

.country-header {
    padding: 15px 20px;
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #dee2e6;
}

.location-item {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-item:hover {
    background-color: #f8f9fa;
}

.location-item:last-child {
    border-bottom: none;
}

.location-icon {
    font-size: 1rem;
    min-width: 20px;
}

.location-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

.location-year {
    font-size: 0.8rem;
    color: #666;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 10px;
}

.location-type {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .location-drawer {
        width: 100vw;
        right: -100vw;
    }
    
    .drawer-open-btn {
        top: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        padding: 10px;
    }
    
    .hamburger-line {
        width: 18px;
        height: 2px;
    }
}