/* Define the animation */
@keyframes swing {
    0% { transform: rotate(10deg); }
    50% { transform: rotate(-5deg); }
    100% { transform: rotate(10deg); }
}

/* Apply the animation to the figure container */
.swing {
    /* Set animation properties: name, duration, timing, repetition */
    animation: swing 3s ease-in-out forwards infinite;
    -webkit-animation: swing 3s ease-in-out forwards infinite; /* For compatibility */

    /* Set the pivot point for the rotation to the top center */
    -webkit-transform-origin: top center;
    transform-origin: top center;

    /* Optional: Center the image on the page for better display */
    display: block;
    margin: 50px auto;
}
