/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow: hidden;
    height: 100vh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/*iframe {*/
/*    margin: 0;*/
/*    padding: 0;*/
/*    box-sizing: border-box;*/
/*}*/

.map-container-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.map-container {
    width: 100%;
    height: 100%;
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
}

.primary-map {
    z-index: 2;
}

/* 绘图Canvas */
#drawingCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    cursor: crosshair;
    pointer-events: none;
}

#drawingCanvas.active {
    pointer-events: auto;
}

/* 中心十字架样式 */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 90;
}

.crosshair::before,
.crosshair::after {
    content: "";
    position: absolute;
    background-color: #00ff00;
    border-radius: 1px;
    box-shadow: 0 0 4px rgba(0, 255, 0, 0.5);
}

.crosshair::before {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.crosshair::after {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

/* 图层控制 - 居中模态框样式 */
.layer-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    width: 95%;
    max-width: 900px;
    max-height: 75vh;
    background: rgba(20, 25, 35, 0.98);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.layer-panel::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.layer-panel.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.layer-panel.open::before {
    opacity: 1;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px 16px 0 0;
}

.panel-header h3 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-panel {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.2s;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.close-panel:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: rgba(66, 139, 202, 0.5) transparent;
}

.panel-content::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background-color: rgba(66, 139, 202, 0.5);
    border-radius: 4px;
}

/* 单层模式信息 */
.single-mode-info {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    background: linear-gradient(135deg,
    rgba(66, 139, 202, 0.3),
    rgba(52, 152, 219, 0.2));
    border-radius: 10px;
    font-size: 15px;
    display: block;
    text-align: center;
    border: 1px solid rgba(66, 139, 202, 0.3);
}

/* 网格布局样式 - 突出图片 */
.layer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* 图层卡片 - 突出图片设计（保留所有18个图层的背景图路径） */
.layer-card {
    position: relative;
    border-radius: 16px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    /*height: 80px;*/
    /*width: 180px;*/
    /*width: ;*/
    box-sizing: border-box;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* 每个图层的背景图片 */
.layer-card[data-index="0"] {
    background-image: url("图层图标/星图地球.png");
}

.layer-card[data-index="1"] {
    background-image: url("图层图标/天地图.png");
}

.layer-card[data-index="2"] {
    background-image: url("图层图标/MapBox.png");
}

.layer-card[data-index="3"] {
    background-image: url("图层图标/arcgis.png");
}

.layer-card[data-index="4"] {
    background-image: url("图层图标/Mapbox.png");
}

.layer-card[data-index="5"] {
    background-image: url("图层图标/等高地图.png");
}

.layer-card[data-index="6"] {
    background-image: url("图层图标/夜景地图.png");
}

.layer-card[data-index="7"] {
    background-image: url("图层图标/船舶.png");
}

.layer-card[data-index="8"] {
    background-image: url("图层图标/锁眼.png");
}

.layer-card[data-index="9"] {
    background-image: url("图层图标/谷歌.png");
}

.layer-card[data-index="10"] {
    background-image: url("图层图标/世纪空间.png");
}

.layer-card[data-index="11"] {
    background-image: url("图层图标/吉林1号.png");
}

.layer-card[data-index="12"] {
    background-image: url("图层图标/四维.png");
}

.layer-card[data-index="13"] {
    background-image: url("图层图标/Bing.png");
}

.layer-card[data-index="14"] {
    background-image: url("");
}

.layer-card[data-index="15"] {
    background-image: url("图层图标/哨兵.png");
}

.layer-card[data-index="16"] {
    background-image: url("图层图标/锁眼.png");
}

.layer-card[data-index="17"] {
    background-image: url("图层图标/锁眼.png");
}

.layer-card[data-index="18"] {
    background-image: url("图层图标/锁眼.png");
}

.layer-card[data-index="19"] {
    background-image: url("  ");
}

/* 图层卡片覆盖层 - 轻微遮罩突出图片 */
.layer-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

/* 图层卡片内容容器 */
.layer-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
}

/* 悬停和激活状态 */
.layer-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(66, 139, 202, 0.8);
}

.layer-card:hover::before {
    background: linear-gradient(to bottom,
    rgba(66, 139, 202, 0.2) 0%,
    transparent 30%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0.9) 100%);
}

.layer-card.active {
    border-color: #3498db;
    box-shadow: 0 12px 40px rgba(52, 152, 219, 0.4);
    transform: scale(1.02);
}

.layer-card.active::before {
    background: linear-gradient(to bottom,
    rgba(52, 152, 219, 0.3) 0%,
    transparent 30%,
    rgba(0, 0, 0, 0.4) 70%,
    rgba(0, 0, 0, 0.8) 100%);
}

