* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial, sans-serif; }
body { background-color: #fff; color: #333; line-height: 1.6; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid #eee; }
.logo-container { display: flex; align-items: center; gap: 15px; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, #2c3e50, #4a6491); background-size: cover; background-position: center; background-repeat: no-repeat; }
.logo-text h1 { font-size: 22px; color: #222; }
.logo-text p { font-size: 13px; color: #666; margin-top: 2px; }
.nav-icons { display: flex; gap: 20px; }
.nav-icons a { color: #666; text-decoration: none; }

.search-container { position: relative; }

.search-icon { background: none; border: none; color: #666; cursor: pointer; padding: 8px; display: flex; align-items: center; justify-content: center; }
.search-icon svg { width: 20px; height: 20px; }

.search-form { display: flex; flex-direction: row-reverse; gap: 8px; position: absolute; right: 0; top: 100%; margin-top: 8px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; z-index: 100; min-width: 220px; box-sizing: border-box; }
.search-form.active { opacity: 1; visibility: visible; transform: translateY(0); }

.search-input { padding: 8px 12px; border: 1px solid #eee; border-radius: 20px; font-size: 13px; width: 200px; }
.search-btn { padding: 8px 12px; background-color: #f5f5f5; color: #333; border: none; border-radius: 20px; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.search-btn:hover { background-color: #e5e5e5; }

.main-content { display: flex; margin-top: 30px; gap: 40px; }
.content-left { flex: 2; }
.content-right { flex: 1; }

.latest-posts { margin-bottom: 30px; }
.latest-posts h3 { font-size: 18px; margin-bottom: 20px; color: #222; }

.post-list { list-style: none; }
.post-item { padding: 15px 0; border-bottom: 1px solid #f5f5f5; }
.post-date { font-size: 13px; color: #888; }
.post-title { font-size: 16px; color: #222; text-decoration: none; display: block; margin: 5px 0; }
.post-desc { font-size: 14px; color: #666; }

.sidebar-section { margin-bottom: 30px; }
.sidebar-section h4 { font-size: 15px; margin-bottom: 10px; color: #222; }
.nav-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.nav-btn { background-color: #f5f5f5; color: #333; padding: 6px 12px; border-radius: 15px; text-decoration: none; font-size: 13px; }

footer { margin-top: 50px; padding: 20px 0; border-top: 1px solid #eee; text-align: center; color: #888; font-size: 13px; }
.footer-links { display: flex; justify-content: center; gap: 15px; margin-bottom: 10px; }
.footer-links a { color: #666; text-decoration: none; }

@media (max-width: 768px) {
    .main-content { flex-direction: column; }
    .search-form { right: 0; left: auto; min-width: 200px; }
    .search-input { width: 180px; }
}

@media (max-width: 480px) {
    .search-input { width: 150px; }
}

/* 评论模块样式 */
#comments {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #f5f5f5;
}

#comments h3 {
    font-size: 18px;
    color: #222;
    margin-bottom: 20px;
}

#comments .comment-list {
    margin-bottom: 30px;
}

#comments .comment {
    margin-bottom: 20px;
    padding: 18px;
    background-color: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

#comments .comment:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

#comments .comment-author {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

#comments .comment-author img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#comments .author-name {
    font-weight: 600;
    color: #222;
    font-size: 15px;
}

#comments .comment-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
}

#comments .comment-meta time {
    margin-right: 12px;
}

#comments .comment-meta a {
    color: #666;
    text-decoration: none;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

#comments .comment-meta a:hover {
    color: #222;
    background-color: #f5f5f5;
}

#comments .comment-content {
    font-size: 14px;
    color: #333;
    line-height: 1.7;
    padding-left: 56px;
    margin-top: -8px;
}

#comments .comment-content p {
    margin-bottom: 10px;
}

#comments .comment-content p:last-child {
    margin-bottom: 0;
}

#comments #response {
    margin-bottom: 30px;
}

#comments #response h3 {
    font-size: 16px;
    color: #222;
    margin-bottom: 20px;
}

#comments #comment-form {
    max-width: 600px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

#comments .form-group {
    margin-bottom: 18px;
}

#comments .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

#comments .form-group .required {
    color: #e74c3c;
    margin-left: 2px;
}

#comments .form-group input.text,
#comments .form-group textarea.textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: Arial, sans-serif;
}

#comments .form-group input.text:focus,
#comments .form-group textarea.textarea:focus {
    outline: none;
    border-color: #ddd;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

#comments .form-group textarea.textarea {
    height: 140px;
    resize: vertical;
    min-height: 100px;
}

#comments .submit-btn {
    background-color: #f5f5f5;
    color: #333;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

#comments .submit-btn:hover {
    background-color: #e5e5e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#comments .comments-closed {
    padding: 24px;
    background-color: #fafafa;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    text-align: center;
    border: 1px solid #f0f0f0;
}

