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

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #fafafa;
    color: #1a1a1a;
    overflow-x: hidden;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    max-width: 400px;
}

/* Series Selector */
.series-selector {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.series-btn-toggle {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: relative;
    min-width: 280px;
    width: 100%;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.series-btn-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.series-selector.expanded .series-btn-toggle {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.toggle-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(102, 126, 234, 0.8);
    flex-shrink: 0;
}

.series-selector.expanded .toggle-icon {
    transform: translateY(-50%) rotate(180deg);
}

.series-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.series-selector.expanded .series-options {
    max-height: 500px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.series-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.5rem;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.series-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.series-btn.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.2);
}

.series-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
    color: rgba(26, 26, 26, 0.9);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.series-btn.active .series-title {
    background: linear-gradient(135deg, rgba(102, 126, 234, 1) 0%, rgba(118, 75, 162, 1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.series-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: rgba(26, 26, 26, 0.7);
    margin: 0;
}

/* Map container */
#map {
    flex: 1;
    width: 100%;
    min-height: 0;
    height: 100vh;
    z-index: 1;
    position: relative;
}

#map .leaflet-container {
    height: 100% !important;
    width: 100% !important;
    font-family: 'Outfit', sans-serif;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.08);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow-y: auto;
    border-left: 1px solid rgba(102, 126, 234, 0.1);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sidebar.open {
    right: 0;
}

.sidebar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.close-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    font-weight: 300;
}

.close-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.location-list {
    padding: 1.5rem;
}

.location-item {
    padding: 1.5rem;
    margin-bottom: 0.75rem;
    background: #fafafa;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.location-item:hover {
    background: #f5f5f5;
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateX(-4px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.location-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 2px 12px rgba(102, 126, 234, 0.15);
}

.location-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.region-badge {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.region-slovenia {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.region-italy {
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.15) 0%, rgba(255, 107, 53, 0.15) 100%);
    color: #ff8c42;
    border: 1px solid rgba(255, 140, 66, 0.3);
}

.region-dolomites {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15) 0%, rgba(56, 161, 105, 0.15) 100%);
    color: #48bb78;
    border: 1px solid rgba(72, 187, 120, 0.3);
}

.region-switzerland {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.15) 0%, rgba(229, 62, 62, 0.15) 100%);
    color: #f56565;
    border: 1px solid rgba(245, 101, 101, 0.3);
}

.region-austria {
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.15) 0%, rgba(34, 84, 61, 0.15) 100%);
    color: #2d5016;
    border: 1px solid rgba(45, 80, 22, 0.3);
}

.region-france {
    background: linear-gradient(135deg, rgba(49, 130, 206, 0.15) 0%, rgba(44, 82, 130, 0.15) 100%);
    color: #3182ce;
    border: 1px solid rgba(49, 130, 206, 0.3);
}

.region-germany {
    background: linear-gradient(135deg, rgba(237, 202, 24, 0.15) 0%, rgba(212, 172, 13, 0.15) 100%);
    color: #edca18;
    border: 1px solid rgba(237, 202, 24, 0.3);
}

.region-france-south {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.15) 0%, rgba(160, 82, 45, 0.15) 100%);
    color: #8b4513;
    border: 1px solid rgba(139, 69, 19, 0.3);
}

.region-spain {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(178, 34, 34, 0.15) 100%);
    color: #dc143c;
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.location-meta {
    font-size: 0.875rem;
    color: #666;
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-weight: 400;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.location-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Toggle sidebar button */
.toggle-sidebar {
    position: fixed;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 1500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
}

.toggle-sidebar:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.25);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sidebar.open ~ .toggle-sidebar {
    right: 424px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: 2rem;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.75rem;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    background: #fafafa;
}

.close-modal:hover {
    background: #f0f0f0;
    color: #333;
    transform: rotate(90deg);
}

.modal-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    padding-right: 3rem;
    letter-spacing: -0.02em;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.modal-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #666;
    font-weight: 400;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.modal-meta-item strong {
    color: #1a1a1a;
    font-weight: 600;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.75;
    color: #555;
    white-space: pre-line;
    font-weight: 400;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        top: 1rem;
        right: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .series-btn-toggle {
        min-width: auto;
        width: 100%;
        padding: 0.6rem 1rem;
    }
    
    .series-btn {
        padding: 0.6rem 1rem;
    }
    
    .series-title {
        font-size: 0.875rem;
    }
    
    .series-subtitle {
        font-size: 0.7rem;
    }
    
    .toggle-icon {
        width: 14px;
        height: 14px;
    }
    
    #map {
        height: 100vh;
    }
    
    .sidebar {
        width: 100%;
        right: -100%;
    }
    
    .sidebar.open ~ .toggle-sidebar {
        right: 24px;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
        padding-right: 2.5rem;
    }
    
    .modal-meta {
        gap: 1rem;
        flex-direction: column;
    }
}

/* Custom map marker - Slovenia (Purple) */
.custom-marker {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(102, 126, 234, 0.4);
}

.custom-marker::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - Italy (Orange) */
.custom-marker-italy {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b35 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(255, 140, 66, 0.4);
}

.custom-marker-italy::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - Dolomites (Green) */
.custom-marker-dolomites {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(72, 187, 120, 0.4);
}

.custom-marker-dolomites::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - Switzerland (Red) */
.custom-marker-switzerland {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(245, 101, 101, 0.4);
}

.custom-marker-switzerland::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - Austria (Dark Green) */
.custom-marker-austria {
    background: linear-gradient(135deg, #2d5016 0%, #22543d 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(45, 80, 22, 0.4);
}

.custom-marker-austria::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - France (Blue) */
.custom-marker-france {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(49, 130, 206, 0.4);
}

.custom-marker-france::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - Germany (Yellow) */
.custom-marker-germany {
    background: linear-gradient(135deg, #edca18 0%, #d4ac0d 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(237, 202, 24, 0.4);
}

.custom-marker-germany::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - France South (Brown) */
.custom-marker-france-south {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(139, 69, 19, 0.4);
}

.custom-marker-france-south::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Custom map marker - Spain (Crimson) */
.custom-marker-spain {
    background: linear-gradient(135deg, #dc143c 0%, #b22222 100%);
    width: 32px;
    height: 32px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid white;
    box-shadow: 0 3px 12px rgba(220, 20, 60, 0.4);
}

.custom-marker-spain::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar,
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.modal-content::-webkit-scrollbar-track {
    background: #fafafa;
}

.sidebar::-webkit-scrollbar-thumb,
.modal-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.modal-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}