/* 现代简约风格 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f5f5;
    --accent-color: #34495e;
    --gradient-start: #4a90e2;
    --gradient-end: #357abd;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    color: #333;
}

/* 渐变背景header */
.header {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="20" fill="none"/></svg>') center/50px 50px;
    opacity: 0.1;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 项目展示区域 */
.projects {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card h2 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.features {
    margin: 1.5rem 0;
    padding-left: 0;
    list-style: none;
}

.features li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
}

.features li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.download-btn {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 1.5rem;
    transition: all 0.3s;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.download-btn:hover {
    background: var(--gradient-end);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .header {
        padding: 3rem 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .projects {
        padding: 0 1rem;
        grid-template-columns: 1fr;
    }
}

/* 项目预览图片样式 */
.project-preview {
    position: relative;
    margin: 1.5rem -2rem;
    height: 200px;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-preview:hover .preview-overlay {
    opacity: 1;
}

.project-preview:hover .preview-image {
    transform: scale(1.05);
}

.preview-btn {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 2px solid white;
    border-radius: 25px;
    transition: all 0.3s;
}

.preview-btn:hover {
    background: white;
    color: var(--primary-color);
}

/* 项目统计信息样式 */
.project-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
    background: var(--secondary-color);
    border-radius: 10px;
}

.stat-item {
    text-align: center;
}

.stat-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.stat-item span {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin: 0.3rem 0;
}

.stat-item strong {
    display: block;
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* 添加页脚 */
.footer {
    background: var(--accent-color);
    color: white;
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: white;
    margin: 0 0.5rem;
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.social-links a:hover {
    opacity: 1;
}

/* 添加暗色主题支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #fff;
    }

    .project-card {
        background: #2d2d2d;
    }

    .project-card h2 {
        color: #fff;
    }

    .project-card p,
    .features li {
        color: #bbb;
    }

    .project-stats {
        background: #333;
    }

    .stat-item span {
        color: #bbb;
    }

    .stat-item strong {
        color: #fff;
    }
}

/* 详情页样式 */
.detail-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.back-btn {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.detail-section {
    margin: 2rem 0;
}

.detail-section h2 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.detail-section ul,
.detail-section ol {
    padding-left: 1.5rem;
}

.detail-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.version-log {
    border-left: 3px solid var(--primary-color);
    padding-left: 1.5rem;
}

.version-item {
    margin-bottom: 1.5rem;
}

.version-item h3 {
    color: var(--accent-color);
    margin-bottom: 0.8rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.github-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {
    .detail-content {
        background: #2d2d2d;
    }
    
    .detail-section h2,
    .version-item h3 {
        color: #fff;
    }
    
    .github-btn {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .github-btn:hover {
        background: var(--primary-color);
        color: white;
    }
}
