The aspect of a verb does not indicate when an action takes place in time; it rather shows the relationship between the action and the passage of time as seen from the speaker's point of view.
The future perfect continuous tense is used to express events that will start before a point in time in the future (or have already started) and will still be in progress at that point:
By tomorrow, it will have been raining for four days.
Soon, he'll have been running for 4 hours.
The preposition for is used with the future perfect tense to express that something will start before a point in time in the future (or has already started) and that it will still be true at that point:
The preposition for is used with the past perfect tense to express that something started before a point in time in the past and was still true at that point:
When they got married, they had already been together for three years.
The present perfect continuous tense is used to refer to continuous events that started in the past and have just finished but have a result in or an effect on the present moment. A time expression is not necessary:
The question words how long? and since when?, and the prepositions for and since are used with the present perfect continuous tense to express events that started in the past and are still in progress in the present.
The question words how long? and since when?, and the prepositions for and since are used with the present perfect tense to express that something started in the past and is still true.
In contrast with the past perfect simple tense, which emphasises the result of a completed action, the past perfect continuous focuses on the duration or the activity itself: