body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    width: 200px;
    max-width: 15%;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.area {
    padding: 0 10px;
}

.area a {
    line-height: 1.5rem;
}

/* 桌面端地区列表样式 */
@media screen and (min-width: 1016px) {
    .area {
        display: block !important;
        position: relative;
        background-color: transparent;
        padding: 0 10px;
    }

    .area.show {
        display: block !important;
    }

    .area-content {
        display: block;
    }

    .area>h3 {
        padding: 10px 0;
        margin: 0;
        font-size: 16px;
        border-bottom: 1px solid #eee;
        position: relative;
        display: block;
    }

    .area>h3 .close-btn {
        display: none;
    }

    .area-content h4 {
        margin: 15px 0 10px 0;
        padding: 10px 0 5px 0;
        font-size: 16px;
        color: #333;
        border-bottom: 1px solid #eee;
        clear: both;
    }

    .area-content a {
        display: inline-block;
        padding: 4px 8px;
        margin: 2px;
        line-height: 1.5rem;
    }
}

main {
    position: fixed;
    left: 200px;
    right: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.box {
    width: 100%;
    height: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

/* 隐藏地图描述文字，让地图全屏显示 */
.box>p,
.box>h1,
.box>a {
    display: none;
}

.box #container {
    display: block;
}

#container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1001;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    font-size: 12px;
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.map-btn {
    z-index: 9999;
    position: absolute;
    top: 10px;
    left: 10px;
    margin: 0;
}

.map-btn a {
    background-color: #f7f7f7;
    border-radius: 2px;
    display: inline-block;
    padding: 0 10px;
}

.zb {
    display: inline-block;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 999;
    bottom: 4rem;
    right: 1rem;
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.c-zb {
    display: inline-block;
    position: absolute;
    background-color: rgba(255, 255, 255, 0.9);
    z-index: 999;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.jj {
    display: flex;
    flex-direction: column;

}

.jj .jj-item {
    flex: 1;
    align-items: center;
}

.m-nav {
    display: inline-block;
    position: absolute;
    background-color: #fff;
    z-index: 999;
    top: 0;
    right: 0;
    padding: 0 10px;
}

.area-list {
    display: none;
}

/* 地图工具栏样式 */
.map-toolbar {
    position: absolute;
    right: 16px;
    top: 96px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.map-toolbar button {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    transition: all 0.3s;
}

.map-toolbar button:hover {
    background: #f5f5f5;
    border-color: #8B0000;
}

.map-toolbar button:active {
    background: #e0e0e0;
}


@media screen and (max-width: 1015px) {
    header {
        width: 100%;
        max-width: 100%;
        position: relative;
        height: auto;
        max-height: 50vh;
    }

    .area-list {
        display: inline-block;
    }

    .area-list i {
        vertical-align: middle;
    }

    main {
        position: fixed;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
    }

    .map-btn {
        font-size: .6em;
        top: 5px;
        left: 5px;
    }

    .drawing-panel {
        font-size: .6em;
    }

    .zb,
    .c-zb {
        display: none;
    }

    /* 移动端地区列表弹窗样式 */
    .area {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        overflow-y: auto;
        padding: 0;
    }

    .area.show {
        display: block;
    }

    .area>h3 {
        position: sticky;
        top: 0;
        background-color: #fff;
        margin: 0;
        padding: 15px 20px;
        font-size: 18px;
        border-bottom: 1px solid #eee;
        z-index: 10001;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .area>h3 .close-btn {
        font-size: 24px;
        color: #666;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
    }

    .area>h3 .close-btn:hover {
        color: #333;
    }

    .area-content {
        background-color: #fff;
        padding: 15px 20px;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

    .area-content a {
        display: inline-block;
        padding: 8px 12px;
        margin: 5px;
        background-color: #f5f5f5;
        border-radius: 4px;
        color: #333;
        text-decoration: none;
        line-height: 1.5;
        transition: all 0.3s;
        border: 1px solid #e0e0e0;
    }

    .area-content a:hover {
        background-color: #8B0000;
        color: #fff;
        border-color: #8B0000;
    }

    .area-content h4 {
        margin: 15px 0 10px 0;
        padding: 10px 0 5px 0;
        font-size: 16px;
        color: #333;
        border-bottom: 1px solid #eee;
        clear: both;
    }

    .area-content h4:first-child {
        margin-top: 0;
    }

    .box {
        padding: 0;
    }

    footer {
        position: fixed;
        bottom: 0;
        width: 100%;
    }

    /* 移动端地图工具栏优化 */
    .map-toolbar {
        position: fixed;
        bottom: 60px;
        left: 0;
        right: 0;
        top: auto;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        flex-wrap: wrap;
        max-width: 100%;
        margin: 0;
    }

    .map-toolbar button {
        flex: 1;
        min-width: 80px;
        max-width: 120px;
        padding: 10px 12px;
        font-size: 14px;
        font-weight: 500;
        border-radius: 6px;
        background: #fff;
        border: 1px solid #ddd;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .map-toolbar button:active {
        transform: scale(0.98);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    /* 如果工具栏按钮过多，可以横向滚动 */
    @media screen and (max-width: 480px) {
        .map-toolbar {
            justify-content: flex-start;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            padding: 10px 15px;
        }

        .map-toolbar button {
            flex: 0 0 auto;
            min-width: 90px;
        }
    }
}