/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.logo p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 导航样式 */
nav {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: #667eea;
    color: white;
}

/* 主要内容区域 */
main {
    padding: 3rem 0;
}

/* 文章列表样式 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.article-content {
    padding: 1.5rem;
}

.article-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: #333;
}

.article-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #667eea;
}

.article-category {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    padding: 0.3rem 0.6rem;
    background: #f0f4ff;
    border-radius: 15px;
    display: inline-block;
}

.article-category a {
    text-decoration: none;
    color: #667eea;
    font-weight: 500;
}

.article-category a:hover {
    text-decoration: underline;
}

.article-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.read-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.read-more:hover {
    background: #5a6fd8;
}

/* 文章详情页样式 */
.article-detail {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.article-detail h1 {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-detail .meta {
    color: #888;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.article-detail .meta span {
    margin-right: 1rem;
}

.article-detail .content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-detail .content p {
    margin-bottom: 1.5rem;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.7rem 1rem;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 页脚样式 */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header .logo h1 {
        font-size: 2rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .article-detail {
        padding: 2rem 1.5rem;
    }
    
    .article-detail h1 {
        font-size: 1.8rem;
    }
    
    .article-detail .meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-detail .meta span {
        margin-right: 0;
    }
}
/* 留言板样式 */
.comments-section {
    margin-top: 3rem;
}

.comments-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.comments-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* 留言表单样式 */
.comments-section form {
    max-width: 600px;
    margin: 0 auto;
}

.comments-section label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.comments-section input[type="text"],
.comments-section input[type="email"],
.comments-section input[type="url"],
.comments-section textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    margin-bottom: 1rem;
}

.comments-section input[type="text"]:focus,
.comments-section input[type="email"]:focus,
.comments-section input[type="url"]:focus,
.comments-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.comments-section textarea {
    resize: vertical;
    min-height: 120px;
}

.comments-section button[type="submit"] {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.comments-section button[type="submit"]:hover {
    background: #5a6fd8;
}

/* 留言列表样式 */
.comments-list {
    max-width: 600px;
    margin: 0 auto;
}

.comment-item {
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-weight: bold;
}

.comment-author {
    font-weight: bold;
    color: #333;
}

.comment-meta {
    font-size: 0.9rem;
    color: #999;
}

.comment-content {
    color: #666;
    line-height: 1.6;
    margin-left: 50px;
}

.comment-reply {
    margin-left: 50px;
    margin-top: 0.5rem;
}

.comment-reply a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.comment-reply a:hover {
    text-decoration: underline;
}