/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes shine {
    0% {
        background-position: -100px;
    }
    40%, 100% {
        background-position: 300px;
    }
}

/* 应用动画 */
.hero-content h2,
.hero-content p,
.hero-buttons {
    animation: fadeIn 1s ease forwards;
    opacity: 0;
}

.hero-content h2 {
    animation-delay: 0.3s;
}

.hero-content p {
    animation-delay: 0.6s;
}

.hero-buttons {
    animation-delay: 0.9s;
}

.hero-image img {
    animation: float 6s ease-in-out infinite;
}

.download-btn {
    position: relative;
    overflow: hidden;
}

.download-btn::after {
    content: '';
    display: block;
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
    pointer-events: none;
}

.feature-card i {
    animation: pulse 2s infinite;
}

/* 滚动动画类 */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 给header添加滚动效果 */
header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* 移动端导航菜单按钮动画 */
.menu-toggle {
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    display: none;
}

.menu-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.menu-toggle span:nth-child(1) {
    top: 0px;
}

.menu-toggle span:nth-child(2),
.menu-toggle span:nth-child(3) {
    top: 8px;
}

.menu-toggle span:nth-child(4) {
    top: 16px;
}

.menu-toggle.open span:nth-child(1) {
    top: 8px;
    width: 0%;
    left: 50%;
}

.menu-toggle.open span:nth-child(2) {
    transform: rotate(45deg);
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg);
}

.menu-toggle.open span:nth-child(4) {
    top: 8px;
    width: 0%;
    left: 50%;
}

/* 媒体查询 */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: #fff;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    nav ul.open {
        right: 0;
    }
    
    nav ul li {
        margin: 15px 0;
    }
} 