/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    color: #333;
    background: #fafafa;
}

a {
    color: #2c3e50;
    text-decoration: none;
}

a:hover {
    color: #3498db;
}

/* 容器 */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
header {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    padding: 20px 0;
    margin-bottom: 40px;
}

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

header h1 a {
    font-size: 1.5rem;
    font-weight: 600;
}

nav a {
    margin-left: 24px;
    color: #666;
}

nav a:hover {
    color: #3498db;
}

/* 主体区域 */
main {
    min-height: 60vh;
}

/* 简介 */
.intro {
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 40px;
}

.intro h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.intro p {
    color: #666;
}

/* 文章列表 */
.posts h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #666;
}

.post-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-card h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.post-card .date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.post-card .excerpt {
    color: #555;
    margin-bottom: 12px;
}

.read-more {
    color: #3498db;
    font-size: 0.95rem;
}

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

/* 文章详情 */
.post-detail {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.post-detail h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.post-detail .date {
    color: #999;
    margin-bottom: 24px;
}

.post-detail p {
    margin-bottom: 16px;
}

.post-detail img {
    max-width: 100%;
    border-radius: 4px;
}

/* 评论区域 */
.comments {
    background: #fff;
    padding: 32px 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 40px;
}

.comments h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.giscus {
    margin-bottom: 32px;
}

.local-comments h4 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 16px;
}

/* 评论表单 */
#comment-form {
    margin-bottom: 24px;
}

#comment-form input,
#comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 12px;
    font-family: inherit;
    font-size: 1rem;
}

#comment-form textarea {
    min-height: 100px;
    resize: vertical;
}

#comment-form button {
    background: #3498db;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

#comment-form button:hover {
    background: #2980b9;
}

/* 评论列表 */
.comment-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-time {
    color: #999;
    font-size: 0.85rem;
    margin: 4px 0;
}

.comment-body {
    color: #555;
    margin-top: 8px;
}

.no-comments {
    color: #999;
    text-align: center;
    padding: 20px;
}

/* 返回链接 */
.back-link {
    display: inline-block;
    color: #666;
    margin-bottom: 40px;
}

.back-link:hover {
    color: #3498db;
}

/* 关于页面 */
.about-content {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.about-content h2 {
    margin-bottom: 20px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 30px 0;
    color: #999;
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

footer a {
    color: #999;
}

footer a:hover {
    color: #3498db;
}

/* 响应式 */
@media (max-width: 600px) {
    header .container {
        flex-direction: column;
        gap: 12px;
    }
    
    nav a {
        margin: 0 12px;
    }
    
    .post-detail,
    .comments,
    .about-content {
        padding: 24px;
    }
    
    .post-detail h2 {
        font-size: 1.5rem;
    }
}