/* 评论分页样式 */
#comments .page-navigator {
    margin-top: 30px;
    text-align: center;
}

#comments .page-navigator li {
    display: inline-block;
    margin: 0 5px;
}

#comments .page-navigator a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#comments .page-navigator a:hover {
    background-color: #e5e5e5;
}

#comments .page-navigator .current a {
    background-color: #666;
    color: #ffffff;
}

/* 取消回复样式 */
#comments .cancel-comment-reply {
    margin-bottom: 15px;
}

#comments .cancel-comment-reply a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#comments .cancel-comment-reply a:hover {
    background-color: #f5f5f5;
    color: #222;
}

/* Markdown 样式增强 */
.post-content {
    line-height: 1.8;
}

/* 标题样式 */
.post-content h1 {
    font-size: 28px;
    color: #222;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.post-content h2 {
    font-size: 24px;
    color: #222;
    margin: 25px 0 18px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f5f5f5;
}

.post-content h3 {
    font-size: 20px;
    color: #222;
    margin: 22px 0 16px;
}

.post-content h4 {
    font-size: 18px;
    color: #222;
    margin: 20px 0 14px;
}

.post-content h5 {
    font-size: 16px;
    color: #222;
    margin: 18px 0 12px;
}

.post-content h6 {
    font-size: 14px;
    color: #666;
    margin: 16px 0 10px;
}

/* 段落样式 */
.post-content p {
    margin-bottom: 18px;
    color: #333;
}

/* 列表样式 */
.post-content ul,
.post-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.post-content ul {
    list-style-type: disc;
}

.post-content ol {
    list-style-type: decimal;
}

.post-content li {
    margin-bottom: 8px;
    color: #333;
}

.post-content li ul,
.post-content li ol {
    margin: 8px 0;
    padding-left: 25px;
}

/* 引用样式 */
.post-content blockquote {
    margin: 20px 0;
    padding: 15px 20px;
    border-left: 4px solid #ddd;
    background-color: #fafafa;
    font-style: italic;
    color: #666;
    border-radius: 0 4px 4px 0;
}

.post-content blockquote p {
    margin: 0;
}

/* 代码样式 */
.post-content pre {
    margin: 20px 0;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow-x: auto;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.post-content code {
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 13px;
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    color: #e74c3c;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: #333;
}

/* 水平分隔线 */
.post-content hr {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #eee;
}

/* 表格样式 */
.post-content table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    border-spacing: 0;
}

.post-content table th,
.post-content table td {
    padding: 10px 12px;
    border: 1px solid #eee;
    text-align: left;
}

.post-content table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #222;
}

/* 图片样式 */
.post-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 4px;
    display: block;
}

/* 链接样式 */
.post-content a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-content a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 强调样式 */
.post-content strong {
    font-weight: 600;
    color: #222;
}

.post-content em {
    font-style: italic;
    color: #666;
}

/* 任务列表 */
.post-content ul.task-list {
    list-style-type: none;
    padding-left: 25px;
}

.post-content ul.task-list li {
    position: relative;
    padding-left: 20px;
}

.post-content ul.task-list li:before {
    content: '□';
    position: absolute;
    left: 0;
    color: #999;
}

.post-content ul.task-list li.checked:before {
    content: '✓';
    color: #27ae60;
}