body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#map {
    /* background-color: rgb(177, 30, 30); */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
}

#map-content {
    box-sizing: border-box;
    position: relative;

    /* background-color: aqua; */
    opacity: 1;
    height: calc(100% - 72px - 72px);
    width: calc(100% - 32px - 32px);
    left: 32px;
    top: 72px;
    
    overflow: hidden;

    z-index: 0;
}

#filter-container {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    /* background-color: rgb(203, 106, 106); */
    width: 50%;
    height: auto;

    display: none;
    flex-direction: column;
    gap: 10px;

    font-size: 14px;
    font-family: "Quicksand", Arial, Helvetica, sans-serif;

}

#filter-container div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;

    /* background-color: rgb(125, 203, 106); */
    max-width: 100%;
    
}

#filter-container div div {
    padding: 2px 10px;
    border-radius: 100px;
    -webkit-user-select: none; /* Safari / Chrome */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE 10+ */
    user-select: none;         /* Standard */
    background-color: #d9d9d9;
    /* border and opacity will be controlled by class */
}

.filter-tag.selected {
    opacity: 1;
    border: 1px solid #d9d9d9;
}
.filter-tag.unselected {
    opacity: 0.6;
    border: 1px dashed rgb(0, 0, 0);
}

/* 只在支持真实hover的设备上应用hover效果 */
@media (hover: hover) {
    .filter-tag:hover {
        opacity: 1;
        border: 1px dashed #000000;
    }
    
    #filter-container #filter-line4 div:hover {
        background-color: rgb(185, 185, 185);
        border: 0.5px solid rgb(185, 185, 185);
    }
}

/* 触摸设备上使用active替代hover */
@media (hover: none) {
    .filter-tag:hover {
        /* 移除hover效果，使用原始样式 */
        opacity: inherit;
        border: inherit;
    }
    
    .filter-tag:active {
        opacity: 1;
        border: 1px dashed #000000;
        transition: none; /* 防止延迟 */
    }
    
    /* 添加一个显式的活动状态样式类 */
    .filter-tag.touch-active {
        opacity: 1 !important;
        border: 1px dashed #000000 !important;
    }
    
    #filter-container #filter-line4 div:hover {
        background-color: inherit;
        border: 0.5px solid rgb(0, 0, 0);
    }
    
    #filter-container #filter-line4 div:active {
        background-color: rgb(185, 185, 185);
        border: 0.5px solid rgb(185, 185, 185);
        transition: none; /* 防止延迟 */
    }
    
    /* 添加一个显式的活动状态样式类 */
    #filter-container #filter-line4 div.touch-active {
        background-color: rgb(185, 185, 185) !important;
        border: 0.5px solid rgb(185, 185, 185) !important;
    }
}

.filter-tag.disabled {
    pointer-events: none;
    opacity: 0.25;
    background: #eee;
    border: 1px solid #eee;
}

#filter-container #filter-line4 div {
    /* background-color: #cdcdcd; */
    opacity: 1;
    border: 0.5px solid rgb(0, 0, 0);
}

#map-background {
    box-sizing: border-box;
    /* background-color: aqua; */
    position: absolute;
    
    height: calc(100% - 36px);
    width: 100%;
    left: 0;
    top: 0;
    z-index: 0;
}

#myCanvas {
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;

    position: fixed;
    z-index: -1;
}

/* Responsive styles for mobile devices */
@media screen and (max-width: 600px) {
    #map-content {
        width: calc(100% - 16px - 16px);
        left: 16px;
        height: calc(100% - 72px - 48px);
    }
    
    #filter-container {
        width: 90%;
    }
    
    .hyperlink {
        font-size: 14px;
    }
    
    #header {
        top: 12px;
        right: 16px;
    }
}



