/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #6a89cc 0%, #4a69bd 100%);
    color: white;
    padding: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.logo h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo h1 a {
    color: white;
    text-decoration: none;
}

.logo p {
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 5px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

nav a:hover {
    background: rgba(255,255,255,0.2);
}

/* 主要内容区 */
main {
    padding: 3rem 0;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.welcome-section h2 {
    color: #4a69bd;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.welcome-section p {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    color: #555;
}

/* 筛选按钮 */
.filter-section {
    margin-bottom: 2rem;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-buttons a {
    padding: 0.8rem 1.5rem;
    background: white;
    color: #4a69bd;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid #4a69bd;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-buttons a:hover,
.filter-buttons a.active {
    background: #4a69bd;
    color: white;
}

/* 文章网格 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 1.5rem;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.post-header h3 {
    margin-bottom: 0.8rem;
}

.post-header h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.post-header h3 a:hover {
    color: #4a69bd;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-type {
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-type.note {
    background: #e3f2fd;
    color: #1976d2;
}

.post-type.project {
    background: #e8f5e8;
    color: #2e7d32;
}

.post-type.resource {
    background: #fff3e0;
    color: #f57c00;
}

.post-date {
    color: #777;
}

.post-excerpt {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #777;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.no-posts h3 {
    color: #4a69bd;
    margin-bottom: 1rem;
}

/* 底部样式 */
footer {
    background: #2c3e50;
    color: white;
    padding: 2.5rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    display: flex;
    margin: 1.5rem 0;
}

.footer-links a {
    color: white;
    margin: 0 1rem;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #6a89cc;
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 1.5rem;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    nav li {
        margin: 0.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        justify-content: center;
    }
}
/* 阅读更多链接样式 */
.read-more {
    margin-top: 1rem;
    text-align: right;
}

.read-more-link {
    color: #4a69bd;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.read-more-link:hover {
    color: #3a59ad;
    text-decoration: underline;
}

/* 无内容时的样式 */
.no-posts {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.no-posts h3 {
    color: #4a69bd;
    margin-bottom: 1rem;
}

.no-posts a {
    color: #4a69bd;
    text-decoration: none;
}

.no-posts a:hover {
    text-decoration: underline;
}