/* 动画效果样式文件 */

/* ===== 复制功能动画 ===== */

/* 联系项容器 */
.contact-item {
    position: relative;
    overflow: hidden;
}

/* 复制成功状态 */
.copy-success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.3)) !important;
    border-color: rgba(34, 197, 94, 0.5) !important;
    box-shadow: 0 8px 32px rgba(34, 197, 94, 0.2) !important;
    animation: backgroundSlideIn 0.4s ease-out forwards;
}

@keyframes backgroundSlideIn {
    0% {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
    }
    100% {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.3));
    }
}

/* 复制成功文本动画 */
.copy-success-text {
    color: #ffffff !important;
    font-weight: 500;
    transform: translateX(-30px);
    opacity: 0;
    animation: slideInFromLeftInternal 0.4s ease-out forwards;
}

.copy-success-icon {
    color: #ffffff !important;
    transform: translateX(-30px);
    opacity: 0;
    animation: slideInFromLeftInternal 0.4s ease-out 0.1s forwards;
}

.copy-success-text.slide-out {
    animation: slideOutToRightInternal 0.4s ease-in forwards;
}

.copy-success-icon.slide-out {
    animation: slideOutToRightInternal 0.4s ease-in 0.1s forwards;
}

@keyframes slideInFromLeftInternal {
    0% {
        transform: translateX(-30px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRightInternal {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(30px);
        opacity: 0;
    }
}

/* 原始内容滑动效果 */
.original-slide-out {
    animation: slideOutToLeftInternal 0.4s ease-in forwards;
}

.original-slide-in {
    animation: slideInFromRightInternal 0.4s ease-out forwards;
}

@keyframes slideOutToLeftInternal {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-30px);
        opacity: 0;
    }
}

@keyframes slideInFromRightInternal {
    0% {
        transform: translateX(30px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 背景颜色恢复动画 */
.copy-success.background-slide-out {
    animation: backgroundSlideOut 0.4s ease-in forwards;
}

@keyframes backgroundSlideOut {
    0% {
        background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.3));
    }
    100% {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
    }
}

/* 点击复制动效 */
.copy-click {
    animation: copyPulse 0.3s ease-out;
}

@keyframes copyPulse {
    0% {
        transform: scale(1);
        background-color: rgba(255, 255, 255, 0.05);
    }
    50% {
        transform: scale(0.98);
        background-color: rgba(34, 197, 94, 0.2);
    }
    100% {
        transform: scale(1);
        background-color: rgba(255, 255, 255, 0.05);
    }
}

/* ===== 加载状态动画 ===== */

/* Loading动画 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.loading-dots {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* ===== 错误状态样式 ===== */

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.error-icon {
    width: 48px;
    height: 48px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.error-title {
    color: #ef4444;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-message {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ===== 工具类 ===== */

.hidden {
    display: none !important;
}