body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Arial', sans-serif;
}
.container {
    display: flex;
    height: 100%;
}
.sidebar {
    width: 250px;
    background-color: #f8f9fa;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    overflow-y: auto;
}
.map-container {
    flex-grow: 1;
    position: relative;
}
.tool-group {
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.tool-group h3 {
    color: #333;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}
.tool-group .layui-btn {
    display: block;
    width: 100%;
    margin: 5px 0;
    text-align: left;
    background-color: #e9ecef;
    color: #495057;
    border: none;
    transition: background-color 0.3s;
}
.tool-group .layui-btn:hover {
    background-color: #dee2e6;
}
#map {
    height: 100%;
}
.coordinate-input {
    margin-top: 10px;
}
.coordinate-input input {
    width: 100%;
    margin-bottom: 5px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 8px;
}
#layerControlPanel {
    position: absolute;
    top: 80px;
    right: 10px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: calc(100% - 100px);
    overflow-y: auto;
    width: 250px;
}
.layer-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.layer-item label {
    flex-grow: 1;
    margin-left: 5px;
}
.layer-controls {
    display: flex;
    align-items: center;
}
.layer-controls button {
    margin-left: 5px;
    padding: 2px 5px;
    font-size: 12px;
}
.layer-visibility {
    cursor: pointer;
}
.leaflet-draw-toolbar {
    display: none;
}
.custom-draw-toolbar {
    position: absolute;
    top: 80px;
    left: 10px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
    z-index: 1000;
}
.custom-draw-toolbar button {
    display: block;
    width: 30px;
    height: 30px;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin: 2px;
    border-radius: 2px;
    font-size: 18px;
    background-color: #f8f9fa;
    color: #495057;
    transition: background-color 0.3s;
}
.custom-draw-toolbar button:hover {
    background-color: #e9ecef;
}
.custom-control-button {
    margin: 5px;
    padding: 5px 10px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}
#layerControlPanel {
    z-index: 1000;
}
#editingControls {
    margin-top: 10px;
    display: none;
}
#editingControls button {
    margin-right: 5px;
}
/* 专题地图工具样式 */
.tool-group input[type="color"] {
    padding: 0;
    height: 38px;
    cursor: pointer;
}

.tool-group .layui-inline {
    margin-bottom: 5px;
}

.tool-group input[type="number"] {
    text-align: center;
}

/* 添加工具提示样式 */
.tool-group .layui-form-label {
    color: #666;
    font-size: 12px;
}

/* 优化颜色选择器样式 */
.tool-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.tool-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

/* 分段设置弹窗样式 */
#dialogRangeSettings {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

#dialogRangeSettings .layui-form-item {
    margin-bottom: 10px;
}

#dialogRangeSettings input[type="color"] {
    padding: 0;
    height: 38px;
    cursor: pointer;
}

.layui-layer-content .layui-form {
    margin: 0;
    padding: 15px;
}

/* 添加图例样式 */
.draggable-legend {
    position: absolute;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.legend-header {
    cursor: move;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.legend-header .layui-icon-move {
    color: #999;
}

/* 确保图例在拖动时始终显示在最上层 */
.draggable-legend:active {
    z-index: 1001;
}

/* 添加图例编辑按钮样式 */
.legend-header .layui-btn-xs {
    background-color: transparent;
    color: #666;
}

.legend-header .layui-btn-xs:hover {
    background-color: #f2f2f2;
    color: #333;
}

.legend-header h4 {
    display: inline-block;
    margin: 0;
    padding-right: 5px;
}