/*
Theme Name: Life Trace (朱某的生活印记)
Theme URI: https://typecho.org
Description: 还原三栏简约博客布局，完美适配 Typecho 1.3.0
Author: Custom
Version: 1.0.0
*/

/* 全局重置与基础设定 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #faf6ef;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #e84118;
}

/* 主网格三栏布局 */
.site-wrapper {
    display: grid;
    grid-template-columns: 200px 1fr 280px;
    gap: 20px;
    max-width: 1280px;
    margin: 20px auto;
    padding: 0 15px;
}

/* ================= 左侧侧边栏 ================= */
.sidebar-left {
    background: transparent;
}

.site-brand {
    margin-bottom: 20px;
}

.site-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.site-description {
    font-size: 12px;
    color: #888;
}

.search-box {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    outline: none;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
}

.nav-menu li.active a,
.nav-menu a:hover {
    color: #e84118;
    background-color: #f0f0f0;
}

/* 左侧文章归档 */
.sidebar-archive {
    margin-top: 30px;
}

.sidebar-archive-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.archive-list li {
    margin-bottom: 4px;
}

.archive-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
}

.archive-list a:hover {
    color: #e84118;
    background-color: #f0f0f0;
}

.archive-count {
    font-size: 12px;
    color: #999;
}

.archive-empty {
    font-size: 13px;
    color: #999;
    padding: 5px 10px;
}

/* ================= 中间主内容区 ================= */
.main-content {
    min-width: 0;
}

