/* File Transfer Animation */
.animation-container {
    width: 100%;
    height: 500px;
    position: relative;
    perspective: 1200px;
    margin: 2rem auto;
    max-width: 1000px;
}

.file-transfer-animation {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1200px;
    transition: transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .animation-container {
        height: 400px;
        perspective: none;
    }

    .file-transfer-animation {
        transform-style: flat;
        perspective: none;
    }

    .transfer-path {
        width: 30% !important;
    }
}

@media (max-width: 480px) {
    .animation-container {
        height: 300px;
    }

    .transfer-path {
        width: 25% !important;
    }
}

/* File Card */
.file-card {
    background: var(--app-header);
    border-radius: 12px;
    margin: 15px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.file-icon {
    width: 80px;
    height: 100px;
    background: var(--file-bg);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px var(--file-shadow);
    position: relative;
    transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
    margin-bottom: 10px;
}

.file-type-icon {
    display: block;
    width: 40px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23156cef'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 1.5L18.5 9H13V3.5zM14 15v2H8v-2h6zm2-4v2H8v-2h8z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.file-name {
    font-size: 10px;
    color: var(--file-text);
    margin-top: 5px;
    font-weight: 500;
    text-align: center;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size {
    font-size: 8px;
    color: var(--app-text-secondary);
    margin-top: 2px;
}

.send-button {
    background: var(--button-bg);
    color: var(--button-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Receive Area */
.receive-area {
    background: var(--app-header);
    border-radius: 12px;
    margin: 15px;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 180px;
    justify-content: center;
}

.receive-prompt {
    color: var(--app-text);
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Progress Indicator */
.progress-indicator {
    margin: 0 15px;
}

.progress-track {
    height: 6px;
    background: var(--progress-track);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--progress-fill);
    width: 0%;
    border-radius: 3px;
    animation: progressAnimation var(--progress-duration) ease-in-out infinite;
}

.progress-text {
    font-size: 12px;
    color: var(--app-text-secondary);
    text-align: center;
}

/* Transfer Path */
.transfer-path {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;
    height: 40px;
    z-index: 2;
}

.transfer-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--transfer-path);
    transform: translateY(-50%);
}

.data-packets-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.data-packet {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--data-packet-color);
    top: 50%;
    transform: translateY(-50%) scale(0.5);
    box-shadow: 0 0 20px var(--data-packet-glow);
    opacity: 0;
}

.data-packet:nth-child(1) {
    animation: movePacket var(--packet-duration) ease-in-out infinite;
    animation-delay: 0s;
}

.data-packet:nth-child(2) {
    animation: movePacket var(--packet-duration) ease-in-out infinite;
    animation-delay: 0.3s;
}

.data-packet:nth-child(3) {
    animation: movePacket var(--packet-duration) ease-in-out infinite;
    animation-delay: 0.6s;
}

.data-packet:nth-child(4) {
    animation: movePacket var(--packet-duration) ease-in-out infinite;
    animation-delay: 0.9s;
}

.data-packet:nth-child(5) {
    animation: movePacket var(--packet-duration) ease-in-out infinite;
    animation-delay: 1.2s;
}

/* Transfer Particles */
.transfer-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* File Animation */
.file-icon.sending {
    animation: sendFile 2s ease-in-out infinite;
}

/* Animations */
@keyframes sendFile {

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

    50% {
        transform: scale(0.95) translateY(2px);
    }
}

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

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

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

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

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

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

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

@keyframes progressAnimation {
    0% {
        width: 0%;
    }

    10% {
        width: 20%;
    }

    30% {
        width: 40%;
    }

    50% {
        width: 60%;
    }

    70% {
        width: 80%;
    }

    90% {
        width: 95%;
    }

    100% {
        width: 100%;
    }
}

/* Interactive Effects */
.file-transfer-animation:hover {
    transform: scale(1.02);
}

.file-transfer-animation:active {
    transform: scale(0.98);
}