/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main content */
.main {
    padding: 2rem 0;
}

/* Controls */
.controls {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: #4a5568;
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.filter-group select:focus {
    outline: none;
    border-color: #667eea;
}

.filter-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Map section */
.map-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#map {
    height: 500px;
    width: 100%;
}

.map-legend {
    padding: 1rem;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.map-legend h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.marker-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.marker-icon.excellent {
    background-color: #48bb78;
}

.marker-icon.good {
    background-color: #ed8936;
}

.marker-icon.fair {
    background-color: #e53e3e;
}

/* Parks list */
.parks-list {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-height: 600px;
    overflow-y: auto;
}

.parks-list h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

/* Park cards */
.park-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
    cursor: pointer;
}

.park-card:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.park-card.highlighted {
    border-color: #667eea;
    background-color: #f0f4ff;
}

.park-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.park-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.25rem;
}

.park-distance {
    font-size: 0.9rem;
    color: #718096;
    background: #edf2f7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.park-address {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 0.75rem;
}

.ratings {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.rating-label {
    color: #4a5568;
    font-weight: 500;
}

.rating-value {
    background: #667eea;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 600;
}

.amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.amenity-tag {
    background: #e6fffa;
    color: #234e52;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.amenity-tag.highlight {
    background: #fed7d7;
    color: #742a2a;
}

.special-features {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.4;
}

.special-features strong {
    color: #2d3748;
}

/* Ranking explanation */
.ranking-explanation {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.ranking-explanation h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #2d3748;
    text-align: center;
}

.criteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.criteria-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #667eea;
}

.criteria-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748;
}

.criteria-card ul {
    list-style: none;
}

.criteria-card li {
    padding: 0.25rem 0;
    color: #4a5568;
    position: relative;
    padding-left: 1rem;
}

.criteria-card li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .criteria-grid {
        grid-template-columns: 1fr;
    }
    
    .ratings {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .park-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .amenities {
        gap: 0.25rem;
    }
    
    .amenity-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Custom scrollbar for parks list */
.parks-list::-webkit-scrollbar {
    width: 6px;
}

.parks-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.parks-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.parks-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Loading state */
.loading {
    text-align: center;
    padding: 2rem;
    color: #718096;
}

/* Popup styles for map */
.leaflet-popup-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}

.popup-title {
    font-weight: 600;
    font-size: 1rem;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.popup-rating {
    background: #667eea;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.popup-features {
    font-size: 0.85rem;
    color: #4a5568;
}