* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}
#container {
    display: flex;
    flex-direction: row; /* 默认PC端布局 */
    width: 100%;
    height: 100%;
}

/* ========== 移动端抽屉菜单样式 ========== */
/* 菜单开关按钮 */
.menu-toggle-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1600;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a5f;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    touch-action: manipulation;
}

.menu-toggle-btn:hover {
    background: white;
    color: #2BB781;
}

/* 遮罩层 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1550;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== 左侧控制面板 (抽屉式) ========== */
.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 24px 20px;
    box-shadow: 2px 0 16px rgba(0,0,0,0.03);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f8f9fa;
    z-index: 1560;
    transition: transform 0.3s ease;
}

/* 移动端样式 */
@media (max-width: 767px) {
    #container {
        flex-direction: row; /* 保持行布局 */
    }
    
    /* 默认隐藏侧边栏 */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%;
        max-width: 300px;
        transform: translateX(-100%);
        padding: 16px;
        box-shadow: 2px 0 20px rgba(0,0,0,0.15);
        max-height: 100%;
    }
    
    /* 显示侧边栏 */
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* 显示菜单按钮 */
    .menu-toggle-btn {
        display: flex;
    }
}

/* PC端样式 */
@media (min-width: 768px) {
    /* 隐藏菜单按钮 */
    .menu-toggle-btn {
        display: none;
    }
    .search-row{
        max-height: 48px;
    }
    /* 固定显示侧边栏 */
    .sidebar {
        transform: translateX(0) !important;
    }
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.logo {
    text-align: center;
    width: 100%;
    margin-bottom: 12px; /* 移动端减小间距 */
}

.logo img {
    max-width: 120px; /* 移动端缩小logo */
    transition: transform 0.2s ease;
}

/* 桌面端恢复logo大小 */
@media (min-width: 768px) {
    .logo img {
        max-width: 160px;
    }
    .logo {
        margin-bottom: 20px;
    }
}

.logo img:hover {
    transform: scale(1.02);
}

.subhead {
    color: #6c757d;
    font-size: 0.75rem; /* 移动端缩小 */
    text-align: center;
    margin-bottom: 8px;
}

.section {
    margin-bottom: 12px; /* 移动端减小间距 */
    transition: box-shadow 0.2s ease;
}

.section:hover {
    box-shadow: 0 4px 12px rgba(43, 183, 129, 0.06);
    border-color: #e6f7f0;
}

.section-title {
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 12px; /* 移动端减小间距 */
    font-size: 0.85rem; /* 移动端缩小 */
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
    padding-bottom: 6px;
    border-bottom: 1px dashed #4CAF50;
}

/* 桌面端恢复标题样式 */
@media (min-width: 768px) {
    .section {
        margin-bottom: 16px;
    }
    .section-title {
        font-size: 0.95rem;
        margin-bottom: 16px;
        padding-bottom: 8px;
    }
    .subhead {
        font-size: 0.8rem;
    }
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 14px; /* 移动端缩小 */
    background: #2BB781;
    border-radius: 3px;
}

.province-list, .city-list, .district-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px; /* 移动端减小间距 */
}

.province-list a, .city-list a, .district-list a {
    padding: 5px 12px; /* 移动端减小内边距 */
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 30px;
    font-size: 0.75rem; /* 移动端缩小字体 */
    color: #495057;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
    font-weight: 400;
    width: 100%; /* 移动端宽度100% */
    max-width: 120px; /* 限制最大宽度 */
    margin: 0 auto; /* 居中 */
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    touch-action: manipulation; /* 优化移动端触摸 */
}

/* 桌面端恢复按钮样式 */
@media (min-width: 768px) {
    .province-list, .city-list, .district-list {
        gap: 8px;
    }
    .province-list a, .city-list a, .district-list a {
        padding: 6px 16px;
        font-size: 0.85rem;
        line-height: 1.5;
        width: 120px;
    }
}

.province-list a:hover, .city-list a:hover, .district-list a:hover {
    background: #f0fdf9;
    border-color: #2BB781;
    color: #2BB781;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(43, 183, 129, 0.12);
}

.province-list a.active, .city-list a.active, .district-list a.active {
    background: #2BB781;
    border-color: #2BB781;
    color: white !important;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(43, 183, 129, 0.25);
}

