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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

nav {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    color: #667eea;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s;
    font-weight: 500;
}

.nav-links a.active {
    background: #667eea;
    color: white;
}

.nav-links a:hover {
    background: #764ba2;
    color: white;
}

.filters {
    background: white;
    margin: 2rem auto;
    max-width: 1400px;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

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

.range-inputs, .date-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.range-inputs input, .date-inputs input {
    width: 80px;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}

.date-inputs input {
    width: 130px;
}

select {
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

button {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

#apply-filters {
    background: #667eea;
    color: white;
}

#apply-filters:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#reset-filters {
    background: #e0e0e0;
    color: #666;
}

#reset-filters:hover {
    background: #d0d0d0;
}

.section {
    display: none;
    max-width: 1400px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.section.active {
    display: block;
}

#map {
    height: 70vh;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#events-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.event-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.event-header {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.event-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.event-date {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-location {
    color: #888;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1rem 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

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

.detail-value {
    color: #667eea;
    font-weight: 700;
}

.event-distances {
    margin-top: 1rem;
}

.event-distances h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.distance-item {
    background: #f0f3ff;
    padding: 0.5rem;
    margin: 0.3rem 0;
    border-radius: 6px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
}

.event-links {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.event-links a {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
}

.event-links a:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.event-status {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.status-open {
    background: #d4edda;
    color: #155724;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
}

.leaflet-popup-content {
    margin: 0.8rem;
}

.popup-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.popup-info {
    font-size: 0.9rem;
    color: #666;
    margin: 0.3rem 0;
}

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem 3rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    display: none;
    z-index: 10000;
}

#loading.show {
    display: block;
}

@media (max-width: 768px) {
    .filters {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    #events-container {
        grid-template-columns: 1fr;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav h1 {
        font-size: 1.5rem;
    }
}