/* PowerShell Man floating character */
.PowerShell_Man {
    position: fixed;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    width: 221px;
    height: 376px;
    z-index: 1000;
    transition: all 0.15s ease;
    pointer-events: none; /* Don't interfere with page interaction */
}

/* PowerShell Man states */
.PowerShell_Man.floating {
    background: url('../images/PSM_Floating.png') center/contain no-repeat;
    animation: float 2s ease-in-out infinite;
}

.PowerShell_Man.flying-up {
    background: url('../images/PSM_Flying.png') center/contain no-repeat;
    animation: flyUp 0.4s ease-in-out infinite;
    /*transform: translateY(-50%) rotate(-15deg);*/
}

.PowerShell_Man.falling {
    background: url('../images/PSM_Falling.png') center/contain no-repeat;
    animation: fall 0.4s ease-in-out infinite;
    /*transform: translateY(-50%) rotate(15deg);*/
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50% { transform: translateY(-55%) translateX(5px); }
}

@keyframes flyUp {
    0%, 100% { 
        transform: translateY(-50%) rotate(5deg) rotateZ(0deg);
        transform-origin: top center;
    }
    50% { 
        transform: translateY(-50%) rotate(5deg) rotateZ(-2deg);
        transform-origin: top center;
    }
}

@keyframes fall {
    0%, 100% { 
        transform: translateY(-50%) rotate(-5deg) rotateZ(0deg);
        transform-origin: bottom center;
    }
    50% { 
        transform: translateY(-50%) rotate(-5deg) rotateZ(2deg);
        transform-origin: bottom center;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .PowerShell_Man {
        width: 110px;
        height: 188px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .PowerShell_Man {
        width: 80px;
        height: 136px;
        right: 10px;
    }
}

/* Preload PowerShell Man images */
.PowerShell_Man::before {
    content: url('../images/PSM_Floating.png') url('../images/PSM_Flying.png') url('../images/PSM_Falling.png');
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}