/* CSS变量定义 - 绿白灰配色方案 */
:root {
    --primary-color: #4CAF50; /* 淡绿色 */
    --primary-light: #81C784;
    --primary-dark: #388E3C;
    --background-color: #F5F5F5; /* 浅灰色背景 */
    --card-background: #FFFFFF; /* 白色卡片 */
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --transition-time: 0.3s;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
}

/* 段落和文本 */
p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-time) ease;
}

a:hover {
    color: var(--primary-dark);
}

/* 按钮样式 */
.btn, .project-link, .download-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-time) ease;
    font-weight: 500;
    text-align: center;
}

.btn:hover, .project-link:hover, .download-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-color);
    color: white;
}

/* 头部样式 */
.header {
    background-color: var(--card-background);
    box-shadow: 0 2px 4px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin: 0;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 1.5rem;
}

.nav ul li a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

.nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-time) ease;
}

.nav ul li a:hover::after,
.nav ul li a.active::after {
    width: 100%;
}

.nav ul li a.active {
    color: var(--primary-dark);
}

/* 英雄区域 */
.hero, .hero-script {
    background-color: var(--card-background);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-content h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.hero-content h2::after {
    display: none;
}

/* 项目区域 */
.projects, .features, .usage, .download, .about {
    padding: 3rem 0;
}

.project-grid, .feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card, .feature-card {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform var(--transition-time) ease, box-shadow var(--transition-time) ease;
    position: relative;
    overflow: hidden;
}

.project-card:hover, .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px var(--shadow-color);
}

.project-icon, .feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(76, 175, 80, 0.1);
    border-radius: 50%;
    margin-bottom: 1rem;
    position: relative;
}

/* 矢量图标实现 - 使用伪元素 */
.project-icon::after, .feature-icon::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-size: contain;
    background-repeat: no-repeat;
}

.project-icon::after {
    /* 简化的手机图标 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2' width='14' height='20' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='12' y1='18' x2='12.01' y2='18'%3E%3C/line%3E%3C/svg%3E");
}

.feature-card:nth-child(1) .feature-icon::after {
    /* 简化的清理图标 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'%3E%3C/polyline%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'%3E%3C/path%3E%3Cline x1='10' y1='11' x2='10' y2='17'%3E%3C/line%3E%3Cline x1='14' y1='11' x2='14' y2='17'%3E%3C/line%3E%3C/svg%3E");
}

.feature-card:nth-child(2) .feature-icon::after {
    /* 简化的内存图标 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='2' width='20' height='8' rx='2' ry='2'%3E%3C/rect%3E%3Crect x='2' y='14' width='20' height='8' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='6' y1='6' x2='6.01' y2='6'%3E%3C/line%3E%3Cline x1='6' y1='18' x2='6.01' y2='18'%3E%3C/line%3E%3C/svg%3E");
}

.feature-card:nth-child(3) .feature-icon::after {
    /* 简化的电池图标 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='12' y1='2' x2='12' y2='6'%3E%3C/line%3E%3Cline x1='12' y1='18' x2='12' y2='22'%3E%3C/line%3E%3C/svg%3E");
}

.feature-card:nth-child(4) .feature-icon::after {
    /* 简化的加速图标 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234CAF50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'%3E%3C/polygon%3E%3C/svg%3E");
}

/* 使用步骤 */
.usage-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 8px var(--shadow-color);
    position: relative;
    padding-top: 4rem;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 30px;
    height: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* 下载中心 */
.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.download-button {
    flex: 1;
    min-width: 200px;
}

/* 页脚 */
.footer {
    background-color: var(--card-background);
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .header .container {
        flex-direction: column;
    }
    
    .nav ul {
        margin-top: 1rem;
    }
    
    .nav ul li {
        margin-left: 0.8rem;
        margin-right: 0.8rem;
    }
    
    .hero, .hero-script {
        padding: 2rem 0;
    }
    
    .projects, .features, .usage, .download, .about {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h2 {
        font-size: 1.8rem;
    }
    
    .project-grid, .feature-grid, .usage-steps {
        grid-template-columns: 1fr;
    }
}

/* CSS3 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 动画类 */
.animate-fadeInUp {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.animate-slideInFromLeft {
    opacity: 0;
    animation: slideInFromLeft 0.8s ease forwards;
}

.animate-slideInFromRight {
    opacity: 0;
    animation: slideInFromRight 0.8s ease forwards;
}

.animate-pulse {
    animation: pulse 2s 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; }

/* 滚动动画触发 */
.animated-section {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animated-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* 初始状态 - 隐藏需要滚动动画的元素 */
.animated-section .animate-fadeInUp,
.animated-section .animate-slideInFromLeft,
.animated-section .animate-slideInFromRight {
    opacity: 0;
}

/* 卡片悬停效果 */
.project-card:hover, .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
    transition: all 0.3s ease;
}

/* 按钮悬停动画 */
.btn:hover, .project-link:hover, .download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

/* 下载按钮动画 */
.download-button {
    position: relative;
    overflow: hidden;
}

.download-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-dark);
    transition: width 0.3s ease;
}

.download-button:hover::after {
    width: 100%;
}

/* 导航栏滚动效果 */
.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

/* 步骤卡片动画 */
.step {
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.step-number {
    transition: all 0.3s ease;
}

.step:hover .step-number {
    background-color: var(--primary-dark);
    color: white;
    transform: scale(1.1);
}

/* 功能卡片图标动画 */
.feature-icon {
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: rotate(5deg) scale(1.1);
}

/* 优化性能的CSS属性 */
.project-card, .feature-card, .step {
    transform: translateZ(0);
    will-change: transform;
}