/* 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;
}

/* --- 导航栏优化 --- */
nav { 
    margin: 30px auto; 
    font-size: 0.9rem; 
    display: flex; 
    flex-wrap: wrap;       
    justify-content: center; 
    gap: 15px 30px;         
    max-width: 800px; 
    width: 90%; 
}

nav a {
    text-decoration: none !important;
    color: #999;
    white-space: nowrap;    
    padding: 5px 0;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #1a1a1a !important;
}

/* 小屏幕优化 */
@media screen and (max-width: 600px) {
    nav {
        gap: 10px 20px !important;
        font-size: 0.85rem !important;
    }
    h1 { font-size: 1.4rem !important; }
}

/* 统一标题样式 */
h1 {
    text-align: center !important;
    line-height: 1.2;
    margin: 60px 0 40px 0 !important;
    font-size: 1.8rem;
}

.section-title {
    font-weight: 900 !important;
    font-size: 1.5rem !important;
    margin: 80px 0 20px 0 !important;
    color: #1a1a1a;
}

/* 强制防溢出 */
p, div, article, h1, h2, h3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* 基础组件：移除下划线并增加悬停效果 */
a { 
    color: #1a1a1a; 
    text-decoration: none !important; 
    transition: color 0.3s ease; 
}

a:hover { 
    color: #888 !important; 
}

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; }
footer { margin: 60px auto !important; color: #888; font-size: 0.8rem; max-width: 800px; width: 90%; }