.city-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e7f1ff 100%);
    padding: 6px 12px; /* 移动端减小内边距 */
    border-radius: 30px;
    margin-bottom: 12px; /* 移动端减小间距 */
    color: #0b4b6f;
    font-weight: 600;
    font-size: 0.75rem; /* 移动端缩小字体 */
    text-align: center;
    border-left: 3px solid #2BB781;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.district-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e7f1ff 100%);
    padding: 6px 12px; /* 移动端减小内边距 */
    border-radius: 30px;
    margin-bottom: 12px; /* 移动端减小间距 */
    color: #0b4b6f;
    font-weight: 600;
    font-size: 0.75rem; /* 移动端缩小字体 */
    text-align: center;
    border-left: 3px solid #2BB781;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
/* 桌面端恢复城市头部样式 */
@media (min-width: 768px) {
    .city-header,.district-header {
        padding: 8px 16px;
        margin-bottom: 16px;
        font-size: 0.85rem;
    }
    
}

/* 空状态样式 */
.section:empty {
    display: none;
}

/* 添加省份数量徽章（可选） */
.province-list a {
    position: relative;
}

/* 优化焦点状态 */
.province-list a:focus-visible, .city-list a:focus-visible {
    outline: 2px solid #2BB781;
    outline-offset: 2px;
}

/* 美化禁用状态 */
.province-list a.disabled, .city-list a.disabled {
    opacity: 0.5;
    pointer-events: none;
    background: #f8f9fa;
}

/* ========== 右侧地图 ========== */
.map-container {
    flex: 1;
    position: relative;
    background: #0b1a2a;
    min-height: 0; /* 修复flex布局高度问题 */
}
#map {
    width: 100%;
    height: 100%;
}

/* ===== 地图模式切换按钮组 (重点移动端优化) ===== */
.map-mode-switcher {
    position: absolute;
    bottom: 12px; /* 移动端上移，避免被虚拟按键遮挡 */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    display: flex;
    gap: 4px; /* 移动端进一步减小间距 */
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    padding: 3px; /* 移动端减小内边距 */
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.8);
    width: calc(100% - 24px); /* 移动端自适应宽度 */
    max-width: 320px; /* 限制最大宽度 */
    justify-content: center; /* 按钮居中 */
}

/* 桌面端恢复切换按钮样式 */
@media (min-width: 768px) {
    .map-mode-switcher {
        bottom: 16px;
        gap: 8px;
        padding: 6px;
        width: auto; /* 桌面端自动宽度 */
        max-width: none;
    }
}

.mode-btn {
    padding: 4px 10px; /* 移动端进一步减小内边距 */
    border: none;
    border-radius: 30px;
    background: transparent;
    color: #495057;
    font-size: 0.7rem; /* 移动端进一步缩小字体 */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 3px; /* 移动端减小图标与文字间距 */
    touch-action: manipulation;
    flex: 1; /* 移动端按钮均分宽度 */
    justify-content: center; /* 内容居中 */
    min-height: 32px; /* 保证点击区域大小 */
    white-space: nowrap; /* 防止文字换行 */
}

/* 桌面端恢复按钮样式 */
@media (min-width: 768px) {
    .mode-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
        gap: 6px;
        flex: none; /* 桌面端取消均分 */
        min-height: auto;
    }
}

/* 按钮图标优化 */
.mode-btn i {
    font-size: 0.75rem; /* 移动端图标大小适配 */
    margin-right: 2px; /* 图标与文字间距 */
}

/* 桌面端图标大小 */
@media (min-width: 768px) {
    .mode-btn i {
        font-size: 0.85rem;
        margin-right: 4px;
    }
}

.mode-btn:hover {
    background: #e7f1ff;
    color: #2BB781;
}

/* 激活状态强化 */
.mode-btn.active {
    background: #2BB781;
    color: white;
    box-shadow: 0 2px 6px rgba(43, 183, 129, 0.25);
}

/* 移动端激活状态额外优化 */
@media (max-width: 767px) {
    .mode-btn.active {
        font-weight: 600; /* 加粗激活状态文字 */
    }
}

/* ===== 地图左上角工具栏 (移动端优化) ===== */
.map-toolbar {
    position: absolute;
    top: 12px; /* 移动端上移 */
    left: 60px; /* 移动端避开菜单按钮 */
    right: 12px;
    z-index: 1501;
    display: flex;
    flex-wrap: wrap; /* 移动端允许换行 */
    gap: 8px;
    background: transparent;
    pointer-events: none;
    justify-content: flex-start;
}

