/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

.site-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);
}

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

.navbar-brand {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-nav {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.navbar-nav a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.navbar-nav a:hover {
    opacity: 0.8;
}

/* 主内容 */
.main-wrapper {
    min-height: calc(100vh - 100px);
}

.page-header {
    text-align: center;
    padding: 3rem 0;
    background: white;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #666;
    font-size: 1.2rem;
}

.main-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 2rem 0;
}

/* 文章列表 */
.posts-grid {
    display: grid;
    gap: 1.5rem;
}

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

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

.post-card h3 {
    margin-bottom: 0.5rem;
}

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

.post-card h3 a:hover {
    color: #667eea;
}

.post-meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

.read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

/* 侧边栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.widget h3 {
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.widget .list {
    list-style: none;
}

.widget .list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.widget .list li:last-child {
    border-bottom: none;
}

.widget .list a {
    color: #667eea;
    text-decoration: none;
}

.widget .list a:hover {
    text-decoration: underline;
}

/* 页脚 */
.site-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* 错误页面 */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.error-content {
    text-align: center;
}

.error-code {
    font-size: 6rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-message {
    color: #666;
    margin-bottom: 2rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-nav {
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }
}
