/* 浅色主题样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* 左侧控制面板 */
.control-panel {
    width: 320px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.05);
}

.panel-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.panel-header h1 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.panel-section {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.panel-section h2 {
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 15px;
}

/* 图层控制 */
.layer-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layer-item {
    display: flex;
    align-items: center;
}

.layer-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    user-select: none;
}

.layer-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 样式控制 */
.style-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.style-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.style-group label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.style-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s;
}

.style-group select:hover {
    border-color: #4a90e2;
}

.style-group select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

.style-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
}

.style-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.style-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    transition: background 0.2s;
}

.style-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #357abd;
}

.style-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.style-group input[type="range"]::-moz-range-thumb:hover {
    background: #357abd;
}

.style-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 8px;
}

/* 按钮样式 */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    margin-bottom: 10px;
}

.btn-primary {
    background-color: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background-color: #357abd;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.config-controls {
    display: flex;
    flex-direction: column;
}

/* 地图容器 */
.map-container {
    flex: 1;
    position: relative;
    background-color: #e8e8e8;
}

#map {
    width: 100%;
    height: 100%;
}

/* 自定义标记 */
.custom-marker {
    background: transparent;
    border: none;
}

/* 标签样式 */
.map-label {
    background: transparent;
    border: none;
}

.label-text {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #ddd;
    pointer-events: none;
}

/* 弹窗样式 */
.custom-popup {
    font-size: 13px;
}

.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popup-content {
    max-width: 280px;
}

.popup-content div {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.popup-content div:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.popup-content strong {
    color: #2c3e50;
    margin-right: 8px;
}

.hover-popup {
    font-size: 12px;
}

/* 滚动条样式 */
.control-panel::-webkit-scrollbar {
    width: 8px;
}

.control-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.control-panel::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.control-panel::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .control-panel {
        width: 100%;
        height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .map-container {
        height: 60vh;
    }
}

/* Leaflet控件样式覆盖 */
.leaflet-control-zoom {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.leaflet-control-zoom a {
    background-color: #ffffff;
    color: #333;
    border: 1px solid #ddd;
}

.leaflet-control-zoom a:hover {
    background-color: #f5f5f5;
}

.leaflet-control-scale {
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 5px;
}

.leaflet-popup-content-wrapper {
    border-radius: 6px;
}

.leaflet-popup-tip {
    background: white;
}
