/* 动画效果CSS文件 */

/* 页面滚动动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 元素进入动画类 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.animate-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.animate-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease;
}

.animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

.animate-bottom {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.animate-bottom.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 延迟动画 */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* 悬停动画效果 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 192, 203, 0.3);
}

.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);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
}

/* 按钮动画效果 */
.btn-pulse {
    position: relative;
    overflow: hidden;
}

.btn-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-pulse:hover::before {
    width: 300px;
    height: 300px;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
}

.card-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.1), rgba(230, 230, 250, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.card-hover:hover::before {
    opacity: 1;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(255, 192, 203, 0.3);
}

/* 图片悬停效果 */
.image-hover {
    position: relative;
    overflow: hidden;
}

.image-hover img {
    transition: transform 0.5s ease;
}

.image-hover:hover img {
    transform: scale(1.1);
}

.image-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 192, 203, 0.2), rgba(230, 230, 250, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-hover:hover::after {
    opacity: 1;
}

/* 导航链接动画 */
.nav-link-animated {
    position: relative;
    overflow: hidden;
}

.nav-link-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 192, 203, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link-animated:hover::before {
    left: 100%;
}

/* 加载动画 */
@keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 192, 203, 0.3);
    border-top: 4px solid #FF69B4;
    border-radius: 50%;
    animation: loading 1s linear infinite;
}

/* 打字机效果 */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #FF69B4; }
}

.typewriter {
    overflow: hidden;
    border-right: 2px solid #FF69B4;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* 浮动动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.float {
    animation: float 3s ease-in-out infinite;
}

.float-delay-1 { animation-delay: 0.2s; }
.float-delay-2 { animation-delay: 0.4s; }
.float-delay-3 { animation-delay: 0.6s; }

/* 心跳动画增强版 */
@keyframes heartbeat-strong {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1.05); }
    75% { transform: scale(1.15); }
}

.heartbeat-strong {
    animation: heartbeat-strong 2s ease-in-out infinite;
}

/* 闪烁星星动画 */
@keyframes twinkle-star {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1); 
    }
    50% { 
        opacity: 1; 
        transform: scale(1.2); 
    }
}

.star {
    animation: twinkle-star 2s ease-in-out infinite;
}

.star-delay-1 { animation-delay: 0.5s; }
.star-delay-2 { animation-delay: 1s; }
.star-delay-3 { animation-delay: 1.5s; }

/* 花瓣飘落动画增强 */
@keyframes fall-petal {
    0% {
        opacity: 1;
        transform: translateY(-100px) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

.petal {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #FF69B4, transparent);
    border-radius: 50%;
    animation: fall-petal 8s linear infinite;
}

.petal:nth-child(1) { left: 10%; animation-delay: 0s; }
.petal:nth-child(2) { left: 20%; animation-delay: 1s; }
.petal:nth-child(3) { left: 30%; animation-delay: 2s; }
.petal:nth-child(4) { left: 40%; animation-delay: 3s; }
.petal:nth-child(5) { left: 50%; animation-delay: 4s; }
.petal:nth-child(6) { left: 60%; animation-delay: 5s; }
.petal:nth-child(7) { left: 70%; animation-delay: 6s; }
.petal:nth-child(8) { left: 80%; animation-delay: 7s; }

/* 渐变背景动画 */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background: linear-gradient(-45deg, #FFC0CB, #E6E6FA, #FF69B4, #DDA0DD);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

/* 文字发光效果 */
@keyframes text-glow {
    0%, 100% { text-shadow: 0 0 5px rgba(255, 105, 180, 0.5); }
    50% { text-shadow: 0 0 20px rgba(255, 105, 180, 0.8), 0 0 30px rgba(255, 105, 180, 0.6); }
}

.text-glow {
    animation: text-glow 2s ease-in-out infinite;
}

/* 边框动画 */
@keyframes border-dance {
    0%, 100% { border-color: #FFC0CB; }
    25% { border-color: #E6E6FA; }
    50% { border-color: #FF69B4; }
    75% { border-color: #DDA0DD; }
}

.border-animated {
    border: 2px solid #FFC0CB;
    animation: border-dance 4s ease-in-out infinite;
}

/* 进度条动画 */
@keyframes progress-fill {
    from { width: 0%; }
    to { width: 100%; }
}

.progress-animated {
    animation: progress-fill 2s ease-out;
}

/* 弹跳动画 */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
    40%, 43% { transform: translateY(-30px); }
    70% { transform: translateY(-15px); }
    90% { transform: translateY(-4px); }
}

.bounce {
    animation: bounce 1s ease-in-out;
}

/* 摇摆动画 */
@keyframes swing {
    20% { transform: rotate(15deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.swing {
    animation: swing 1s ease-in-out;
}

/* 淡入淡出动画 */
@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.fade-in-out {
    animation: fadeInOut 3s ease-in-out infinite;
}

/* 滑动进入动画 */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-top {
    animation: slideInFromTop 0.8s ease-out;
}

/* 缩放进入动画 */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.zoom-in {
    animation: zoomIn 0.8s ease-out;
}

/* 翻转动画 */
@keyframes flip {
    0% { transform: perspective(400px) rotateY(0); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

.flip {
    animation: flip 1s ease-in-out;
}

/* 脉冲动画 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* 震动动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* 波浪动画 */
@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.wave {
    animation: wave 2s ease-in-out infinite;
}

.wave-delay-1 { animation-delay: 0.1s; }
.wave-delay-2 { animation-delay: 0.2s; }
.wave-delay-3 { animation-delay: 0.3s; }
.wave-delay-4 { animation-delay: 0.4s; }
.wave-delay-5 { animation-delay: 0.5s; }

/* 响应式动画调整 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .animate-on-scroll,
    .animate-left,
    .animate-right,
    .animate-scale,
    .animate-bottom {
        transition-duration: 0.5s;
    }
    
    .delay-100, .delay-200, .delay-300, .delay-400, .delay-500 {
        transition-delay: 0s !important;
    }
}



