/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #3498db;
}

a:hover {
    color: #217dbb;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    margin-bottom: 20px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-right: 20px;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #3498db;
}

.search-box form {
    display: flex;
}

.search-box input[type="text"] {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px 0 0 3px;
    width: 200px;
    outline: none;
}

.search-box button {
    padding: 8px 15px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 0 3px 3px 0;
    cursor: pointer;
}

.search-box button:hover {
    background-color: #217dbb;
}

/* 内容区域样式 */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.main-content-full {
    width: 100%;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* 文章卡片样式 */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.post-card {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.post-thumbnail {
    height: 180px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 15px;
}

.post-category {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 10px;
}

.post-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.post-content h3 a {
    color: #333;
    text-decoration: none;
}

.post-content h3 a:hover {
    color: #3498db;
}

.post-meta {
    color: #777;
    font-size: 12px;
    margin-bottom: 10px;
}

.post-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 轮播图样式 */
.slider {
    position: relative;
    height: 300px;
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 30px;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.slide:first-child {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
}

.slide-caption h3 {
    margin: 0;
    font-size: 18px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 12px;
    margin: 0 5px;
    background-color: #f8f9fa;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.pagination a:hover {
    background-color: #e9ecef;
}

.pagination a.active {
    background-color: #3498db;
    color: #fff;
}

/* 页脚样式 */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 30px 0 0;
    margin-top: 40px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-nav, .footer-links {
    flex: 1;
    min-width: 200px;
    margin-bottom: 30px;
}

.footer-nav h3, .footer-links h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #3498db;
}

.footer-nav ul, .footer-links ul {
    margin-left: 5px;
}

.footer-nav li, .footer-links li {
    margin-bottom: 10px;
}

.footer-nav a, .footer-links a {
    color: #ecf0f1;
    transition: color 0.3s ease;
}

.footer-nav a:hover, .footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    background-color: #1a252f;
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .search-box {
        width: 100%;
        margin-top: 15px;
    }
    
    .search-box form {
        width: 100%;
    }
    
    .search-box input[type="text"] {
        width: 100%;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .slider {
        height: 200px;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

/* 错误消息样式 */
.error-message {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

/* 通知消息样式 */
.notice {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    color: #6c757d;
}

/* 文章详情样式 */
.post-detail {
    margin-bottom: 30px;
}

.post-title {
    margin-bottom: 10px;
    font-size: 28px;
}

.post-detail .post-meta {
    margin-bottom: 20px;
}

.post-detail .post-content {
    line-height: 1.8;
    margin-bottom: 30px;
    padding: 0;
}

.post-detail .post-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.post-detail .post-content h1, 
.post-detail .post-content h2, 
.post-detail .post-content h3, 
.post-detail .post-content h4, 
.post-detail .post-content h5, 
.post-detail .post-content h6 {
    margin: 20px 0 10px;
}

.post-detail .post-content p {
    margin-bottom: 15px;
}

.post-detail .post-content ul, 
.post-detail .post-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.post-tags {
    margin: 20px 0;
}

.post-tags .tag {
    display: inline-block;
    margin-right: 10px;
    color: #3498db;
}

.post-tags .tag:hover {
    text-decoration: underline;
}

/* 搜索结果样式 */
.search-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.search-header h2 {
    margin-bottom: 5px;
}

.search-header p {
    color: #777;
}

.highlight {
    background-color: #ffeb3b;
    padding: 0 2px;
    border-radius: 2px;
}

/* 分类标题样式 */
.category-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
} 