/* ===== 底部菜单样式 - 修复版 ===== */
#tabBOTTOM {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 0.55rem !important;
    z-index: 9999999 !important;
    background-color: #f1f1f1 !important;
    display: flex !important;  /* 默认显示 */
    flex-direction: row !important;
    border-top: 0.01rem solid #d0d0d0 !important;
    pointer-events: auto !important;
    overflow: visible !important;
}

/* 隐藏状态 - 通过 hidden 类控制 */
#tabBOTTOM.hidden {
    display: none !important;
}

/* 2. 菜单项 */
#tabBOTTOM .menu-item {
    flex: 1 !important;
    height: 0.55rem !important;
    cursor: pointer !important;
    border-right: 0.01rem solid #d0d0d0 !important;
    background: -webkit-gradient(linear, 0 0, 0 100%, from(#f1f1f1), to(#dcdcdc)) !important;
    background: linear-gradient(to bottom, #f1f1f1, #dcdcdc) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    pointer-events: auto !important;
}
#tabBOTTOM .menu-item:last-child {
    border-right: none !important;
}

/* 3. 菜单标题 */
#tabBOTTOM .menu-item .menu-title {
    font-size: 0.16rem !important;
    font-weight: bold !important;
    color: #333333 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    text-shadow: 0px 0.01rem 0px #ffffff !important;
}

/* 4. 子菜单 */
#tabBOTTOM .menu-item .sub-menu {
    display: none !important;
    position: absolute !important;
    bottom: 0.55rem !important;
    left: 0 !important;
    min-width: 1.2rem !important;
    background-color: #fff !important;
    border-radius: 0.05rem !important;
    box-shadow: 0 0.05rem 0.15rem rgba(0,0,0,0.3) !important;
    padding: 0.05rem 0 !important;
    z-index: 9999999 !important;
}
#tabBOTTOM .menu-item:nth-child(1) .sub-menu { left: 0 !important; }
#tabBOTTOM .menu-item:nth-child(4) .sub-menu { left: auto !important; right: 0 !important; }

#tabBOTTOM .menu-item .sub-menu a {
    display: block !important;
    padding: 0.1rem 0.18rem !important;
    color: #000 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    border-bottom: 0.01rem solid #cccccc !important;
    font-weight: bold !important;
    font-size: 0.15rem !important;
}
#tabBOTTOM .menu-item .sub-menu a:last-child {
    border-bottom: none !important;
}
#tabBOTTOM .menu-item .sub-menu a:hover {
    background-color: #c8c7c6 !important;
}

/* 展开状态 */
#tabBOTTOM .menu-item.active .sub-menu {
    display: block !important;
}

/* 5. 遮罩层 */
#masklayer {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999998 !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
}
#masklayer.show {
    display: block !important;
}

#tabs {
	bottom: 0 !important;
    padding-bottom: 0.1rem !important;
}

/* 有底部菜单时，内容区域让出空间 */
body:has(#tabBOTTOM:not(.hidden)) #tabs {
    bottom: 0.65rem !important;
    padding-bottom: 0.1rem !important;
}