/* 动画效果 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 作品项目动画 */
.work-item.animate-on-scroll {
    transform: translateY(50px);
}

.work-item.animate-on-scroll.animated {
    transform: translateY(0);
}

/* 文字间隔动画 */
@keyframes letterSpacing {
    0% {
        letter-spacing: 0;
    }
    50% {
        letter-spacing: 3px;
    }
    100% {
        letter-spacing: 0;
    }
}

.logo h1:hover span {
    display: inline-block;
    animation: letterSpacing 1.5s ease infinite;
}

/* 页面过渡动画 */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.page-transition.active {
    transform: translateY(0);
}

/* 图片悬停效果 */
.work-image {
    position: relative;
    overflow: hidden;
}

.work-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.work-item:hover .work-image::before {
    opacity: 1;
}

/* 拖动效果 */
.work-grid {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    cursor: grab;
    padding: 20px 0;
}

.work-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.work-grid .work-item {
    flex: 0 0 300px;
    margin-right: 30px;
}

/* 按钮悬停效果 */
.button-hover-effect {
    position: relative;
    overflow: hidden;
}

.button-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.button-hover-effect:hover::before {
    left: 100%;
}

/* 滚动指示器动画 */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* 文字淡入效果 */
.fade-in-text {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 延迟动画 */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

/* 视差滚动效果 */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* 鼠标跟随效果 */
.cursor-follow {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.3s, height 0.3s, opacity 0.3s;
    filter: blur(4px);
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #fff;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    mix-blend-mode: difference;
}

.cursor-follow.hover {
    width: 50px;
    height: 50px;
    opacity: 0.8;
    background-color: rgba(255, 255, 255, 0.8);
} 