/* 桌面端恢复工具栏位置 */
@media (min-width: 768px) {
    .map-toolbar {
        top: 16px;
        left: 16px;
        right: auto;
        transform: none;
        width: auto;
        flex-wrap: nowrap;
    }
}

.toolbar-row {
    display: flex;
    gap: 6px; /* 移动端减小间距 */
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    padding: 6px 12px; /* 移动端减小内边距 */
    border-radius: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.8);
    align-items: center;
    pointer-events: auto;
}

/* 桌面端恢复工具栏行样式 */
@media (min-width: 768px) {
    .toolbar-row {
        gap: 8px;
        padding: 8px 16px;
    }
    .toolbar-row.distance-result{
        width: 80%;
    }
    .distance-stats{
        width: 100%!important;
    }
}

.toolbar-row.distance-result {
    background: rgba(77,176,79,0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    padding: 10px 12px;
width: fit-content;
    z-index: 9999;
    white-space: nowrap;
    position: absolute;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
}

.map-btn {
    padding: 5px 12px; /* 移动端减小内边距 */
    border: none;
    border-radius: 40px;
    background: white;
    color: #1e3a5f;
    font-size: 0.75rem; /* 移动端缩小字体 */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px; /* 移动端减小间距 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid #dee2e6;
    pointer-events: auto;
    touch-action: manipulation;
}

/* 桌面端恢复按钮样式 */
@media (min-width: 768px) {
    .map-btn {
        padding: 6px 16px;
        font-size: 0.85rem;
        gap: 6px;
    }
    .toolbar-row.distance-result {
        padding: 15px 16px;
       
    }
}

.map-btn:hover {
    background: #e7f1ff;
    border-color: #2BB781;
}
.map-btn.active {
    background: #2BB781;
    border-color: #2BB781;
    color: white;
}
.map-btn.danger {
    background: white;
    color: #fa5252;
    border-color: #ffc9c9;
}
.map-btn.danger:hover {
    background: #fff5f5;
    border-color: #fa5252;
}

/* 测距结果卡片 (移动端优化) */
.distance-stats {
    display: flex;
    align-items: center;
    gap: 10px; /* 移动端减小间距 */
    color: white;
}

/* 桌面端恢复间距 */
@media (min-width: 768px) {
    .distance-stats {
        gap: 16px;
    }
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 3px; /* 移动端减小间距 */
}
.stat-label {
    font-size: 0.68rem; /* 移动端缩小字体 */
    color: #FFEB3B;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-number {
    font-size: 0.9rem; /* 移动端缩小字体 */
    font-weight: 700;
    font-family: 'Courier New', monospace;
    color: white;
}
.stat-unit {
    font-size: 0.68rem; /* 移动端缩小字体 */
    color: #FFEB3B;
    margin-left: 2px;
}

/* 桌面端恢复统计文字大小 */
@media (min-width: 768px) {
    .stat-item {
        gap: 4px;
    }
    .stat-label {
        font-size: 0.7rem;
    }
    .stat-number {
        font-size: 1rem;
    }
    .stat-unit {
        font-size: 0.65rem;
    }
}

.distance-tip-toolbar a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255,255,255,0.5);
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.65rem; /* 移动端缩小字体 */
}
.distance-tip-toolbar a:hover {
    color: #ffd966;
    text-decoration-color: #ffd966;
}
.distance-tip-toolbar {
    font-size: 0.65rem; /* 移动端缩小字体 */
    color: #e9ecef;
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 8px; /* 移动端减小内边距 */
    font-style: italic;
}

/* 桌面端恢复提示文字样式 */
@media (min-width: 768px) {
    .distance-tip-toolbar {
        font-size: 0.7rem;
        padding-left: 12px;
    }
    .distance-tip-toolbar a {
        font-size: 0.7rem;
    }
}

.hidden {
    display: none !important;
}

/* 经纬度卡片 (移动端优化) */
.compact-coord-card {
    position: relative;
    width: calc(100% - 24px); /* 移动端自适应宽度 */
    max-width: 360px; /* 限制最大宽度 */
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    border-top: 4px solid #009688;
    padding: 12px 12px 10px; /* 移动端减小内边距 */
    pointer-events: auto;
}

/* 桌面端恢复卡片宽度 */
@media (min-width: 768px) {
    .compact-coord-card {
        width: 360px;
        padding: 14px 14px 12px;
    }
}

