/* --- 1. 基础视觉审美 (Clean Fit) --- */
body {
    background-color: #FAF8F2;
    background-image: url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    color: #1a1a1a;
    font-family: Georgia, "Times New Roman", serif; 
    font-variant-numeric: slashed-zero;
    line-height: 1.8;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.page-wrapper {
    max-width: 1000px;
    width: 100%;
    background: white;
    padding: 60px;
    border-left: 3px solid #1a1a1a;
    border-right: 1px solid #eee;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.02);
    position: relative;
    min-height: 90vh;
}

/* 采用左右制衡的 Flex 布局 */
header { 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
    border-bottom: 2px solid #1a1a1a; 
    margin-bottom: 50px; 
    padding-bottom: 20px; 
}
.site-title { 
    font-size: 3.2rem; 
    font-weight: bold; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    line-height: 0.95; 
    margin: 0; 
    font-family: "Times New Roman", Times, Georgia, serif; 
    cursor: pointer; 
}

/* 导航栏样式微调 */
.nav-links { 
    margin-top: 0; 
    margin-bottom: 5px; 
    font-family: Consolas, Monaco, "Courier New", Courier, monospace; 
    font-weight: bold; 
    font-size: 0.9rem; 
}
.nav-links a { color: #1a1a1a; text-decoration: none; margin-right: 30px; cursor: pointer; padding: 2px 5px; display: inline-block; }
.nav-links a:last-child { margin-right: 0; } /* 确保最右侧完美贴边，治愈强迫症 */
.nav-links a:hover { background-color: #1a1a1a; color: white; }

.layout-grid { display: grid; grid-template-columns: 1fr 260px; gap: 60px; }

/* 文章列表卡片 */
.post-card { margin-bottom: 50px; cursor: pointer; border-bottom: 1px solid #f2f2f2; padding-bottom: 30px; }
.post-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.post-card h2 { font-size: 1.8rem; margin: 0 0 10px 0; line-height: 1.3; font-family: Georgia, serif; }
.post-excerpt { 
    font-size: 1.05rem; 
    color: #444; 
    text-align: justify; 
    margin: 15px 0; 
    opacity: 0.85; 
}

.post-metadata {
    font-family: Consolas, Monaco, "Courier New", Courier, monospace;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 12px;
    display: flex; gap: 10px; font-weight: bold;
}
.meta-item { background: #f0f0f0; padding: 2px 6px; text-transform: uppercase; }

/* 侧栏 Daily Log */
.sidebar-log { font-family: Consolas, Monaco, "Courier New", Courier, monospace; border-left: 1px solid #ddd; padding-left: 30px; }
.sidebar-log h3 { font-size: 1.1rem; border-bottom: 1px solid #1a1a1a; padding-bottom: 10px; margin-bottom: 20px; }
.log-note { font-size: 0.85rem; margin-bottom: 25px; line-height: 1.5; }
.log-note strong { display: block; background: #1a1a1a; color: white; padding: 0 5px; width: fit-content; margin-bottom: 5px; }

/* --- 2. 手机端适配 (Responsive Design) --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    .page-wrapper { padding: 30px 20px; border-right: 3px solid #1a1a1a; }
    
    /* 手机端由于屏幕太窄，恢复上下排列，防止 Logo 和导航栏撞车 */
    header { flex-direction: column; align-items: flex-start; padding-bottom: 20px; }
    .nav-links { margin-top: 15px; margin-bottom: 0; }
    
    .site-title { font-size: 1.8rem; letter-spacing: 0; }
    .nav-links a { margin-right: 15px; margin-bottom: 10px; font-size: 0.8rem; }
    
    .layout-grid { grid-template-columns: 1fr; gap: 40px; }
    .sidebar-log { border-left: none; padding-left: 0; border-top: 1px solid #ddd; padding-top: 30px; }
    
    #article-body { font-size: 1.1rem; }
}

/* --- 3. 文章内容与图片排版 --- */
#content-view { display: none; }
.back-btn { 
    cursor: pointer; font-family: Consolas, Monaco, "Courier New", Courier, monospace; font-weight: bold; 
    margin-bottom: 30px; display: inline-block; background: #1a1a1a; color: white; padding: 5px 15px;
}

#article-body { text-align: justify; text-justify: inter-character; }
#article-body p { margin-bottom: 1.6em; }

#article-body img {
    display: block;
    margin: 40px auto 15px auto;
    max-width: 100%;
    height: auto;
    border: 1px solid #1a1a1a;
    filter: contrast(1.05);
}

#article-body small {
    display: block;
    text-align: center;
    margin-top: -5px;
    margin-bottom: 40px;
    color: #666;
    font-family: Consolas, Monaco, "Courier New", Courier, monospace;
    font-size: 0.8rem;
}

footer { margin-top: 80px; padding-top: 20px; font-family: Consolas, Monaco, monospace; font-size: 0.7rem; color: #888; text-align: center; }

/* --- 4. 悬浮交互动效 (Hover Effects) --- */
.site-title:hover {
    text-decoration: underline;
    text-underline-offset: 8px;
    text-decoration-thickness: 2px;
}

.post-card:hover h2 {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 1px;
    text-decoration-color: #555;
}

/* --- 5. 正文文本强调 (Typography Emphasis) --- */
#article-body strong {
    font-weight: 900;
    color: #000000;
}

/* --- 6. 侧栏朋友圈交互样式 --- */
.log-header {
    cursor: pointer;
}
.log-header:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: #555;
}
.log-preview {
    color: #666;
    line-height: 1.5;
    margin-top: 3px;
}
.log-content {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ccc;
    font-size: 0.85rem;
    color: #333;
}
.log-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid #1a1a1a;
    margin: 10px 0;
    display: block;
    box-sizing: border-box;
}
.log-content p {
    margin-bottom: 0.8em;
}

/* 语言切换标签样式 */
.lang-toggle {
    margin-left: auto; 
    cursor: pointer;
    color: #1a1a1a;
    font-weight: bold;
    transition: opacity 0.2s;
}
.lang-toggle:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.6;
}

/* --- 7. 全局极简滚动条 (Custom Scrollbar) --- */
::-webkit-scrollbar {
    width: 5px;  
    height: 5px; 
}
::-webkit-scrollbar-track {
    background: transparent; 
}
::-webkit-scrollbar-thumb {
    background-color: #1a1a1a; 
    border-radius: 0px; 
}
::-webkit-scrollbar-thumb:hover {
    background-color: #555; 
}
