.gift-box {
    position: relative;
    display: inline-block;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;

    /* The gift box appears after 4 seconds and shakes */

    animation: fadeIn 2s, shake 1s infinite 2.2s;

}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
        rotate: -0.5deg;
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
        rotate: 0.5deg;
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
        rotate: -1deg;
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
        rotate: 1deg;
    }

}

@keyframes fadeIn {
    0% {
        opacity: 0.1;
    }

    100% {
        opacity: 1;
    }
}