.card-close-btn {
    position: absolute;
    top: 6px; /* 移动端上移 */
    right: 8px; /* 移动端左移 */
    width: 22px; /* 移动端缩小 */
    height: 22px; /* 移动端缩小 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    background: transparent;
    border: none;
    font-size: 13px; /* 移动端缩小 */
    touch-action: manipulation;
}

/* 桌面端恢复关闭按钮 */
@media (min-width: 768px) {
    .card-close-btn {
        top: 8px;
        right: 10px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }
}

.card-close-btn:hover {
    background: #f1f3f5;
    color: #495057;
}

.compact-title {
    font-weight: 600;
    color: #1e3a5f;
    font-size: 0.85rem; /* 移动端缩小 */
    margin-bottom: 10px; /* 移动端减小间距 */
    padding-right: 20px;
    display: flex;
    align-items: center;
    gap: 5px; /* 移动端减小间距 */
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 6px; /* 移动端减小间距 */
}

/* 桌面端恢复标题样式 */
@media (min-width: 768px) {
    .compact-title {
        font-size: 0.9rem;
        margin-bottom: 12px;
        gap: 6px;
        padding-bottom: 8px;
    }
}

.coord-compact-grid {
    display: grid;
    grid-template-columns: 1fr; /* 移动端改为单列 */
    gap: 8px; /* 移动端减小间距 */
    margin-bottom: 10px; /* 移动端减小间距 */
}

/* 桌面端恢复网格布局 */
@media (min-width: 768px) {
    .coord-compact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-bottom: 12px;
    }
}

.coord-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 8px 6px; /* 移动端减小内边距 */
    border: 1px solid #e9ecef;
}

/* 桌面端恢复坐标项样式 */
@media (min-width: 768px) {
    .coord-item {
        padding: 10px 8px;
    }
}

.coord-item-header {
    display: flex;
    align-items: center;
    gap: 5px; /* 移动端减小间距 */
    color: #6c757d;
    font-size: 0.65rem; /* 移动端缩小字体 */
    margin-bottom: 5px; /* 移动端减小间距 */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 桌面端恢复头部样式 */
@media (min-width: 768px) {
    .coord-item-header {
        gap: 6px;
        font-size: 0.7rem;
        margin-bottom: 6px;
    }
}

.coord-item-header i {
    font-size: 0.7rem; /* 移动端缩小图标 */
    color: #2BB781;
}

/* 桌面端恢复图标大小 */
@media (min-width: 768px) {
    .coord-item-header i {
        font-size: 0.75rem;
    }
}

.coord-value-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px; /* 移动端减小间距 */
}
.coord-value-row:last-child {
    margin-bottom: 0;
}

.coord-label-small {
    color: #868e96;
    font-size: 0.65rem; /* 移动端缩小字体 */
}

.coord-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #0a58ca;
    font-size: 0.75rem; /* 移动端缩小字体 */
}

/* 桌面端恢复坐标文字大小 */
@media (min-width: 768px) {
    .coord-label-small {
        font-size: 0.7rem;
    }
    .coord-number {
        font-size: 0.8rem;
    }
    .coord-value-row {
        margin-bottom: 6px;
    }
}

.mini-copy-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    padding: 3px 8px; /* 移动端减小内边距 */
    font-size: 0.6rem; /* 移动端缩小字体 */
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 3px; /* 移动端减小间距 */
    margin-top: 6px; /* 移动端减小间距 */
    width: 100%;
    justify-content: center;
    touch-action: manipulation;
}

/* 桌面端恢复复制按钮样式 */
@media (min-width: 768px) {
    .mini-copy-btn {
        padding: 4px 10px;
        font-size: 0.65rem;
        gap: 4px;
        margin-top: 8px;
    }
}

.mini-copy-btn:hover {
    background: #e7f1ff;
    border-color: #2BB781;
    color: #2BB781;
}
.mini-copy-btn i {
    font-size: 0.65rem; /* 移动端缩小图标 */
}

/* 桌面端恢复图标大小 */
@media (min-width: 768px) {
    .mini-copy-btn i {
        font-size: 0.7rem;
    }
}

.copy-all-compact {
    background: #009688;
    color: white;
    border: none;
    padding: 6px 10px; /* 移动端减小内边距 */
    font-size: 0.7rem; /* 移动端缩小字体 */
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px; /* 移动端减小间距 */
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    touch-action: manipulation;
}

/* 桌面端恢复复制全部按钮 */
@media (min-width: 768px) {
    .copy-all-compact {
        padding: 8px 12px;
        font-size: 0.75rem;
        gap: 6px;
    }
}

