/* 下拉菜单主容器 */
.dropdown-menu {
    position: absolute;
    display: none; /* 使用flex但初始隐藏 */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    
    overflow: hidden;
}

.dropdown-menu.show {
    top: 50%;
    left: -60%;
    z-index: 1000;
    opacity: 1;
    width: 161px;
    gap: 2px;
    background: #FFF;
    align-items: flex-start;
    flex-direction: column;
    visibility: visible;
    display: flex;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.01);

}

/* 移除列表默认样式 */
.dropdown-menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* 菜单项样式 */
.dropdown-menu li {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* 菜单链接样式 - 默认状态 */
.dropdown-menu a {
    display: flex;
    height: 38px;
    padding: 10px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    border-radius: 8px;
    text-decoration: none;
    color: #191919;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: transparent;
    width: 100%;
}

/* 菜单链接样式 - 悬停和点击状态 */
.dropdown-menu a:hover,
.dropdown-menu a:focus {
    background-color: #F5F4FD;
    color: #540CFA;
    text-decoration: none;
}

/* 如果需要将下拉菜单居中对齐于触发器 */
.dropdown-menu {
    left: -10%;
    transform: translateX(-10%) translateY(-20px);
}

.dropdown-menu.show {
    transform: translateX(-10%) translateY(0);
}

/* 或者如果需要将下拉菜单对齐到右侧 */
.dropdown-menu {
    left: auto;
    right: 0;
}
@media screen and (max-width: 1000px) {
    .dropdown-menu {
        position: static; /* 使下拉菜单成为文档流的一部分 */
        transform: none; /* 移除变换 */
        opacity: 1; /* 完全可见 */
        visibility: visible; /* 可见 */
        display: none; /* 默认隐藏，通过.show类显示 */
        width: 100%; /* 全宽 */
        padding: 0; /* 移除内边距 */
        border-radius: 0; /* 无圆角 */
        box-shadow: none; /* 无阴影 */
        background-color: transparent; /* 透明背景 */
        gap: 0; /* 无间隙 */
        transition: none; /* 无过渡效果 */
        top: auto;
        left: auto ;
    }

    .dropdown-menu.show {
        display: flex !important; /* 显示为flex */
        transform: none !important; /* 无变换 */
        border-radius: 0 !important;
    box-shadow: none!important;
    padding: 0!important;
    }

    .dropdown-menu ul {
        flex-direction: column; /* 垂直排列 */
        width: 100%; /* 全宽 */
        gap: 0; /* 无间隙 */
    }

    .dropdown-menu a {
        height: auto; /* 自动高度 */
        padding: 10px 0 10px 0!important;
        justify-content: flex-start; /* 左对齐 */
        border-radius: 0; /* 无圆角 */
        font-size: 16px; /* 调整字体大小，与导航链接一致 */
        color: #333; /* 与导航链接颜色一致，根据实际导航链接颜色调整 */
        background-color: transparent; /* 透明背景 */
    }

    .dropdown-menu a:hover,
    .dropdown-menu a:focus {
        background-color: rgba(0,0,0,0.05); /* 悬停背景色，与导航链接一致 */
        color: #540CFA; /* 悬停颜色，与导航链接一致 */
    }

    /* 移除最后一个菜单项的下边框 */
    .dropdown-menu li:last-child a {
        border-bottom: none;
    }
}
