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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'SF Pro Display', 'Helvetica Neue', sans-serif;
    background-color: #F5F5F5;
    color: #333333;
    line-height: 1.6;
}

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

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
}

.btn.primary {
    background-color: #4A90E2;
    color: white;
}

.btn.primary:hover {
    background-color: #357ABD;
}

.btn.secondary {
    background-color: #FFFFFF;
    color: #4A90E2;
    border: 2px solid #4A90E2;
}

.btn.secondary:hover {
    background-color: #F0F7FF;
}

.btn.download-btn {
    background-color: #4A90E2;
    color: white;
    padding: 8px 16px;
    font-size: 14px;
}

.btn.download-btn:hover {
    background-color: #357ABD;
}

/* 标题样式 */
.section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
    color: #333333;
}

/* 导航栏样式 */
.navbar {
    background-color: #FFFFFF;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #E0E0E0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #333333;
}

.logo span {
    color: #4A90E2;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: #666666;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4A90E2;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #F5F5F5;
    border-radius: 4px;
    padding: 0 16px;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 14px;
    width: 200px;
    outline: none;
}

.search-box button {
    border: none;
    background: transparent;
    color: #666666;
    cursor: pointer;
    padding: 8px;
}

/* 英雄区样式 */
.hero {
    background-color: #FFFFFF;
    margin-top: 72px;
    padding: 80px 0;
    border-bottom: 1px solid #E0E0E0;
}

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

.hero-content {
    max-width: 500px;
}

.hero-content h1 {
    font-size: 20px;
    font-weight: 500;
    color: #4A90E2;
    margin-bottom: 16px;
}

.hero-content h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333333;
    line-height: 1.2;
}

.hero-content p {
    font-size: 16px;
    color: #666666;
    margin-bottom: 32px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
}

/* 分类展示区样式 */
.categories {
    padding: 80px 0;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.category-card {
    background-color: #FFFFFF;
    padding: 32px;
    border-radius: 4px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #E0E0E0;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.category-card i {
    font-size: 48px;
    color: #4A90E2;
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333333;
}

.category-card p {
    color: #666666;
    font-size: 14px;
    line-height: 1.6;
}

/* 热门下载列表样式 */
.popular-downloads {
    background-color: #FFFFFF;
    padding: 80px 0;
}

.download-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    background-color: #F9F9F9;
    border-radius: 4px;
    border: 1px solid #E0E0E0;
    transition: background-color 0.2s ease;
}

.download-item:hover {
    background-color: #F5F5F5;
}

.item-rank {
    font-size: 24px;
    font-weight: 700;
    color: #4A90E2;
    margin-right: 24px;
    width: 30px;
    text-align: center;
}

.item-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.item-info img {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    margin-right: 20px;
}

.info-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333333;
}

.info-text p {
    font-size: 14px;
    color: #666666;
    line-height: 1.5;
}

.item-stats {
    margin-right: 24px;
    color: #666666;
    font-size: 14px;
}

/* 页脚样式 */
footer {
    background-color: #333333;
    color: #FFFFFF;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3,
.footer-links h3,
.footer-contact h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #FFFFFF;
}

.footer-about p {
    color: #CCCCCC;
    line-height: 1.8;
    font-size: 14px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #CCCCCC;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #4A90E2;
}

.footer-contact p {
    color: #CCCCCC;
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444444;
    color: #999999;
    font-size: 14px;
}

/* Toast提示框样式 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: #28a745;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    display: none;
}

.toast.show {
    display: flex;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.toast i {
    font-size: 1.2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
        height: auto;
        padding: 16px 20px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 20px;
        margin-top: 16px;
        margin-bottom: 16px;
    }
    
    .search-box {
        width: 100%;
        margin-top: 12px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .hero .container {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-content {
        margin-bottom: 40px;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .item-rank {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .item-info {
        width: 100%;
    }
    
    .item-stats {
        margin-right: 0;
    }
    
    .btn.download-btn {
        width: 100%;
        text-align: center;
    }
}