/* 添加页面容器样式 */
.page-container {
    max-width: 100%;
    margin: 0 auto;
    background: #f0ebe1;  /* 更暖的米色背景 */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    align-items: center;  /* 添加水平居中 */
}

/* 重置 markdown 样式 */
.page-container .markdown-body {
    font-family: "Noto Serif CJK SC", "Source Han Serif SC", "Source Han Serif CN", STSong, SimSun, serif !important;
    font-size: 17px !important;
    line-height: 2.2 !important;
    color: #2c1810 !important;
    text-align: justify;
    background: none !important;
    padding: 0 !important;  /* 移除默认内边距 */
}

/* 重置链接样式 */
.page-container .markdown-body a {
    color: #2c1810 !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(44, 24, 16, 0.2);
    transition: border-color 0.2s;
}

.page-container .markdown-body a:hover {
    border-bottom-color: #2c1810;
    text-decoration: none !important;
}

/* 使用更具体的选择器来提高优先级 */
.page-container .article-container {
    max-width: 860px !important;
    margin: 40px 20px 80px;
    padding: 60px 100px;
    background: #fffcf7;  /* 轻微米黄色的纸张 */
    box-shadow: 
        0 4px 30px rgba(0,0,0,0.1),
        2px 0 5px -2px rgba(0,0,0,0.1),
        -2px 0 5px -2px rgba(0,0,0,0.1);
    border-radius: 4px;
    line-height: 1.8;
    letter-spacing: 0.05em;
    box-sizing: border-box;
    position: relative;
    width: 100%;  /* 确保容器宽度正确 */
}

/* 书脊效果 */
.page-container .article-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    background: linear-gradient(to right, rgba(0,0,0,0.02), rgba(0,0,0,0.05));
    border-left: 1px solid rgba(0,0,0,0.05);
}

/* 书页效果 */
.page-container .article-container::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 10px;
    bottom: 10px;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.03),
        inset 0 0 10px rgba(0,0,0,0.02);
    pointer-events: none;
}

/* 文章标题样式 */
.page-container .article-title {
    text-align: center;
    font-size: 2.2em !important;
    margin-bottom: 1em;
    font-weight: bold !important;
    color: #2c1810;
    border-bottom: 2px solid rgba(44, 24, 16, 0.2);
    padding-bottom: 20px;
    font-family: "Noto Serif CJK SC", STSong, SimSun, serif;
    letter-spacing: 0.1em;
}

.page-container .article-meta {
    text-align: right;
    margin: 20px 0 40px;
    color: #666;
    font-style: italic;
}

.page-container .article-author {
    margin-right: 15px;
}

.page-container .article-time {
    font-style: italic;
}

.page-container .article-content {
    word-wrap: break-word;
    word-break: normal;
    line-height: 2.2;
    font-size: 16px;
    color: #2c1810;
}

.page-container .article-content p {
    text-indent: 2em !important;
    margin-bottom: 1.5em !important;
    text-align: justify;
    hanging-punctuation: last;
    line-height: 2.2 !important;
}

.page-container .article-content h1, 
.page-container .article-content h2, 
.page-container .article-content h3 {
    text-indent: 0;
    margin: 1.5em 0 0.8em;
    font-weight: bold;
}

.page-container .article-content blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    margin: 1em 0;
    color: #666;
    text-indent: 0;
}

.page-container .article-content ul,
.page-container .article-content ol {
    text-indent: 0;
    padding-left: 2em;
    margin: 1em 0;
}

.page-container .article-content pre,
.page-container .article-content code {
    text-indent: 0;
    font-family: "Source Code Pro", Consolas, monospace;
    background: #f8f9fa;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

.page-container .article-content img {
    max-width: 100%;
    height: auto;
    margin: 1em auto;
    display: block;
}

/* 确保每个自然段都有缩进 */
.page-container .article-content > *:not(h1):not(h2):not(h3):not(blockquote):not(ul):not(ol) {
    text-indent: 2em;
    margin-bottom: 1em;
}

/* 标题和特殊块不缩进 */
.page-container .article-content h1,
.page-container .article-content h2,
.page-container .article-content h3,
.page-container .article-content blockquote,
.page-container .article-content ul,
.page-container .article-content ol {
    text-indent: 0;
}

/* 文章交互区域 */
.page-container .article-interactions {
    margin: 60px 0 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    text-align: center;
}

/* 底部样式 */
.page-container .site-footer {
    background: #f0ebe1;
    padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 10;
    flex-shrink: 0;  /* 防止footer被压缩 */
}

.page-container .footer-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    color: #666;
    box-sizing: border-box;
}

.page-container .footer-info {
    text-align: center;
}

.page-container .footer-info p {
    margin: 0;
    margin-bottom: 15px;
    color: #586069;
    font-family: "Noto Serif CJK SC", STSong, SimSun, serif;
}

.page-container .footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.page-container .footer-links a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.page-container .footer-links a:hover {
    color: #2c1810;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .page-container {
        padding: 0;
    }

    .page-container .article-container {
        margin: 0 0 60px;
        padding: 20px 30px;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        background: #fffcf7;
    }

    /* 移动端隐藏书脊效果 */
    .page-container .article-container::after,
    .page-container .article-container::before {
        display: none;
    }

    .page-container .article-content {
        font-size: 15px;
        line-height: 2;
    }

    .page-container .article-content p {
        margin-bottom: 1.2em;
    }

    .page-container .footer-content {
        margin: 0 auto;
        padding: 0 20px;
    }

    .page-container .footer-links {
        gap: 15px;
        padding: 0 10px;
    }
}

/* 标题样式 */
.page-container .markdown-body h1,
.page-container .markdown-body h2,
.page-container .markdown-body h3 {
    color: #2c1810 !important;
    font-family: "Noto Serif CJK SC", STSong, SimSun, serif !important;
    border-bottom: 1px solid rgba(44, 24, 16, 0.2) !important;
    padding-bottom: 0.3em !important;
    margin: 1.5em 0 0.8em !important;
}

/* 引用样式 */
.page-container .markdown-body blockquote {
    border-left: 4px solid rgba(44, 24, 16, 0.2) !important;
    color: #2c1810 !important;
    font-style: italic;
    margin: 1.5em 0 !important;
    padding: 0.5em 1em !important;
    background: rgba(44, 24, 16, 0.02) !important;
}

/* 列表样式 */
.page-container .markdown-body ul,
.page-container .markdown-body ol {
    padding-left: 2em !important;
    margin: 1em 0 !important;
    color: #2c1810 !important;
}

/* 代码样式 */
.page-container .markdown-body code {
    font-family: "Source Code Pro", Consolas, monospace !important;
    background: rgba(44, 24, 16, 0.05) !important;
    color: #2c1810 !important;
} 