/* 高大上的动画效果 */

/* 基础动画关键帧 */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes rotateIn {
    0% {
        transform: rotate(-200deg);
        opacity: 0;
    }
    100% {
        transform: rotate(0deg);
        opacity: 1;
    }
}

@keyframes flipInX {
    0% {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateX(-20deg);
    }
    60% {
        transform: perspective(400px) rotateX(10deg);
    }
    80% {
        transform: perspective(400px) rotateX(-5deg);
    }
    100% {
        transform: perspective(400px) rotateX(0deg);
        opacity: 1;
    }
}

@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInFromCorner {
    0% {
        transform: translate(-100%, -100%);
        opacity: 0;
    }
    100% {
        transform: translate(0, 0);
        opacity: 1;
    }
}

/* 动画类 */
.animate-slide-in-left {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.animate-slide-in-top {
    animation: slideInFromTop 0.8s ease-out forwards;
}

.animate-slide-in-bottom {
    animation: slideInFromBottom 0.8s ease-out forwards;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.6s ease-out forwards;
}

.animate-bounce-in {
    animation: bounceIn 0.8s ease-out forwards;
}

.animate-rotate-in {
    animation: rotateIn 0.8s ease-out forwards;
}

.animate-flip-in-x {
    animation: flipInX 0.8s ease-out forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.6s ease-out forwards;
}

.animate-slide-in-corner {
    animation: slideInFromCorner 0.8s ease-out forwards;
}

/* 延迟动画 */
.animate-delay-100 {
    animation-delay: 0.1s;
    opacity: 0;
}

.animate-delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

.animate-delay-300 {
    animation-delay: 0.3s;
    opacity: 0;
}

.animate-delay-400 {
    animation-delay: 0.4s;
    opacity: 0;
}

.animate-delay-500 {
    animation-delay: 0.5s;
    opacity: 0;
}

.animate-delay-600 {
    animation-delay: 0.6s;
    opacity: 0;
}

.animate-delay-700 {
    animation-delay: 0.7s;
    opacity: 0;
}

.animate-delay-800 {
    animation-delay: 0.8s;
    opacity: 0;
}

/* 悬停效果 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* 脉冲效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* 闪烁效果 */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

/* 页面加载动画 */
.page-load-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.page-load-animation.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* 响应式动画 */
@media (prefers-reduced-motion: reduce) {
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-slide-in-top,
    .animate-slide-in-bottom,
    .animate-fade-in-scale,
    .animate-bounce-in,
    .animate-rotate-in,
    .animate-flip-in-x,
    .animate-zoom-in,
    .animate-slide-in-corner {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* 特殊效果 */
.glow-effect {
    box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
    transition: box-shadow 0.3s ease;
}

.glow-effect:hover {
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.5);
}

/* 3D 效果 */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.card-3d:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

/* 渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}
