/* ========== 基础重置 ========== */
.menu-bar, .menu-bar * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    will-change: transform; /* 优化移动性能 */
    backface-visibility: hidden; /* 防止闪烁 */
}

a.no-href {
    user-select: none; /* 禁止文字选中 */
    -webkit-user-select: none; /* Safari 兼容 */
    text-decoration: none; /* 移除下划线（可选） */
    color: inherit; /* 继承父元素颜色（可选） */
}

/* ========== 导航栏容器 ========== */
.menu-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* 改为fixed定位 */
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    padding: 0 20px;
    padding-right: 90px;
    background-color: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* 边框更透明 */
    transition: background-color 0.3s ease; /* 添加过渡效果 */
}

/* ========== Logo样式 ========== */
.logo {
    display: flex;          /* 使用flex布局 */
    align-items: center;    /* 垂直居中 */
    height: 100%;
    white-space: nowrap;    /* 防止文字换行 */
}

.logo a {
    display: flex;          /* 内部也使用flex */
    align-items: center;    /* 垂直居中 */
    text-decoration: none !important;
}

.HeadImage {
    width: 36px;
    height: 36px;
    margin-right: 8px;      /* 图片和文字的间距 */
    transition: all 0.3s ease;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.3);
    vertical-align: middle; /* 确保垂直对齐 */
}

.logo:hover .HeadImage {
    transform: rotate(15deg) scale(1.1);
    border-color: #4a9eff;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.5);
}

.logo, .logo * {
    float: none !important;
    display: flex !important;
    vertical-align: middle !important;
}
.logoTitle {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    display: inline;        /* 改为inline显示 */
    align-items: center;
    transition: color 0.3s ease;
    user-select: none; /* 禁止文字选中 */
}

.logo:hover .logoTitle {
    color: #4a9eff; /* 悬停时变色 */
}

.logoTitle span {
    color: #4a9eff;
    margin-left: 2px; /* 微调间距 */
}

@media (max-width: 768px) {
    .logoTitle {
        font-size: 18px; /* 适当缩小字号 */
    }
    .HeadImage {
        width: 30px;
        height: 30px;
    }
}
/* ========== 主导航菜单 ========== */
.menu-bar > ul {
    display: flex;
    list-style: none;
    height: 100%;
    user-select: none; /* 禁止文字选中 */
}

.menu-bar > ul > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    user-select: none; /* 禁止文字选中 */
}

.menu-bar > ul > li > a {
    color: #eee;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 18px;
    position: relative;
    transition: all 0.3s ease;
    user-select: none; /* 禁止文字选中 */
}

/* ========== 下拉菜单 ========== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: auto; /* 宽度自适应 */
    max-width: 300px; /* 最大宽度限制 */
    min-width: 150px; /* 最小宽度 */
    background: rgba(30, 30, 30, 0.6); /* 下拉菜单也调整为透明 */
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    user-select: none; /* 禁止文字选中 */
}

.dropdown-menu ul {
    padding: 8px 0;
    list-style: none; /* 添加这行移除小圆圈 */
    user-select: none; /* 禁止文字选中 */
}

.dropdown-menu ul li a {
    padding: 10px 10px;
    color: #ddd;
    font-size: 14px;
    display: block;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: normal; /* 允许换行 */
    word-break: break-word; /* 长单词或URL换行 */
    max-width: 300px; /* 限制最大宽度 */
    user-select: none; /* 禁止文字选中 */
}

.dropdown-icon {
    margin-left: 6px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* ========== 悬停效果 ========== */
.menu-bar > ul > li > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.menu-bar > ul > li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-bar > ul > li:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu ul li a:hover {
    background: rgba(74, 158, 255, 0.15);
    color: #6bb9ff;
    padding-left: 25px;
}

/* ========== 移动端菜单按钮 ========== */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .menu-bar {
        padding: 0 15px;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-bar > ul {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(30, 30, 30, 0.98);
        flex-direction: column;
        height: auto;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }

    .menu-bar.active > ul {
        max-height: 100vh;
    }

    .menu-bar > ul > li {
        height: 50px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .menu-bar > ul > li > a {
        padding: 0 20px;
    }

    .dropdown-menu {
        position: static;
        background: rgba(50, 50, 50, 0.9);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border: none;
        border-radius: 0;
    }

    .menu-bar > ul > li:hover .dropdown-menu {
        max-height: 300px;
    }

    .menu-bar.active .menu-toggle span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-bar.active .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .menu-bar.active .menu-toggle span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}