/* 动画效果 */

/* 浮动动画 */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* 淡入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滑动进入动画 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 心跳动画 */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

/* 旋转动画 */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 闪烁动画 */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 呼吸动画 */
@keyframes breathe {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 打字机效果 */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* 彩虹文字效果 */
@keyframes rainbow {
    0% {
        color: #ff6b6b;
    }
    16% {
        color: #ffd93d;
    }
    33% {
        color: #6bcb77;
    }
    50% {
        color: #4ecdc4;
    }
    66% {
        color: #45b7d1;
    }
    83% {
        color: #96ceb4;
    }
    100% {
        color: #ff6b6b;
    }
}

/* 应用动画类 */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

.rotate {
    animation: rotate 3s linear infinite;
}

.blink {
    animation: blink 1s infinite;
}

.breathe {
    animation: breathe 3s ease-in-out infinite;
}

.typing {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

.rainbow-text {
    animation: rainbow 3s linear infinite;
}

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

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

.delay-900 {
    animation-delay: 0.9s;
}

.delay-1000 {
    animation-delay: 1s;
}

/* 卡片进入动画 */
.card {
    animation: fadeIn 0.6s ease-out forwards;
}

.card:nth-child(1) {
    animation-delay: 0.2s;
}

.card:nth-child(2) {
    animation-delay: 0.4s;
}

.card:nth-child(3) {
    animation-delay: 0.6s;
}

/* 页面加载动画 */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3498db;
    animation: rotate 1s ease-in-out infinite;
}

/* 按钮点击动画 */
.btn-click {
    animation: pulse 0.6s ease-in-out;
}

/* 滚动动画 */
.scroll-animation {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
}