/* 顶部公告栏 */
.notice-bar {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.notice-icon {
    color: #e84118;
    margin-right: 12px;
    white-space: nowrap;
}

.notice-text {
    font-size: 13px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 区块标题 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-title {
    font-size: 18px;
    font-weight: bold;
    border-left: 4px solid #e84118;
    padding-left: 8px;
}

.view-all {
    font-size: 12px;
    color: #888;
}

/* 文章卡片 */
.post-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.post-thumb {
    width: 140px;
    height: 95px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #eceff1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-thumb:empty::after {
    content: "暂无封面";
    font-size: 12px;
    color: #aaa;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-title {
    font-size: 16px;
    font-weight: bold;
}

.badge {
    background: #ff7675;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
}

.post-meta {
    font-size: 12px;
    color: #999;
    margin: 4px 0;
}

.post-meta span {
    margin-right: 10px;
}

.post-excerpt {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.post-footer {
    font-size: 12px;
    color: #a0a0a0;
    display: flex;
    gap: 15px;
}

/* 分页（pageNav 输出 ol.page-navigator） */
.pagination-wrapper {
    margin: 20px 0;
    text-align: center;
}

.pagination-wrapper .page-navigator,
.comments-section .page-navigator {
    list-style: none;
    display: inline-flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.pagination-wrapper .page-navigator a,
.pagination-wrapper .page-navigator span,
.comments-section .page-navigator a,
.comments-section .page-navigator span {
    padding: 6px 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
}

.pagination-wrapper .page-navigator .current,
.comments-section .page-navigator .current {
    color: #fff;
    background: #e84118;
}

/* ================= 文章页 / 独立页 ================= */
.post-full {
    flex-direction: column;
    padding: 24px;
}

.post-title-single {
    font-size: 22px;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 8px;
}

.post-content {
    font-size: 14px;
    line-height: 1.8;
    color: #444;
    margin-top: 10px;
    word-wrap: break-word;
}

.post-content p { margin: 12px 0; }
.post-content a { color: #e84118; }
.post-content a:hover { text-decoration: underline; }
.post-content img { max-width: 100%; height: auto; border-radius: 6px; }
.post-content h2, .post-content h3, .post-content h4 { font-weight: bold; margin: 18px 0 10px; }
.post-content h2 { font-size: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 6px; }
.post-content h3 { font-size: 17px; }
.post-content blockquote {
    border-left: 4px solid #e84118;
    background: #fafafa;
    margin: 12px 0;
    padding: 10px 14px;
    color: #666;
}
.post-content code {
    background: #f5f6fa;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 13px;
}
.post-content pre {
    background: #2d3436;
    color: #f5f5f5;
    padding: 14px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 12px 0;
}
.post-content pre code { background: none; padding: 0; color: inherit; }
.post-content ul, .post-content ol { padding-left: 22px; margin: 10px 0; }

/* 上下篇 */
.post-near {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-size: 13px;
    color: #666;
}

.post-near a { color: #e84118; }

/* ================= 评论 ================= */
.comments-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}

.comments-title { margin-bottom: 16px; }

.comment-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}

.comment-list .comment-list {
    margin: 10px 0 0;
    padding-left: 20px;
    border-left: 2px solid #f0f0f0;
}

.comment-body {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

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

.comments-section .comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: bold;
    justify-content: flex-start;
}

.comments-section .comment-author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    vertical-align: middle;
}

.comments-section .comment-author .fn { font-style: normal; }
.comments-section .comment-author a { color: #333; }
.comments-section .comment-author a:hover { color: #e84118; }

.comment-meta {
    font-size: 12px;
    color: #aaa;
    margin: 4px 0 6px;
}

.comment-meta a { color: #aaa; }
.comment-awaiting-moderation {
    color: #f39c12;
    font-style: normal;
    margin-left: 6px;
}

.comment-content {
    font-size: 13px;
    color: #444;
    line-height: 1.7;
}

.comment-reply {
    margin-top: 6px;
    font-size: 12px;
}

.comment-reply a { color: #e84118; }

/* 评论表单 */
.respond { margin-top: 16px; }

.cancel-comment-reply {
    font-size: 12px;
    margin-bottom: 8px;
}

.cancel-comment-reply a { color: #e84118; }

.comment-form-row { margin-bottom: 12px; }

.comment-form-row label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #555;
}

.comment-form-row label.required::after { content: " *"; color: #e84118; }

.comment-input,
.comment-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: #fafbfc;
    box-sizing: border-box;
}

.comment-input:focus,
.comment-textarea:focus {
    border-color: #e84118;
    background: #fff;
}

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

.comment-submit { border: none; cursor: pointer; }

.comment-login-info {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.comment-login-info a { color: #e84118; }

/* ================= 右侧侧边栏 ================= */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.widget {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 12px;
}

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

/* 用户卡片 */
.widget-user-card {
    text-align: center;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.user-status .status-title {
    font-weight: bold;
    font-size: 14px;
}

.user-status .status-sub {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-danger { background: #e84118; color: #fff; }
.btn-primary { background: #0097e6; color: #fff; }
.btn-default { background: #f5f5f5; color: #333; }

/* 随机文章榜单 */
.rank-list {
    list-style: none;
}

.rank-list li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
}

.rank-num {
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 3px;
    font-size: 11px;
    color: #fff;
    background: #ccc;
    margin-right: 8px;
    flex-shrink: 0;
}

.rank-1 { background: #e84118; }
.rank-2 { background: #fbc531; }
.rank-3 { background: #0097e6; }

.rank-list a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-empty {
    color: #aaa;
    font-size: 12px;
}

/* 最新评论 */
.comments-list {
    list-style: none;
}

.comments-list li {
    margin-bottom: 10px;
    border-bottom: 1px #f5f5f5 solid;
    padding-bottom: 8px;
}

.comment-author {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.comment-date { color: #aaa; }
.comment-text { font-size: 12px; color: #666; margin-top: 2px; }

/* 分类标签 */
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.cat-tag {
    background: #f5f6fa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #e84118;
}

/* 页脚 */
.site-footer {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 12px;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

/* 响应式 Mobile 适配 */
@media (max-width: 992px) {
    .site-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar-left, .sidebar-right {
        display: none; /* 移动端优先显示主内容，侧栏可根据需要用 JS 弹出 */
    }
}