/* 序号图标 - 小巧设计 */
.layer-icon {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 图层信息 - 底部显示 */
.layer-card-info {
    margin-top: auto;
    padding-top: 12px;
}

.layer-card-name {
    color: white;
    font-weight: 700;
    margin: 0 0 8px 0;
    font-size: 18px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
}

.layer-card-desc {
    color: rgba(255, 255, 255, 0.95);
    font-size: 13px;
    margin: 0 0 12px 0;
    line-height: 1.4;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* 图层操作按钮 */
.layer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.layer-action-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    min-width: 60px;
}

.select-layer {
    background: rgba(52, 152, 219, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.select-layer:hover {
    background: rgba(52, 152, 219, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

/* 地图控制按钮 - 右下角 */
.map-controls {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(20, 25, 35, 0.9);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(30, 40, 55, 0.95);
}

.map-control-btn.active {
    background: #2EBA68 !important;
    color: white !important;
}

/* 全景按钮 - 左上角 */
.qj-controls {
    position: absolute;
    top: 20px;
    left: 24px;
    z-index: 100;
}

.aqj-controls {
    position: absolute;
    top: 20px;
    left: 236px;
    z-index: 100;
    display: none;
}
/* 农田全景 */
.nqj-controls {
    position: absolute;
    top: 20px;
    left: 150px;
    z-index: 100;
}

/* 全景按钮样式 */
.qj-btn {
    width: auto;
    height: 48px;
    border-radius: 15px;
    background: #fff;
    color: rgba(52, 152, 219, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    padding: 0 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.qj-btn:hover {
    background: linear-gradient(135deg,
    rgba(52, 152, 219, 1),
    rgba(66, 139, 202, 1));
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

/* 登录按钮 - 右上角 */
.login-controls {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 888;
    display: flex;
    align-items: center;
}

/* 登录按钮样式 */
.login-btn {
    width: auto;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(135deg,
    rgba(59, 130, 246, 1),
    rgba(37, 99, 235, 1));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    padding: 0 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 12px;
}

.login-btn:hover {
    background: linear-gradient(135deg,
    rgba(37, 99, 235, 1),
    rgba(29, 78, 216, 1));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* 个人中心按钮样式 */
.user-center-btn {
    background: linear-gradient(135deg,
    rgba(16, 185, 129, 1),
    rgba(5, 150, 105, 1));
    margin-right: 0;
}

.user-center-btn:hover {
    background: linear-gradient(135deg,
    rgba(5, 150, 105, 1),
    rgba(4, 120, 87, 1));
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.logined-btn {
    width: auto;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(135deg,
    rgba(59, 130, 246, 0.9),
    rgba(37, 99, 235, 0.9));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    padding: 0 24px;
    backdrop-filter: blur(10px);
    margin-right: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logined-btn:hover {
    background: linear-gradient(135deg,
    rgba(37, 99, 235, 0.9),
    rgba(29, 78, 216, 0.9));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

/* 图层按钮特殊样式 */
#layerToggle {
    background: linear-gradient(135deg,
    rgba(20, 25, 35, 0.9),
    rgba(20, 25, 35, 0.9));
    /*background: linear-gradient(135deg, rgba(52, 152, 219, 0.9), rgba(66, 139, 202, 0.9));*/
    color: white;
}

#layerToggle:hover {
    background: linear-gradient(135deg,
    rgba(46, 204, 113, 1),
    rgba(39, 174, 96, 1));
    /*background: linear-gradient(135deg, rgba(52, 152, 219, 1), rgba(66, 139, 202, 1));*/
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.4);
}

/* 路网按钮样式 */
#roadNetworkToggle {
    /*background: linear-gradient(135deg, rgba(46, 204, 113, 0.9), rgba(39, 174, 96, 0.9));*/
    color: white;
}

#roadNetworkToggle:hover {
    /*background: linear-gradient(135deg, rgba(46, 204, 113, 1), rgba(39, 174, 96, 1));*/
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(35, 47, 38, 0.4);
}

/* 绘图按钮样式 */
#drawingToggle {
    /*background: linear-gradient(135deg, rgba(241, 196, 15, 0.9), rgba(243, 156, 18, 0.9));*/
    color: white;
}

#drawingToggle:hover {
    /*background: linear-gradient(135deg, rgba(241, 196, 15, 1), rgba(243, 156, 18, 1));*/
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(45, 43, 28, 0.4);
}

#drawingToggle.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5),
    0 10px 30px rgba(213, 205, 181, 0.4);
}

/* 3D视图样式 */
.map-3d .map-container {
    transform: scale(1.1) rotateX(15deg);
    transform-origin: center bottom;
    transition: transform 1s ease;
}

/* 加载指示器 */
.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    background: rgba(20, 25, 35, 0.95);
    color: white;
    padding: 16px 32px;
    border-radius: 10px;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.loading-indicator.show {
    display: block;
}

/* 错误提示框 */
.error-message {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    display: none;
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.error-message.success {
    background: rgba(46, 204, 113, 0.95);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

.error-message.show {
    display: block;
    animation: slidein 0.5s, slideout 0.5s 4.5s;
}

@keyframes slidein {
    from {
        top: -50px;
        opacity: 0;
    }

    to {
        top: 24px;
        opacity: 1;
    }
}

@keyframes slideout {
    from {
        top: 24px;
        opacity: 1;
    }

    to {
        top: -50px;
        opacity: 0;
    }
}

/* 地图信息显示 */
.map-info {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    z-index: 101;
    background: rgba(20, 25, 35, 0.9);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.map-info-2 {
    bottom: 24px;
    /*left: 24px;*/
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 搜索按钮 */
#search-visibility {
    width: auto;
    height: 48px;
    border-radius: 15px;
    background: linear-gradient(135deg,
    rgba(231, 76, 60, 0),
    rgba(192, 57, 43, 0));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    padding: 0 24px;
    backdrop-filter: blur(10px);
    /*border: 1px solid rgba(255,255,255,0.1);*/
    transform: translateX(-100px);
    /* 向左移动10px */
}

.search-visibility {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 99;
}

/* 搜索框 */
.search-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 50%;
    max-width: 300px;
    display: flex;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    /*font-size: 1px;*/
    /*height: 4%;*/
    /*visibility: hidden;*/
    /*visibility: hidden;  !* 默认隐藏 *!*/
    /*opacity: 0;          !* 默认透明 *!*/
}

/*.search-container.show{*/
/*    visibility: visible;  !* 显示元素 *!*/
/*    opacity: 1;           !* 变为不透明 *!*/
/*    transition: opacity 0.3s ease, visibility 0s;  !* 取消延迟 *!*/
/*}*/

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 14px;
    background: rgba(20, 25, 35, 0.9);
    color: white;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-button {
    background: linear-gradient(135deg,
    rgba(52, 152, 219, 0.9),
    rgba(66, 139, 202, 0.9));
    color: white;
    border: none;
    padding: 0 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    /*font-size: px;*/
}

.search-button:hover {
    background: linear-gradient(135deg,
    rgba(52, 152, 219, 1),
    rgba(66, 139, 202, 1));
}

/* 搜索结果面板 */
.search-results {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 90%;
    max-width: 600px;
    background: rgba(20, 25, 35, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-height: 350px;
    overflow-y: auto;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 16px 20px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-result-item .search-result-item-name {
    font-weight: 600;
    font-size: 16px;
}

.search-result-item .search-result-item-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: rgba(52, 152, 219, 0.3);
}

.search-result-item .title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 15px;
}

.search-result-item .address {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.search-message {
    padding: 20px;
    color: white;
    text-align: center;
    font-weight: 500;
}

/* 绘图控制面板 */
.drawing-controls {
    position: absolute;
    bottom: 24px;
    right: 84px;
    z-index: 1000;
    background: rgba(20, 25, 35, 0.9);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    flex-direction: column;
    gap: 16px;
}

.drawing-controls.show {
    display: flex;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-label {
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.color-options {
    display: flex;
    gap: 8px;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid transparent;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.stroke-control {
    width: 100%;
}

.stroke-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
}

.stroke-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f1c40f;
    cursor: pointer;
}

.stroke-value {
    color: white;
    font-size: 12px;
    text-align: center;
    margin-top: 4px;
}

.clear-drawing {
    background: rgba(231, 76, 60, 0.8);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.clear-drawing:hover {
    background: rgba(231, 76, 60, 1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .map-info-2 {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .search-container {
        top: 80px;
        width: 95%;
    }

    .search-results {
        top: 130px;
        width: 95%;
    }

    .layer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .layer-card {
        /*height: 160px;*/
    }

    .layer-card-content {
        padding: 12px;
    }

    .layer-card-name {
        font-size: 16px;
    }

    .layer-card-desc {
        font-size: 12px;
    }

    .layer-panel {
        width: 98%;
        max-height: 95vh;
        border-radius: 12px;
    }

    .panel-content {
        padding: 16px;
    }

    .map-controls {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .map-control-btn {
        width: 44px;
        height: 44px;
        font-size: 14px;
    }

    .drawing-controls {
        bottom: 88px;
        right: 20px;
        width: 200px;
    }

    /* 登录按钮移动端调整 */
    .login-controls {
        top: 20px;
        right: 20px;
    }

    .login-btn {
        font-size: 14px;
        height: 44px;
        padding: 0 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .layer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .layer-card {
        height: 120px;
    }
}

@media (min-width: 1025px) {
    .layer-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .layer-card {
        height: 160px;
    }
}

@media (min-width: 1400px) {
    .layer-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 全屏模态框，用于加载 model.html */
.fullscreen-modal {
    position: fixed;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0; */
    width: 100vw;
    height: 100vh;
    /*background: rgba(10, 12, 16, 0.95);*/
    z-index: 2000;
    display: none;
    align-items: stretch;
    justify-content: center;
    /*overflow: hidden;*/
    border-radius: 10px;
    /*background: rgb(26, 26, 26);*/
}

.fullscreen-modal.open {
    display: flex;
    /*width: 500px;*/
}

/* 模态框内容容器（包含关闭按钮与 iframe） */
.fullscreen-modal .modal-content {
    top: 10%;
    display: flex;
    position: relative;
    width: 50%;
    height: 70%;
    background: transparent;
    flex-direction: column;
    border-radius: 25px;
    overflow: hidden;
    /*background-color: rgb(26, 26, 26);*/
}

/* 右上角关闭按钮 */
.fullscreen-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
    transition: transform 0.12s ease, background 0.12s;
}

.fullscreen-modal .modal-close:hover {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.16);
}

/* iframe 全尺寸填充 */
.fullscreen-modal iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background-color: rgb(26, 26, 26);
}

/* 模态对话框容器 */
.modal {
    display: none;
    /* 默认隐藏 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明背景 */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* 对话框内容 */
.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    /*max-width: 900px;*/
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 对话框头部 */
.dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.dialog-header h2 {
    margin: 0;
    font-size: 16px;
}

.dialog-header button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.dialog-header button img {
    width: 20px;
    height: 20px;
}

/* 对话框主体 */
.dialog-body {
    /* padding: 16px; */
    flex: 1;
}

.dialog-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 显示模态对话框 */
.modal.open {
    display: flex;
}


/* 双屏模式图层控制 */
.split-screen-layer-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(20, 25, 35, 0.9);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.split-screen-layer-btn:hover {
    background: rgba(30, 40, 55, 0.95);
    transform: translateY(-2px);
}

/* 双屏模式图层列表 */
.split-screen-layer-list {
    position: absolute;
    top: 60px;
    right: 20px;
    z-index: 1000;
    background: rgba(20, 25, 35, 0.95);
    border-radius: 12px;
    padding: 12px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    min-width: 180px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.split-screen-layer-list.show {
    display: block;
}

.split-screen-layer-item {
    padding: 10px 15px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 14px;
}

.split-screen-layer-item:hover {
    background: rgba(52, 152, 219, 0.3);
}

.split-screen-layer-item.active {
    background: rgba(52, 152, 219, 0.5);
    font-weight: 600;
}

/* 双屏模式缩放级别显示 */
.split-screen-zoom-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    background: rgba(20, 25, 35, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    pointer-events: none;
}


/* 测绘按钮样式 */
.measure-controls {
    position: absolute;
    top: 80px;
    /* 在农田按钮下方 */
    left: 24px;
    z-index: 100;
}

/* 主测绘按钮 */
.measure-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.measure-btn:hover {
    background: linear-gradient(135deg,
    rgba(46, 204, 113, 0.9),
    rgba(39, 174, 96, 0.9));
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.measure-btn.active {
    background: linear-gradient(135deg,
    rgba(46, 204, 113, 0.9),
    rgba(39, 174, 96, 0.9));
    color: #fff;
}

/* 子菜单容器 */
.measure-submenu {
    position: absolute;
    top: 5px;
    left: 60px;
    background: rgba(20, 25, 35, 0.95);
    border-radius: 25px;
    /*padding: 8px;*/
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: none;
    flex-direction: row;
    gap: 8px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.measure-submenu.show {
    display: flex;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 子菜单按钮 */
.measure-submenu-btn {
    background: transparent;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.measure-submenu-btn:hover {
    background: rgba(255, 107, 107, 0.3);
}

.measure-submenu-btn.active {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
}

.measure-submenu-btn svg {
    width: 18px;
    height: 18px;
}

/* 测量标签样式 */
.leaflet-measure-label {
    background: rgba(20, 25, 35, 0.9);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.leaflet-draw-tooltip {
    background: rgba(20, 25, 35, 0.9) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* 自定义绘制样式 */
.leaflet-draw-actions {
    background: rgba(20, 25, 35, 0.9) !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-draw-actions a {
    color: #fff !important;
}

.leaflet-div-icon {
    background: #fff;
    border: 1px solid #fffefe;
    border-radius: 50%;
}

/* 隐藏 Leaflet.draw 默认控制栏 */
.leaflet-draw {
    display: none !important;
}

.leaflet-top.leaflet-left .leaflet-draw-toolbar {
    display: none !important;
}

.leaflet-draw-section {
    display: none !important;
}