/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
    position: relative;
}

/* 确保高德地图控件可见 */
.amap-logo,
.amap-copyright {
    z-index: 10 !important;
}

.amap-toolbar,
.amap-scalebar {
    z-index: 50 !important;
}

/* 标题栏 */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
}

/* 左侧控制面板 */
.control-panel {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 320px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    overflow-y: auto;
}

.panel-section {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.panel-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #667eea;
    margin-right: 8px;
    border-radius: 2px;
}

/* 城市选择器 */
.city-select {
    display: flex;
    gap: 8px;
}

select {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
    background: white;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* 图层切换 */
.layer-switch {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.layer-btn {
    padding: 8px 16px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.layer-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.layer-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* POI搜索 */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

/* 服务半径设置 */
.radius-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

.radius-value {
    min-width: 60px;
    font-weight: 600;
    color: #667eea;
}

/* 状态信息 */
.status-info {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

/* POI结果列表 */
.poi-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
}

.poi-item {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.poi-item:hover {
    background: #f8f9fa;
}

.poi-item:last-child {
    border-bottom: none;
}

.poi-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.poi-addr {
    font-size: 12px;
    color: #888;
}

/* 热力图控制 */
.heatmap-controls {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 统计信息 */
.stats-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-label {
    font-size: 13px;
    color: #666;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
}

/* 图例 */
.legend {
    position: absolute;
    bottom: 30px;
    right: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
}

.legend-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 信息窗口样式 */
.info-window {
    padding: 10px;
    min-width: 200px;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.info-content {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.info-address {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    color: #888;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}