/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 筛选按钮样式 */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 20px;
    background-color: #e0e0e0;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover {
    background-color: #d0d0d0;
}

.filter-btn.active {
    background-color: #6e8efb;
    color: white;
}

/* 项目容器样式 */
.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 比例 */
    position: relative;
    overflow: hidden;
}

.project-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}
.project-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.2rem;
    background-color: #6e8efb;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.project-link:hover {
    background-color: #5a7df5;
}
.project-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #444;
}

.project-description {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background-color: #e0e0e0;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
}

.project-category {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #6e8efb;
    font-weight: 500;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #333;
    color: #aaa;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }
}