/* style.css - 全站统一居中与排版规范 */

/* 基础重置 */
html, body {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden; 
}

body { 
    padding: 0 4% !important; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    line-height: 1.7; 
    color: #1a1a1a; 
    font-size: 19px; 
    box-sizing: border-box;
}

/* 全局布局：统一管理内容区宽度和居中 */
.post-content, .cards-container, article {
    width: 90% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

/* 统一标题样式：强制所有 h1 居中 */
h1 {
    text-align: center !important;
    line-height: 1.2;
    margin: 40px 0 !important;
    font-size: 1.8rem;
}

/* 强制防溢出：严防长链接或连续长单词撑破框架 */
p, div, article, h1, h2, h3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

/* 链接与基础组件 */
a { color: #1a1a1a; text-decoration: none; }
nav { margin: 30px auto; font-size: 0.9rem; display: flex; gap: 20px; max-width: 800px; width: 90%; }
img { max-width: 100% !important; height: auto; border-radius: 4px; display: block; margin: 20px 0; }

/* 卡片样式 */
.card { display: block; padding: 20px 0; border-bottom: 1px solid #eee; }
.card-title { font-size: 20px; font-weight: 700; display: block; }
.card-summary { font-size: 15px; color: #666; margin-top: 5px; }

/* 页脚样式 */
footer { margin: 60px auto !important; color: #888; font-size: 0.8rem; max-width: 800px; width: 90%; }

/* 响应式调整 */
@media screen and (max-width: 600px) {
    h1 { font-size: 1.4rem !important; }
}