.copy-all-compact:hover {
    background: #00796b;
}
.copy-all-compact i {
    font-size: 0.7rem; /* 移动端缩小图标 */
}

/* 桌面端恢复图标大小 */
@media (min-width: 768px) {
    .copy-all-compact i {
        font-size: 0.75rem;
    }
}

.toast-message {
    position: absolute;
    top: 16px; /* 移动端上移 */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 6px 14px; /* 移动端减小内边距 */
    border-radius: 40px;
    font-size: 0.75rem; /* 移动端缩小字体 */
    z-index: 99999999;
    backdrop-filter: blur(4px);
    animation: fadeInOut 1.5s ease;
    max-width: calc(100% - 24px); /* 移动端限制宽度 */
    text-align: center;
}

/* 桌面端恢复提示框样式 */
@media (min-width: 768px) {
    .toast-message {
        top: 20px;
        padding: 8px 18px;
        font-size: 0.8rem;
        z-index: 99999999;
        max-width: none;
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}


@media (max-width: 768px) {
    .compact-coord-card{
        max-width: 220px;
    }
}



/* ========== 移动端卡片完全重写 ========== */
@media (max-width: 768px) {
    /* 移除原有InfoWindow，使用自定义浮动卡片 */
    .tmap-info-window {
        display: none !important; /* 隐藏腾讯地图原生的InfoWindow */
    }
    
    /* 自定义移动端卡片容器 */
    .mobile-coord-card-fixed {
        position: fixed !important;
        bottom: 80px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 72vw !important;
        max-width: 320px !important;
        background: white !important;
        border-radius: 24px !important;
        box-shadow: 0 8px 30px rgba(0,0,0,0.3) !important;
        border-top: 4px solid #009688 !important;
        padding: 18px 16px 16px !important;
        z-index: 10000 !important;
        pointer-events: auto !important;
        animation: slideUp 0.25s ease;
    }
    
    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
    
    /* 卡片关闭按钮 */
    .mobile-card-close {
        position: absolute !important;
        top: 12px !important;
        right: 12px !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        background: #f8f9fa !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #495057 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    }
    
    .mobile-card-close:active {
        background: #e9ecef !important;
        transform: scale(0.95) !important;
    }
    
    /* 卡片标题 */
    .mobile-card-title {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        color: #1e3a5f !important;
        margin-bottom: 16px !important;
        padding-right: 30px !important;
        border-bottom: 1px solid #e9ecef !important;
        padding-bottom: 12px !important;
    }
    
    /* 坐标网格 - 移动端堆叠 */
    .mobile-coord-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
    }
    
    /* 坐标卡片项 */
    .mobile-coord-item {
        background: #f8f9fa !important;
        border-radius: 16px !important;
        padding: 14px 12px !important;
        border: 1px solid #e9ecef !important;
    }
    
    .mobile-coord-header {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        color: #2BB781 !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        margin-bottom: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    
    .mobile-coord-row {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 10px !important;
        padding: 4px 0 !important;
    }
    
    .mobile-coord-label {
        color: #6c757d !important;
        font-size: 0.85rem !important;
    }
    
    .mobile-coord-value {
        font-family: 'Courier New', monospace !important;
        font-weight: 600 !important;
        color: #0a58ca !important;
        font-size: 0.95rem !important;
        background: white !important;
        padding: 4px 10px !important;
        border-radius: 20px !important;
        border: 1px solid #dee2e6 !important;
    }
    
    /* 移动端复制按钮 - 大点击区域 */
    .mobile-copy-btn {
        width: 100% !important;
        padding: 5px 12px !important;
        background: white !important;
        border: 1px solid #2BB781 !important;
        border-radius: 30px !important;
        color: #2BB781 !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 8px !important;
        transition: all 0.2s !important;
        touch-action: manipulation !important;
    }
    
    .mobile-copy-btn i {
        font-size: 1rem !important;
    }
    
    .mobile-copy-btn:active {
        background: #2BB781 !important;
        color: white !important;
        transform: scale(0.98) !important;
    }
    
    /* 一键复制全部按钮 */
    .mobile-copy-all {
    width: 100% !important;
    padding: 12px 16px !important;
    background: #009688 !important;
    border: none !important;
    border-radius: 30px !important;
    color: white !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 8px !important;
    touch-action: manipulation !important;
    /* min-height: 52px !important; */
    box-shadow: 0 4px 12px rgba(0,150,136,0.3) !important;
}
    
    .mobile-copy-all:active {
        background: #00796b !important;
        transform: scale(0.98) !important;
    }
    
    /* 遮罩层 */
    .mobile-card-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 9999 !important;
        pointer-events: auto !important;
        animation: fadeIn 0.2s ease;
    }
    
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
    
    /* 临时禁用地图点击 */
    .map-disabled {
        pointer-events: none !important;
    }
}
 /* 修复移动端卡片交互样式 */
        .compact-coord-card * {
            pointer-events: auto !important;
        }
        .compact-coord-card {
            pointer-events: auto !important;
            user-select: auto !important;
            -webkit-user-select: auto !important;
        }
        .card-close-btn, .mini-copy-btn, .copy-all-compact {
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }
        .toast-message {
            z-index: 9999999 !important;
        }
        
        /* 移动端卡片样式 */
        .mobile-card-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 9999;
            pointer-events: auto;
            animation: fadeIn 0.2s ease;
        }
        
        .mobile-coord-card-fixed {
            position: fixed;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            width: 92vw;
            max-width: 380px;
            background: white;
            border-radius: 24px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.3);
            border-top: 4px solid #009688;
            padding: 18px 16px 16px;
            z-index: 10000;
            pointer-events: auto;
            animation: slideUp 0.25s ease;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .mobile-card-close {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #f8f9fa;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #495057;
            font-size: 16px;
            cursor: pointer;
            z-index: 10001;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            -webkit-tap-highlight-color: transparent;
        }
        
        .mobile-card-close:active {
            background: #e9ecef;
            transform: scale(0.95);
        }
        
        .mobile-card-title {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 1rem;
            font-weight: 600;
            color: #1e3a5f;
            margin-bottom: 16px;
            padding-right: 30px;
            border-bottom: 1px solid #e9ecef;
            padding-bottom: 12px;
        }
        
        .mobile-coord-grid {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 16px;
        }
        
        .mobile-coord-item {
            background: #f8f9fa;
            border-radius: 16px;
            padding: 14px 12px;
            border: 1px solid #e9ecef;
        }
        
        .mobile-coord-header {
            display: flex;
            align-items: center;
            gap: 8px;
            color: #2BB781;
            font-size: 0.85rem;
            font-weight: 600;
            margin-bottom: 12px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .mobile-coord-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding: 4px 0;
        }
        
        .mobile-coord-label {
            color: #6c757d;
            font-size: 0.85rem;
        }
        
        .mobile-coord-value {
            font-family: 'Courier New', monospace;
            font-weight: 600;
            color: #0a58ca;
            font-size: 0.95rem;
            background: white;
            padding: 4px 10px;
            border-radius: 20px;
            border: 1px solid #dee2e6;
            word-break: break-all;
        }
        
        .mobile-copy-btn {
            width: 100%;
            padding: 14px 12px;
            background: white;
            border: 1px solid #2BB781;
            border-radius: 30px;
            color: #2BB781;
            font-size: 0.9rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 8px;
            transition: all 0.2s;
            touch-action: manipulation;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        
        .mobile-copy-btn:active {
            background: #2BB781;
            color: white;
            transform: scale(0.98);
        }
        
        .mobile-copy-all {
            width: 100%;
            padding: 16px;
            background: #009688;
            border: none;
            border-radius: 30px;
            color: white;
            font-size: 0.95rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-top: 8px;
            touch-action: manipulation;
            box-shadow: 0 4px 12px rgba(0,150,136,0.3);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        
        .mobile-copy-all:active {
            background: #00796b;
            transform: scale(0.98);
        }
        
        .map-disabled {
            pointer-events: none !important;
        }
        
        /* 搜索建议框样式 */
        .search-suggestion-box {
              position: absolute;
            background: white;
            border: 1px solid #e9ecef;
            border-radius: 16px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
            max-height: 300px;
            overflow-y: auto;
            z-index: 99999;
            top: 50px;
            left: 0;
            display: none;
            padding: 8px 0;
        }
        .search-suggestion-box.mobile-fixed {
            position: fixed !important;
            top: 42px !important;
            left: 16px !important;
            right: 16px !important;
        }
        .suggestion-item {
            display: flex;
            align-items: flex-start;
            padding: 12px 16px;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 1px solid #f1f3f5;
            -webkit-tap-highlight-color: transparent;
        }
        
        .suggestion-item:last-child {
            border-bottom: none;
        }
        
        .suggestion-item:active {
            background: #e6f7f0;
        }
        
        /* 清除按钮样式 */
        .clear-input-btn {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            color: #adb5bd;
            cursor: pointer;
            display: none;
            z-index: 10;
            padding: 8px;
            -webkit-tap-highlight-color: transparent;
        }
        
        .clear-input-btn:active {
            color: #495057;
        }
        
        /* 移动端适配 */
        @media (max-width: 768px) {
            .search-suggestion-box {
                position: fixed;
                top: auto !important;
                left: 16px !important;
                right: 16px !important;
                width: auto !important;
                max-height: 250px;
                box-shadow: 0 8px 24px rgba(0,0,0,0.2);
            }
            
            .suggestion-item {
                padding: 14px 16px;
            }
            
           
            
            #addressInput {
                font-size: 16px !important; /* 防止iOS缩放 */
                padding: 5px 0 !important;
            }
            
         
            
            .clear-input-btn {
                right: 10px;
                padding: 12px;
            }
            
            /* 移动端工具栏优化 */
            .map-toolbar {
                top: 10px !important;
                left: 10px !important;
                right: 10px !important;
            }
            
           
        }
        
        /* 横屏优化 */
        @media (max-height: 480px) and (orientation: landscape) {
            .search-suggestion-box {
                max-height: 200px;
            }
            
            .mobile-coord-card-fixed {
                bottom: 40px;
                max-height: 80vh;
                overflow-y: auto;
            }
        }
        
        /* 移动端菜单按钮 */
        .menu-toggle-btn {
            display: none;
        }
        
        @media (max-width: 768px) {
            .menu-toggle-btn {
                display: flex;
                z-index: 1501;
                width: 44px;
                height: 44px;
                border-radius: 50%;
                background: white;
                border: none;
                box-shadow: 0 4px 12px rgba(0,0,0,0.15);
                align-items: center;
                justify-content: center;
                color: #2BB781;
                font-size: 20px;
                cursor: pointer;
                -webkit-tap-highlight-color: transparent;
                position: fixed;
                top: 50%;
                left: 10px;
                transform: translateY(-50%);
            }
            
            .menu-toggle-btn:active {
                background: #f0fdf9;
                transform: scale(0.95);
            }
            
            .sidebar {
                position: fixed;
                top: 0;
                left: -100%;
                width: 85% !important;
                max-width: 320px;
                height: 100vh;
                z-index: 10001;
                transition: left 0.3s ease;
                box-shadow: 2px 0 20px rgba(0,0,0,0.2);
            }
            
            .sidebar.active {
                left: 0;
            }
            
            .menu-overlay {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0,0,0,0.5);
                z-index: 10000;
            }
            
            .menu-overlay.active {
                display: block;
            }
        }
        
        
        /* ===== 侧边栏基础样式 ===== */
