/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 搜索栏样式 */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    padding-left: 50px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 1.2rem;
}

/* 项目网格样式 */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.project-icon {
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-title .sort-badge {
    background: #667eea;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.project-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.project-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 统计信息样式 */
.stats-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 40px;
    color: white;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* 页脚样式 */
.footer {
    text-align: center;
    color: white;
    padding: 20px;
    margin-top: 40px;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.2rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .project-card {
        margin-bottom: 20px;
    }
    
    .stats-container {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-item {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .search-box input {
        padding: 12px 15px;
        padding-left: 45px;
        font-size: 1rem;
    }
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 40px;
    color: white;
    font-size: 1.2rem;
}

.loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin: 20px 0;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.1rem;
    opacity: 0.8;
}
