/* 头部横幅 */
.header-banner {
    height: 500px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 0 2rem;
    margin-top: 70px; /* 给固定导航栏留出空间 */
}

.banner-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.banner-content p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* 博客内容区域 */
.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 5%;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
}

/* 加载中样式 */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #666;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 空数据样式 */
.empty-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: #777;
}

/* 博客文章列表 */
.posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.post-title a {
    text-decoration: none;
    color: inherit;
}

.post-title a:hover {
    color: #3498db;
}

.post-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
}

.post-excerpt {
    color: #555;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.read-more:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
    color: #2c3e50;
}

.about-me img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    text-decoration: none;
    color: #555;
    transition: color 0.3s;
}

.category-list a:hover {
    color: #3498db;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }

    .banner-content h1 {
        font-size: 2rem;
    }

    .header-banner {
        height: 350px;
    }
}