/* ========== 基础样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100%;
}

#map {
    flex: 1;
    height: 100%;
    width: 100%;
}

/* ========== 左侧功能面板 ========== */
.left-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    width: 320px;
    max-height: 90vh;
    overflow-y: auto;
}

.main-title {
    margin-bottom: 20px;
    color: #007bff;
    font-size: 18px;
}

/* ========== 面板区块 ========== */
.panel-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.panel-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #007bff;
    margin-right: 8px;
}

/* ========== 图层切换按钮 ========== */
.layer-buttons {
    display: flex;
    gap: 8px;
}

.layer-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.layer-btn:hover {
    background: #f0f0f0;
}

.layer-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ========== 输入框样式 ========== */
.input-group {
    margin-bottom: 10px;
}

.input-group label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
}

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.search-box input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* ========== 按钮样式 ========== */
button {
    padding: 8px 16px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #007bff;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-success {
    background: #28a745;
    color: white;
    width: 100%;
}

.btn-success:hover {
    background: #218838;
}

.btn-search {
    background: #007bff;
    color: white;
    padding: 8px 20px;
}

.btn-search:hover {
    background: #0056b3;
}

/* ========== 状态信息 ========== */
.status {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    line-height: 1.5;
    text-align: center;
}

/* ========== POI结果列表 ========== */
.result-list {
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 10px;
}

.poi-item {
    padding: 10px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.poi-item:hover {
    background: #f0f8ff;
    border-color: #007bff;
}

.poi-name {
    font-weight: bold;
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
}

.poi-addr {
    font-size: 12px;
    color: #888;
}

.poi-type {
    font-size: 11px;
    color: #007bff;
    margin-top: 4px;
}

/* ========== 右侧统计图表面板 ========== */
.right-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    width: 350px;
}

#chartCanvas {
    width: 100% !important;
    height: 300px !important;
}

/* ========== 提示信息 ========== */
.info-tip {
    background: #e7f3ff;
    border-left: 3px solid #007bff;
    padding: 8px 12px;
    font-size: 12px;
    color: #004085;
    border-radius: 4px;
    margin-top: 10px;
}

/* ========== 滚动条美化 ========== */
::-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;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .left-panel {
        width: 90%;
        max-width: 320px;
    }
    
    .right-panel {
        width: 90%;
        max-width: 320px;
        top: auto;
        bottom: 10px;
    }
}