/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(255,255,255,0.2);
}

/* 主内容区域 */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* 分类筛选 */
.category-filter {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.category-filter h3 {
    margin-bottom: 1rem;
    color: #333;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-item {
    padding: 0.5rem 1rem;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.category-item:hover,
.category-item.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* 应用网格 */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.app-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.app-icon {
    margin-bottom: 1rem;
}

.app-icon img {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    object-fit: cover;
}

.default-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto;
}

.app-info {
    margin-bottom: 1rem;
}

.app-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}

.app-category {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.app-size {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.app-downloads {
    color: #888;
    font-size: 0.8rem;
}

.app-actions {
    margin-top: 1rem;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.8rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* 无应用提示 */
.no-apps {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.page-btn:hover {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* 底部 */
.footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .app-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .category-list {
        justify-content: center;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .app-card {
        padding: 1rem;
    }
}
