/* 博客园现代极简风 CSS - 适配版 */

/* 1. 全局变量 */
:root {
    --primary-color: #3b82f6;
    --bg-color: #f4f6f9;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --radius: 8px;
}

/* 2. 基础重置 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    background-color: var(--bg-color) !important;
    color: var(--text-main) !important;
    line-height: 1.6;
}

a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

/* 3. 布局容器 */
#home {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 隐藏不需要的元素 (如顶部的导航条，如果不喜欢的话) */
#navigator {
    display: none; 
}

/* 4. 主内容区 */
#main {
    width: calc(100% - 320px); /* 留出侧边栏空间 */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 文章列表/卡片样式 */
.day, .post {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 0 !important; /* 清除默认margin */
}

.postTitle {
    font-size: 1.5rem !important;
    font-weight: 700;
    margin-bottom: 10px !important;
    border-left: none !important;
    padding-left: 0 !important;
}

.postTitle a {
    color: var(--text-main) !important;
}

.postTitle a:hover {
    color: var(--primary-color) !important;
}

.postCon, .postBody {
    font-size: 1rem;
    color: #4b5563 !important;
}

/* 代码块样式美化 */
.cnblogs_code {
    background-color: #1e293b !important;
    border-radius: 6px !important;
    border: none !important;
    font-family: 'Menlo', monospace !important;
}

.cnblogs_code pre {
    color: #e2e8f0 !important;
    background: none !important;
    font-size: 14px !important;
}

/* 隐藏代码区自带的复制按钮等，保持整洁 */
.cnblogs_code_toolbar {
    display: none !important;
}

/* 5. 侧边栏 */
#sideBar {
    width: 300px;
    flex-shrink: 0;
}

.newsItem, .catListEssay, .catListLink, .catListNoteBook, .catListTag, .catListPostCategory {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.catListTitle {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--bg-color);
    padding-bottom: 10px;
    color: var(--text-main) !important;
}

/* 侧边栏列表项 */
.sidebar-block li, .sidebar-block ul {
    list-style: none !important;
}

.sidebar-block li a {
    display: block;
    padding: 8px 0;
    color: var(--text-secondary) !important;
    border-bottom: 1px dashed var(--border-color);
}

.sidebar-block li a:hover {
    color: var(--primary-color) !important;
    padding-left: 4px; /* 悬停微动效 */
}

/* 6. 响应式适配 (手机端) */
@media (max-width: 768px) {
    #home {
        flex-direction: column;
    }
    #main, #sideBar {
        width: 100%;
    }
}