/* ========================================
   悬浮圆形头像页头模块样式
   ======================================== */

/* 悬浮头像容器 */
.header-avatar-floating {
    position: fixed;
    top: 20px;
    left: 20px;
    right: auto;
    z-index: 9999;
}

/* 头像按钮 */
.header-avatar-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 2px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    background: white;
    border: none;
    padding: 0;
    display: block;
}

.header-avatar-button:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18), 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.header-avatar-button:active {
    transform: scale(0.95);
}

/* 头像图片 */
.header-avatar-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 弹出菜单（毛玻璃效果） */
.header-menu-popup {
    position: absolute;
    top: 44px;
    left: 0;
    right: auto;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    min-width: 180px;
    padding: 6px;
    animation: slideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 菜单项 */
.header-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    text-decoration: none;
    color: inherit;
    border-radius: 8px;
}

.header-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

.header-menu-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    font-size: 15px;
    color: #64748B;
}

.header-menu-item span {
    font-size: 14px;
    font-weight: 500;
    color: #1E293B;
}

/* 菜单分割线 */
.header-menu-divider {
    height: 1px;
    background-color: rgba(0, 0, 0, 0.06);
    margin: 4px 8px;
}

/* 用户信息显示在菜单顶部 */
.header-menu-user-info {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 4px;
}

.header-menu-user-info .user-name {
    font-weight: 600;
    font-size: 14px;
    color: #0F172A;
    margin-bottom: 2px;
}

.header-menu-user-info .user-role {
    font-size: 12px;
    color: #64748B;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .header-avatar-floating {
        top: 10px;
        left: 10px;
    }

    .header-avatar-button {
        width: 32px;
        height: 32px;
    }

    .header-menu-popup {
        min-width: 140px;
    }
}
