/* 
Theme Name: 极简留白 
Theme URI: 
Author: 自定义 
Description: 零外链极简自适应博客主题 
Version: 1.0 
License: GPLv2 
Tags: 极简, 自适应, SEO, 无外链 
*/ 
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: system-ui, -apple-system, sans-serif; 
} 
:root { 
    --primary: #2563eb; 
    --bg: #f8fafc; 
    --card: #ffffff; 
    --border: #e2e8f0; 
    --text1: #1e293b; 
    --text2: #64748b; 
    --radius: 8px; 
    --shadow: 0 2px 10px rgba(0,0,0,0.05); 
} 
body { 
    background: var(--bg); 
    color: var(--text1); 
    line-height: 1.7; 
} 
a { 
    color: var(--primary); 
    text-decoration: none; 
    transition: .3s; 
} 
a:hover { 
    opacity: .8; 
} 
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
} 
/* 顶部固定导航 */ 
.site-header { 
    background: var(--card); 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    z-index: 999; 
    padding: 15px 0; 
} 
.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
} 
.site-title { 
    font-size: 20px; 
    font-weight: 700; 
    color: var(--text1); 
} 
.nav-menu { 
    display: flex; 
    gap: 30px; 
    list-style: none; 
} 
.nav-menu a { 
    color: var(--text1); 
    font-weight: 500; 
} 
.nav-menu a:hover { 
    color: var(--primary); 
} 
/* 首页布局：左主右侧边 */ 
.grid-layout { 
    display: grid; 
    grid-template-columns: 1fr 300px; 
    gap: 30px; 
    margin: 30px 0; 
} 
/* 置顶文章大图 */ 
.sticky-post { 
    background: var(--card); 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    margin-bottom: 20px; 
} 
.sticky-thumb img { 
    width: 100%; 
    height: 300px; 
    object-fit: cover; 
} 
.sticky-body { 
    padding: 25px; 
} 
.sticky-title { 
    font-size: 24px; 
    margin-bottom: 10px; 
} 
.sticky-title a { 
    color: var(--text1); 
} 
.sticky-meta { 
    font-size: 14px; 
    color: var(--text2); 
    margin-bottom: 12px; 
} 
/* 普通文章 左文右图 全新布局 */ 
.post-item { 
    display: grid; 
    grid-template-columns: 1fr 160px; 
    gap: 20px; 
    background: var(--card); 
    border-radius: var(--radius); 
    padding: 20px; 
    margin-bottom: 15px; 
    box-shadow: var(--shadow); 
} 
.post-item-thumb img { 
    width: 100%; 
    height: 100px; 
    object-fit: cover; 
    border-radius: var(--radius); 
} 
.post-item-title { 
    font-size: 18px; 
    margin-bottom: 8px; 
} 
.post-item-title a { 
    color: var(--text1); 
} 
.post-item-meta { 
    font-size: 13px; 
    color: var(--text2); 
    margin-bottom: 8px; 
} 
.post-item-excerpt { 
    font-size: 14px; 
    color: var(--text2); 
} 
/* 悬浮侧边栏 */ 
.sidebar { 
    position: sticky; 
    top: 80px; 
    height: fit-content; 
} 
.sidebar-widget { 
    background: var(--card); 
    border-radius: var(--radius); 
    padding: 20px; 
    margin-bottom: 20px; 
    box-shadow: var(--shadow); 
} 
.widget-title { 
    font-size: 16px; 
    margin-bottom: 15px; 
    padding-bottom: 8px; 
    border-bottom: 1px solid var(--border); 
} 
.widget-list { 
    list-style: none; 
    font-size: 14px; 
} 
.widget-list li { 
    padding: 7px 0; 
    border-bottom: 1px dashed var(--border); 
} 
.search-form input { 
    width: 100%; 
    padding: 8px 12px; 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
} 
/* 分页 */ 
.pagination { 
    display: flex; 
    gap: 8px; 
    margin: 30px 0; 
} 
.page-numbers { 
    padding: 6px 14px; 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    color: var(--text1); 
} 
.page-numbers.current { 
    background: var(--primary); 
    color: #fff; 
    border-color: var(--primary); 
} 
/* 猜你喜欢 10篇随机 4列网格 */ 
.guess-like { 
    margin: 40px 0; 
} 
.guess-like h3 { 
    font-size: 18px; 
    margin-bottom: 20px; 
    color: var(--primary); 
} 
.guess-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
} 
.guess-item { 
    background: var(--card); 
    border-radius: var(--radius); 
    padding: 15px; 
    box-shadow: var(--shadow); 
    font-size: 14px; 
    text-align: center; 
} 
/* 文章页 居中窄幅 无侧边栏 全新布局 */ 
.single-content { 
    max-width: 800px; 
    margin: 30px auto; 
    background: var(--card); 
    border-radius: var(--radius); 
    padding: 40px; 
    box-shadow: var(--shadow); 
} 
.single-content h1 { 
    font-size: 26px; 
    margin-bottom: 15px; 
    line-height: 1.4; 
} 
.single-meta { 
    font-size: 14px; 
    color: var(--text2); 
    padding-bottom: 15px; 
    border-bottom: 1px solid var(--border); 
    margin-bottom: 25px; 
} 
.content-body p { 
    margin-bottom: 15px; 
} 
.content-body img { 
    max-width: 100%; 
    border-radius: var(--radius); 
    margin: 15px 0; 
} 
.content-body h2, .content-body h3 { 
    margin: 25px 0 10px; 
    color: var(--primary); 
} 
/* 相关推荐 6篇 3列网格 和猜你喜欢完全不同 */ 
.related-posts { 
    max-width: 800px; 
    margin: 0 auto 30px; 
} 
.related-posts h3 { 
    font-size: 18px; 
    margin-bottom: 20px; 
    color: var(--primary); 
} 
.related-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 15px; 
} 
.related-card { 
    background: var(--card); 
    border-radius: var(--radius); 
    padding: 15px; 
    box-shadow: var(--shadow); 
    font-size: 14px; 
} 
.related-date { 
    font-size: 12px; 
    color: var(--text2); 
    margin-top: 8px; 
} 
/* 上下篇导航 */ 
.post-nav { 
    max-width: 800px; 
    margin: 0 auto 30px; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
} 
.nav-item { 
    background: var(--card); 
    border-radius: var(--radius); 
    padding: 20px; 
    box-shadow: var(--shadow); 
    font-size: 14px; 
} 
.nav-item:last-child { 
    text-align: right; 
} 
/* 面包屑 */ 
.breadcrumb { 
    background: var(--card); 
    border-radius: var(--radius); 
    padding: 10px 15px; 
    font-size: 13px; 
    color: var(--text2); 
    margin-bottom: 20px; 
    box-shadow: var(--shadow); 
} 
/* 底部 */ 
.site-footer { 
    background: var(--card); 
    border-top: 1px solid var(--border); 
    padding: 25px 0; 
    text-align: center; 
    font-size: 14px; 
    color: var(--text2); 
    margin-top: 50px; 
} 
/* 返回顶部 */ 
.back-top { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 40px; 
    height: 40px; 
    background: var(--primary); 
    color: #fff; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    opacity: 0; 
    visibility: hidden; 
    transition: .3s; 
} 
.back-top.show { 
    opacity: 1; 
    visibility: visible; 
} 
/* 移动端适配 */ 
@media (max-width: 768px) { 
    .grid-layout { 
        grid-template-columns: 1fr; 
    } 
    .post-item { 
        grid-template-columns: 1fr; 
    } 
    .post-item-thumb { 
        order: -1; 
    } 
    .post-item-thumb img { 
        height: 180px; 
    } 
    .sticky-thumb img { 
        height: 180px; 
    } 
    .sticky-body { 
        padding: 20px; 
    } 
    .sticky-title { 
        font-size: 20px; 
    } 
    .guess-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
    .related-grid { 
        grid-template-columns: 1fr; 
    } 
    .single-content { 
        padding: 20px; 
    } 
    .post-nav { 
        grid-template-columns: 1fr; 
    } 
    .nav-menu { 
        gap: 15px; 
        font-size: 14px; 
    } 
    .back-top { 
        bottom: 20px; 
        right: 20px; 
    } 
} 