* {
    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%);
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.back-btn {
    background: white;
    color: #264461;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.sidebar {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.sidebar h2 {
    color: #264461;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.stat-item {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #264461;
}

.stat-item h3 {
    color: #264461;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.stat-item p {
    color: #666;
    font-size: 0.9rem;
    margin: 3px 0;
}

.zcode-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #fff3cd;
    color: #856404;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 2px;
}

.map-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    height: 80vh;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.legend {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.legend h4 {
    margin-bottom: 10px;
    color: #264461;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 5px 0;
}

.legend-color {
    width: 30px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #264461;
    font-size: 1.2rem;
}

.filter-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.filter-btn {
    background: white;
    color: #264461;
    border: 2px solid #264461;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.filter-btn:hover {
    background: #264461;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.filter-panel {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 350px;
    max-height: 500px;
    overflow: hidden;
}

.filter-panel.active {
    display: block;
}

.filter-header {
    background: linear-gradient(135deg, #264461 0%, #1a3147 100%);
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.filter-search {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-search input {
    width: 100%;
    padding: 10px;
    border: 2px solid #264461;
    border-radius: 6px;
    font-size: 14px;
}

.filter-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
}

.filter-tab {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: all 0.3s;
}

.filter-tab.active {
    background: white;
    color: #264461;
    border-bottom: 3px solid #264461;
}

.filter-content {
    max-height: 450px;
    overflow-y: auto;
    padding: 10px;
}

.filter-item {
    padding: 10px;
    margin: 5px 0;
    background: #f8f9ff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-item:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.filter-item.active {
    background: #264461;
    color: white;
}

.filter-count {
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.filter-item.active .filter-count {
    background: white;
    color: #264461;
}

.clear-filter-btn {
    margin: 10px;
    width: calc(100% - 20px);
    padding: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-filter-btn:hover {
    background: #c82333;
}

.download-btn {
    position: absolute;
    top: 70px;
    right: 20px;
    z-index: 1000;
    background: white;
    color: #264461;
    border: 2px solid #264461;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    background: #264461;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