.jl-sidebar {
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== Logo区域 ===== */
.jl-sidebar .jl-logo {
    padding: 20px 20px 16px;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
}

.jl-sidebar .jl-logo .jl-logo-img {
    max-height: 45px;
    width: auto;
    object-fit: contain;
}

/* ===== Tab切换栏 ===== */
.jl-region-tabs {
    display: flex;
    padding: 12px 16px 0;
    gap: 8px;
    border-bottom: 1px solid #f0f2f5;
}

.jl-tab-item {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease;
    position: relative;
}

.jl-tab-item:hover {
    color: #2BB781;
    background: rgba(43, 183, 129, 0.04);
}

.jl-tab-item.jl-active {
    color: #2BB781;
}

.jl-tab-item.jl-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #2BB781;
    border-radius: 2px 2px 0 0;
}

/* ===== 当前位置显示 ===== */
.jl-current-location {
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #f0f2f5;
    font-size: 13px;
}

.jl-current-location .jl-label {
    color: #64748b;
    margin-right: 4px;
}

.jl-current-location .jl-value {
    color: #1e293b;
    font-weight: 500;
}

/* ===== 区域列表容器 ===== */
.jl-region-list {
    display: none;  /* 默认隐藏 */
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.jl-region-list.jl-active {
    display: block;  /* 激活时显示 */
}

/* 自定义滚动条 */
.jl-region-list::-webkit-scrollbar {
    width: 4px;
}

.jl-region-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.jl-region-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.jl-region-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===== 列表头部 ===== */
.jl-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}

