.animation-container,
.file-transfer-animation {
    width: 100%;
    position: relative;
    perspective: 1000px
}

.animation-container {
    height: 400px;
    margin-top: 2rem
}

.file-transfer-animation {
    height: 100%;
    transform-style: preserve-3d
}

.device,
.transfer-path {
    position: absolute;
    top: 50%
}

.device {
    width: 180px;
    height: 320px;
    background: linear-gradient(145deg, #f0f0f0, #fff);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .1), 0 8px 16px rgba(0, 0, 0, .06), inset 0 0 0 2px rgba(255, 255, 255, .5);
    padding: 10px;
    transform-style: preserve-3d;
    transform: translateY(-50%);
    transition: transform .5s ease-out
}

.device-screen,
.file-icon {
    position: relative;
    display: flex
}

.device-left {
    left: 10%;
    transform: translateY(-50%) rotate3d(.2, -.1, .1, 15deg);
    animation: 6s ease-in-out infinite floatLeft
}

.device-right {
    right: 10%;
    transform: translateY(-50%) rotate3d(.2, .1, -.1, 15deg);
    animation: 6s ease-in-out infinite floatRight
}

@keyframes floatLeft {

    0%,
    100% {
        transform: translateY(-50%) rotate3d(.2, -.1, .1, 15deg) translateZ(0)
    }

    50% {
        transform: translateY(-60%) rotate3d(.2, -.1, .1, 15deg) translateZ(20px)
    }
}

@keyframes floatRight {

    0%,
    100% {
        transform: translateY(-50%) rotate3d(.2, .1, -.1, 15deg) translateZ(0)
    }

    50% {
        transform: translateY(-60%) rotate3d(.2, .1, -.1, 15deg) translateZ(20px)
    }
}

.device-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    border-radius: 18px;
    overflow: hidden;
    align-items: center;
    justify-content: center
}

.file-icon {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .1);
    transition: .3s;
    z-index: 5
}

.file-icon.sending {
    animation: 2s ease-in infinite sendFile
}

.file-icon.receiving {
    animation: 2s ease-out 1s infinite receiveFile;
    opacity: 0
}

@keyframes sendFile {

    0%,
    100% {
        transform: scale(1);
        opacity: 1
    }

    50% {
        transform: scale(.8);
        opacity: .8
    }
}

@keyframes receiveFile {
    0% {
        transform: scale(.5);
        opacity: 0
    }

    60% {
        transform: scale(1.1);
        opacity: 1
    }

    100% {
        transform: scale(1);
        opacity: 1
    }
}

.transfer-path {
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 10px;
    z-index: 2
}

.data-packet,
.transfer-path::before {
    top: 50%;
    transform: translateY(-50%);
    position: absolute
}

.transfer-path::before {
    content: '';
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, .2);
    border-radius: 3px
}

.data-packet {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, .8), 0 0 40px rgba(255, 255, 255, .4);
    opacity: 0
}

.btn-hover-effect::after,
.clouds {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%
}

.data-packet:first-child {
    animation: 2s ease-in-out infinite movePacket
}

.data-packet:nth-child(2) {
    animation: 2s ease-in-out .6s infinite movePacket
}

.data-packet:nth-child(3) {
    animation: 2s ease-in-out 1.2s infinite movePacket
}

@keyframes movePacket {
    0% {
        left: 0;
        opacity: 0;
        transform: translateY(-50%) scale(.5)
    }

    20%,
    80% {
        opacity: 1;
        transform: translateY(-50%) scale(1)
    }

    100% {
        left: 100%;
        opacity: 0;
        transform: translateY(-50%) scale(.5)
    }
}

.clouds {
    position: absolute;
    z-index: 1
}

.cloud {
    position: absolute;
    font-size: 3rem;
    color: rgba(255, 255, 255, .7);
    opacity: .5;
    animation: 12s ease-in-out infinite float
}

.cloud1 {
    top: 20%;
    left: 30%;
    animation-delay: 0s
}

.cloud2 {
    top: 50%;
    left: 50%;
    animation-delay: 4s
}

.cloud3 {
    top: 30%;
    left: 70%;
    animation-delay: 8s
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-20px)
    }
}

.stat-counter {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .5s, transform .5s
}

.stat-counter.animated,
[data-scroll].scroll-animated {
    opacity: 1;
    transform: translateY(0)
}

[data-scroll] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s, transform .6s
}

.checkmark-stroke {
    animation: .6s cubic-bezier(.65, 0, .45, 1) forwards stroke
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, .4)
    }

    70% {
        box-shadow: 0 0 0 15px rgba(108, 99, 255, 0)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(108, 99, 255, 0)
    }
}

.fade-in {
    animation: 1s forwards fadeIn
}

.fade-in-left {
    animation: 1s forwards fadeInLeft
}

.fade-in-right {
    animation: 1s forwards fadeInRight
}

.delay-1 {
    animation-delay: .2s
}

.delay-2 {
    animation-delay: .4s
}

.delay-3 {
    animation-delay: .6s
}

.delay-4 {
    animation-delay: .8s
}

.delay-5 {
    animation-delay: 1s
}

.btn-hover-effect {
    position: relative;
    overflow: hidden
}

.btn-hover-effect::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    transition: transform .6s
}

.btn-hover-effect:hover::after {
    transform: translateX(100%)
}

.scroll-down {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: .8rem;
    color: var(--text-secondary);
    opacity: .7;
    transition: opacity .3s
}

.scroll-down:hover {
    opacity: 1
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    margin-top: 10px;
    transform: rotate(45deg);
    border-right: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    animation: 2s infinite scrollArrow
}

@keyframes scrollArrow {
    0% {
        opacity: 0
    }

    50% {
        opacity: 1
    }

    100% {
        opacity: 0;
        transform: rotate(45deg) translate(10px, 10px)
    }
}