.top-banner {
    background-color: #f4f4f4;
    height: 42px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.top-banner .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.0417vw;
}

.welcome-text {
    color: #999999;
    font-size: 14px;
    margin-right: 42px;
    white-space: nowrap;
}

.top-banner .left {
    display: flex;
    gap: 20px;
    align-items: center;
}

.top-banner a {
    color: #444;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.top-banner a:hover {
    color: #fd4d4d;
}

.top-banner .login-btn {
    color: #fd4d4d;
}

/* 调整原有导航栏的位置 */
.top-nav {
    top: 48px;
}

/* 头像和下拉菜单容器 */
.avatar-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* 头像按钮样式 */
.avatar-button {
    display: flex;
    align-items: center;
    background: none;
    padding: 0;
    cursor: pointer;
    border: none;
}

.avatar-button img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

/* 下拉菜单样式 */
.dropdown-menu {
    width: 176px;
    padding: 18px 0 14px;
    margin-top: 5px;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 200ms ease-out, transform 200ms ease-out;
    pointer-events: none;
}

.dropdown-menu.menu-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* 移除所有可能影响显示的状态类样式 */
.dropdown-menu[aria-hidden='true'],
.dropdown-menu[aria-hidden='false'] {
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 用户信息区域 */
.user-profile {
    display: flex;
    flex-direction: column;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 12px;
    gap: 10px !important;
}

.user-info-list .icon {
    width: 20px;
    height: 20px;
    transition: filter 0.3s ease;
}

.user-info-list {
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 15px !important;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0px 0px 20px 0px rgba(51, 52, 52, 0.15);
    cursor: pointer;
}

.user-id {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
    max-width: 100px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.user-points {
    font-size: 12px;
    color: #888;
    cursor: pointer;
    white-space: nowrap;
}

.user-points:hover {
    color: #0883e4;
}

/* 成就图标区域 */
.achievement-icons {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.achievement-wrapper {
    margin: 0 6px;
}

.achievement {
    cursor: pointer;
}

.achievement img {
    width: 20px;
    height: 20px;
}

/* 菜单列表样式 */
.menu-item {
    display: flex;
    align-items: center;
    padding: 20px 0 0 22px;
    cursor: pointer;
}

.menu-item:last-child {
    border-top: 1px solid #eee;
    padding-bottom: 0;
    margin-top: 14px;
    padding-top: 14px;
}

.menu-item i {
    font-size: 14px;
    color: #999;
    margin-right: 16px;
}

.menu-item span {
    font-size: 14px;
    color: #555;
}

.menu-item:hover i,
.menu-item:hover span {
    color: #0883e4;
}

/* 退出按钮 */
.menu-item.item-bottom {
    padding: 14px 0 0 22px;
    border-top: none;
}

/* 订单数量提示 */
.item-jg {
    position: relative;
}

.prompt-num {
    position: absolute;
    top: -7px;
    left: 7px;
    height: 14px;
    line-height: 12px;
    background: #ff5722;
    border-radius: 10px;
    font-size: 12px;
    color: #fff;
    padding: 0 3px;
    border: 1px solid #fff;
}

/* Tooltip样式 */
.vip-popover,
.teacherAuthName-popover,
.expert-popover {
    min-width: fit-content !important;
    padding: 5px 10px !important;
    margin-bottom: 6px !important;
}

.vip-type-tips {
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #000000;
}

.vip-type-tips .vip-area-time {
    color: #ff5722;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .dropdown-menu {
        width: 260px;
    }

    .menu-item {
        padding: 10px 16px;
        font-size: 14px;
    }

    .profile-avatar {
        width: 50px;
        height: 50px;
    }

    .achievement {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 1024px) {
    .user-id {
        font-size: 16px;
    }

    .user-points {
        font-size: 14px;
        white-space: nowrap;
    }

    .menu-item {
        font-size: 16px;
    }
}

/* 成就图标区域样式修改 */
.achievement-wrapper {
    position: relative;
}

/* Tooltip 基础样式 */
.achievement-wrapper .achievement::before,
.achievement-wrapper .achievement::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Tooltip 文本框 */
.achievement-wrapper .achievement::after {
    content: attr(data-tooltip);
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: #fff;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
    border-radius: 4px;
    z-index: 1001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Tooltip 箭头 */
.achievement-wrapper .achievement::before {
    content: '';
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #fff;
    z-index: 1001;
}

/* 优化显示效果 */
.achievement-wrapper .achievement:hover::before,
.achievement-wrapper .achievement:hover::after,
.achievement-wrapper .achievement:focus::before,
.achievement-wrapper .achievement:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* 添加过渡效果 */
.achievement-wrapper .achievement::before,
.achievement-wrapper .achievement::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    transform: translateX(-50%) translateY(0);
}

/* 针对高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .achievement {
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    .achievement img {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }
}

/* 添加或修改 menu-icon 样式 */
.menu-icon {
    width: 15px;
    height: 15px;
    margin-right: 15px;
    font-size: 16px;
    display: inline-block;
    /* 确保不会覆盖 iconfont 的基本样式 */
}

/* 如果需要,可以专门为这个图标添加样式 */
.icon-jifenzhuanqian {
    color: inherit; /* 继承父元素颜色 */
}

/* 在文件末尾添加成就图标的新样式 */
.achievement img {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.achievement img:first-child {
    opacity: 1;
    /* filter: grayscale(100%) brightness(0.8); */
}

.achievement.active img:first-child {
    opacity: 0;
    display: none;
}

.achievement.active img:last-child {
    opacity: 1;
    display: block;
}

/* 添加摆动动画关键帧 */
@keyframes swingIcon {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-20deg);
    }
    75% {
        transform: rotate(20deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* 添加悬停效果 */
.user-info-list .icon:hover {
    animation: swingIcon 0.6s ease-in-out;
    filter: invert(42%) sepia(98%) saturate(1172%) hue-rotate(190deg) brightness(96%) contrast(98%);
}