.jl-list-header .jl-title {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.jl-list-header .jl-count {
    font-size: 12px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 12px;
}

/* ===== 列表内容 - 网格布局（适合省份）===== */
.jl-list-content.jl-province-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* 普通列表（城市/区县） */
.jl-list-content:not(.jl-province-grid) {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ===== 区域项样式 ===== */
.jl-region-item {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: #334155;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: #f8fafc;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 网格布局中的区域项 */
.jl-province-grid .jl-region-item {
    text-align: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    padding: 10px 4px;
}

/* 列表布局中的区域项 */
.jl-list-content:not(.jl-province-grid) .jl-region-item {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    padding: 10px 12px;
}

/* 悬停效果 */
.jl-region-item:hover {
    background: #f0fdf4;
    border-color: #2BB781;
    color: #2BB781;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(43, 183, 129, 0.12);
}

/* 激活状态 */
.jl-region-item.jl-active {
    background: #2BB781!important;
    border-color: #2BB781!important;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(43, 183, 129, 0.3);
}

/* 网格布局中的激活项 */
.jl-province-grid .jl-region-item.jl-active {
    background: #2BB781!important;
    color: white;
}

/* ===== 区域分组样式 ===== */
.jl-region-group {
    margin-bottom: 16px;
}

.jl-region-group:last-child {
    margin-bottom: 0;
}

.jl-group-title {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    padding: 8px 0 4px;
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    letter-spacing: 0.5px;
}

/* ===== 空状态提示 ===== */
.jl-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
    background: #f8fafc;
    border-radius: 8px;
}

/* ===== 加载状态 ===== */
.jl-loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.jl-loading-state::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    border: 2px solid #e2e8f0;
    border-top-color: #2BB781;
    border-radius: 50%;
    animation: jl-spin 1s linear infinite;
}

@keyframes jl-spin {
    to { transform: rotate(360deg); }
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    .jl-sidebar {
        width: 100%;
        height: auto;
        max-height: 100vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .jl-list-content.jl-province-grid {
        grid-template-columns: repeat(4, 1fr); /* 手机上显示更多列 */
    }
    
    .jl-region-item {
        font-size: 13px;
        padding: 8px 6px;
    }
}

/* ===== 动画效果 ===== */
.jl-region-list {
    animation: jl-fadeIn 0.2s ease;
}

@keyframes jl-fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== 省份首字母快速导航（可选）===== */
.jl-quick-nav {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 8px 16px;
    border-bottom: 1px solid #f0f2f5;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jl-quick-nav-item {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: #f1f5f9;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.jl-quick-nav-item:hover {
    background: #2BB781;
    color: white;
}



/* 移动端侧边栏样式 */
@media (max-width: 768px) {

    .jl-sidebar {
        position: fixed;
        top: 0;
        left: -100%; /* 默认隐藏在左侧 */
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 99999;
        
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
        border-radius: 0 16px 16px 0;
    }
    
    .jl-sidebar.active {
        left: 0; /* 显示侧边栏 */
    }
    
    /* 遮罩层 */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        backdrop-filter: blur(3px);
        transition: opacity 0.3s ease;
    }
    
    .menu-overlay.active {
        display: block;
    }
    
    /* 侧边栏头部添加关闭按钮 */
    .jl-sidebar .jl-logo {
        position: relative;
        padding-right: 50px;
    }
    

    
    /* 调整侧边栏内部布局 */
    .jl-sidebar .jl-region-tabs {
        padding: 8px 12px 0;
    }
    
    .jl-sidebar .jl-current-location {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .jl-sidebar .jl-region-list {
        padding: 12px;
    }
    
    /* 省份网格在移动端显示4列 */
    .jl-list-content.jl-province-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .jl-province-grid .jl-region-item {
        padding: 8px 2px;
        font-size: 13px;
    }
    
    /* 城市/区县列表优化 */
    .jl-list-content:not(.jl-province-grid) .jl-region-item {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* 列表头部优化 */
    .jl-list-header {
        margin-bottom: 12px;
    }
    
    .jl-list-header .jl-title {
        font-size: 14px;
    }
    
    .jl-list-header .jl-count {
        font-size: 11px;
        padding: 2px 6px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 375px) {
    .jl-list-content.jl-province-grid {
        grid-template-columns: repeat(3, 1fr); /* 更小的屏幕显示3列 */
    }
    
    .jl-sidebar {
        width: 90%;
    }
}

/* 确保侧边栏内容可滚动 */
.jl-sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.jl-region-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
}

/* 触摸优化 */
.jl-region-item {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.jl-region-item:active {
    transform: scale(0.98); /* 触摸反馈 */
}