/* 滚动触发动画样式 */

/* 标题淡入动画 */
@keyframes title-fade-in {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    animation: title-fade-in 1s ease-out forwards;
}

/* 软件模拟界面动画 */
@keyframes mockup-fade-in {
    0% {
        opacity: 0;
        transform: perspective(1000px) rotateY(-20deg) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: perspective(1000px) rotateY(-5deg) scale(1);
    }
}

.software-mockup {
    animation: mockup-fade-in 1s ease-out;
}

/* 高亮项目动画 */
@keyframes highlight-pulse {
    0%, 100% {
        transform: translateX(0);
        background: rgba(255, 255, 255, 0.5);
    }
    50% {
        transform: translateX(5px);
        background: rgba(255, 255, 255, 0.8);
    }
}

.highlight-item {
    animation: highlight-pulse 3s ease-in-out infinite;
    animation-delay: calc(var(--item-index) * 0.2s);
}

.highlight-item:nth-child(1) { --item-index: 0; }
.highlight-item:nth-child(2) { --item-index: 1; }
.highlight-item:nth-child(3) { --item-index: 2; }
.highlight-item:nth-child(4) { --item-index: 3; }

/* 按钮呼吸动画 */
@keyframes button-breathe {
    0%, 100% {
        box-shadow: 0 10px 20px rgba(201, 168, 124, 0.3);
    }
    50% {
        box-shadow: 0 15px 30px rgba(201, 168, 124, 0.5);
    }
}

.btn-primary {
    animation: button-breathe 2s ease-in-out infinite;
}

/* 歌词淡入淡出 */
@keyframes lyrics-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
        filter: blur(2px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes lyrics-fade-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
        filter: blur(2px);
    }
}

/* 歌词字符波浪效果 */
@keyframes char-wave {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.1);
    }
}

.lyrics-char.highlighted {
    animation: char-wave 0.6s ease-in-out;
}

/* 歌词容器呼吸效果 */
@keyframes lyrics-breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

.mockup-lyrics {
    animation: lyrics-breathe 4s ease-in-out infinite;
}

/* 进度条光晕效果 */
@keyframes progress-glow {
    0% {
        box-shadow: 0 0 5px rgba(201, 168, 124, 0.4),
                    0 0 10px rgba(201, 168, 124, 0.3),
                    0 0 15px rgba(201, 168, 124, 0.2);
    }
    50% {
        box-shadow: 0 0 10px rgba(201, 168, 124, 0.6),
                    0 0 20px rgba(201, 168, 124, 0.4),
                    0 0 30px rgba(201, 168, 124, 0.3);
    }
    100% {
        box-shadow: 0 0 5px rgba(201, 168, 124, 0.4),
                    0 0 10px rgba(201, 168, 124, 0.3),
                    0 0 15px rgba(201, 168, 124, 0.2);
    }
}

.lyrics-progress {
    animation: progress-glow 3s ease-in-out infinite;
}

/* 歌词高亮扫描效果 */
@keyframes lyrics-scan {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.lyrics-line.active .lyrics-text {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 124, 0.2) 25%,
        rgba(201, 168, 124, 0.4) 50%,
        rgba(201, 168, 124, 0.2) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: lyrics-scan 3s linear infinite;
}

/* 时间戳闪烁效果 */
@keyframes timestamp-blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.lyrics-timestamp {
    animation: timestamp-blink 2s ease-in-out infinite;
}

/* 淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 从左滑入 */
.slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 从右滑入 */
.slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* 缩放动画 */
.scale-up {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-up.visible {
    opacity: 1;
    transform: scale(1);
}

/* 旋转淡入 */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotate-in.visible {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* 数字递增动画 */
.count-up {
    opacity: 0;
}

.count-up.visible {
    opacity: 1;
}

/* 进度条动画 */
.progress-bar {
    width: 0;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar.visible {
    width: 100%;
}

/* 文字打字机效果 */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typing 3s steps(40, end) forwards;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* 波纹效果 */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* 视差滚动 */
.parallax {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

/* 悬浮卡片效果 */
.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 发光边框 */
.glow-border {
    position: relative;
    overflow: hidden;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #c9a87c, #e6ddd4, #c9a87c, #e6ddd4);
    background-size: 400% 400%;
    z-index: -1;
    filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
    animation: glow-animation 4s ease-in-out infinite;
}

.glow-border:hover::before {
    opacity: 1;
}

@keyframes glow-animation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 磁性吸附效果 */
.magnetic {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 液体按钮效果 */
.liquid-button {
    position: relative;
    overflow: hidden;
}

.liquid-button::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: all 0.5s;
}

.liquid-button:hover::before {
    width: 300%;
    height: 300%;
}

/* 3D倾斜效果 */
.tilt-3d {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.3s;
}

/* 文字发光效果 */
.text-glow {
    text-shadow: 0 0 10px rgba(201, 168, 124, 0.5);
    animation: text-glow-animation 2s ease-in-out infinite alternate;
}

@keyframes text-glow-animation {
    from {
        text-shadow: 0 0 10px rgba(201, 168, 124, 0.5);
    }
    to {
        text-shadow: 0 0 20px rgba(201, 168, 124, 0.8);
    }
}

/* 粒子动画背景 */
.particle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.5;
    animation: particle-float 10s infinite linear;
}

@keyframes particle-float {
    from {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    to {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 滚动指示器动画 */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 延迟动画类 */
.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; }

/* 持续时间类 */
.duration-300 { transition-duration: 0.3s; }
.duration-500 { transition-duration: 0.5s; }
.duration-800 { transition-duration: 0.8s; }
.duration-1000 { transition-duration: 1s; }

/* 玻璃态效果 */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 渐变动画背景 */
.gradient-animation {
    background: linear-gradient(270deg, #c9a87c, #e6ddd4, #c9a87c);
    background-size: 400% 400%;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 脉冲动画 */
.pulse {
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 摇摆动画 */
.swing {
    animation: swing-animation 3s ease-in-out infinite;
}

@keyframes swing-animation {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}