* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header h1 {
    font-size: 28px;
    font-weight: bold;
}

/* 主体内容 */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 10px;
    padding: 10px;
}

/* 左侧控制面板 */
.control-panel {
    width: 280px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.panel-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-section h3 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.panel-section h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    margin-right: 8px;
}

/* 图层控制 */
.layer-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.layer-controls label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
}

.layer-controls input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    accent-color: #667eea;
}

/* 下拉选择 */
select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* 滑块 */
#radiusSlider {
    width: 100%;
    margin-top: 5px;
    accent-color: #667eea;
}

#radiusValue {
    display: inline-block;
    margin-left: 5px;
    font-weight: bold;
    color: #667eea;
}

/* 统计框 */
.stats-box {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 5px;
}

.stats-box p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

.stats-box span {
    color: #667eea;
    font-weight: bold;
}

/* 按钮 */
.btn-analyze {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-analyze:active {
    transform: translateY(0);
}

/* 地图容器 */
.map-container {
    flex: 1;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* 右侧统计面板 */
.stats-panel {
    width: 350px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.chart-box {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.chart-box:last-child {
    border-bottom: none;
}

.chart-box h3 {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.chart-box h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    margin-right: 8px;
}

/* 滚动条美化 */
.control-panel::-webkit-scrollbar,
.stats-panel::-webkit-scrollbar {
    width: 6px;
}

.control-panel::-webkit-scrollbar-track,
.stats-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.control-panel::-webkit-scrollbar-thumb,
.stats-panel::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.control-panel::-webkit-scrollbar-thumb:hover,
.stats-panel::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        gap: 5px;
        padding: 5px;
    }
    
    .control-panel {
        width: 220px;
    }
    
    .stats-panel {
        width: 280px;
    }
    
    .header h1 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .control-panel,
    .stats-panel {
        width: 100%;
        max-height: 200px;
    }
    
    .map-container {
        flex: 2;
    }
}
