/* 
Theme Name: minimal-seo-blog 
Theme URI: https://example.com/theme/  
Author: 独立开发 
Author URI: https://example.com/  
Description: 轻量自适应WordPress博客模板，符合百度/谷歌SEO标准，内置相关文章、上下篇导航、侧边栏模块 
Version: 1.0 
License: GPL v2 or later 
License URI: https://www.gnu.org/licenses/gpl-2.0.html  
Tags: blog, responsive, seo, minimal 
Text Domain: minimal-seo 
*/ 
 
/* 全局变量与重置 */ 
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
} 
:root { 
    --primary: #2563eb; 
    --text-main: #1e293b; 
    --text-secondary: #64748b; 
    --border: #e2e8f0; 
    --bg-light: #f8fafc; 
    --white: #ffffff; 
} 
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; 
    line-height: 1.7; 
    color: var(--text-main); 
    background-color: #f9fafb; 
} 
a { 
    color: var(--primary); 
    text-decoration: none; 
    transition: all 0.3s ease; 
} 
a:hover { 
    color: #1d4ed8; 
} 
img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 6px; 
} 
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
} 
 
/* 头部样式 */ 
.site-header { 
    background: var(--white); 
    border-bottom: 1px solid var(--border); 
    padding: 1.5rem 0; 
    margin-bottom: 2rem; 
} 
.header-wrap { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-wrap: wrap; 
} 
.site-title { 
    font-size: 1.8rem; 
    font-weight: 700; 
} 
.site-desc { 
    font-size: 0.9rem; 
    color: var(--text-secondary); 
} 
.primary-nav ul { 
    display: flex; 
    gap: 1.5rem; 
    list-style: none; 
} 
.primary-nav a { 
    color: var(--text-main); 
    font-weight: 500; 
} 
.primary-nav a:hover { 
    color: var(--primary); 
} 
 
/* 面包屑 */ 
.breadcrumb { 
    background: var(--white); 
    padding: 0.8rem 1rem; 
    border-radius: 6px; 
    margin-bottom: 2rem; 
    font-size: 0.9rem; 
    color: var(--text-secondary); 
    border: 1px solid var(--border); 
} 
 
/* 内容布局 */ 
.content-wrap { 
    display: grid; 
    grid-template-columns: 1fr 320px; 
    gap: 2rem; 
} 
.primary-content { 
    background: var(--white); 
    border-radius: 8px; 
    padding: 2rem; 
    border: 1px solid var(--border); 
} 
 
/* 文章列表 */ 
.post-item { 
    margin-bottom: 2.5rem; 
    padding-bottom: 2.5rem; 
    border-bottom: 1px solid var(--border); 
} 
.post-item:last-child { 
    border-bottom: 0; 
    margin-bottom: 0; 
    padding-bottom: 0; 
} 
.post-thumb { 
    margin-bottom: 1rem; 
    overflow: hidden; 
} 
.post-thumb img { 
    transition: transform 0.3s ease; 
    width: 100%; 
    object-fit: cover; 
} 
.post-thumb img:hover { 
    transform: scale(1.03); 
} 
.post-title { 
    font-size: 1.5rem; 
    margin-bottom: 0.8rem; 
    font-weight: 600; 
} 
.post-meta { 
    font-size: 0.9rem; 
    color: var(--text-secondary); 
    margin-bottom: 1rem; 
    display: flex; 
    gap: 1rem; 
    flex-wrap: wrap; 
} 
.post-excerpt { 
    color: var(--text-secondary); 
    margin-bottom: 1rem; 
} 
.read-more { 
    display: inline-block; 
    padding: 0.5rem 1rem; 
    background: var(--primary); 
    color: #fff; 
    border-radius: 4px; 
    font-size: 0.9rem; 
} 
.read-more:hover { 
    background: #1d4ed8; 
    color: #fff; 
} 
 
/* 分页 */ 
.pagination { 
    margin-top: 2rem; 
    display: flex; 
    justify-content: space-between; 
} 
.pagination a { 
    padding: 0.5rem 1rem; 
    border: 1px solid var(--border); 
    border-radius: 4px; 
} 
 
/* 单篇文章 */ 
.single-post .post-title { 
    font-size: 2rem; 
    margin-bottom: 1rem; 
} 
.post-content { 
    margin: 2rem 0; 
} 
.post-content h2, .post-content h3 { 
    margin: 1.5rem 0 1rem; 
    font-weight: 600; 
} 
.post-content p { 
    margin-bottom: 1rem; 
} 
.post-content ul, .post-content ol { 
    margin: 1rem 0 1rem 2rem; 
    list-style: disc; 
} 
.post-tags { 
    margin: 1.5rem 0; 
    padding-top: 1.5rem; 
    border-top: 1px solid var(--border); 
    font-size: 0.9rem; 
} 
 
/* 上下篇导航 */ 
.post-nav { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem; 
    margin: 2rem 0; 
    padding: 1.5rem 0; 
    border-top: 1px solid var(--border); 
    border-bottom: 1px solid var(--border); 
} 
.prev-post, .next-post { 
    padding: 1rem; 
    background: var(--bg-light); 
    border-radius: 6px; 
} 
 
/* 相关文章 */ 
.related-posts { 
    margin: 2rem 0; 
} 
.related-posts h3 { 
    margin-bottom: 1.5rem; 
    font-size: 1.3rem; 
} 
.related-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.5rem; 
} 
.related-item img { 
    height: 150px; 
    width: 100%; 
    object-fit: cover; 
    margin-bottom: 0.8rem; 
} 
.related-item h4 { 
    font-size: 0.95rem; 
    font-weight: 500; 
    margin-bottom: 0.5rem; 
} 
.related-date { 
    font-size: 0.8rem; 
    color: var(--text-secondary); 
} 
 
/* 侧边栏 */ 
.sidebar .widget { 
    background: var(--white); 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    padding: 1.5rem; 
    margin-bottom: 1.5rem; 
} 
.widget-title { 
    font-size: 1.1rem; 
    margin-bottom: 1rem; 
    padding-bottom: 0.5rem; 
    border-bottom: 1px solid var(--border); 
} 
.widget ul { 
    list-style: none; 
} 
.widget ul li { 
    padding: 0.5rem 0; 
    border-bottom: 1px dashed var(--border); 
    display: flex; 
    justify-content: space-between; 
} 
.search-form { 
    display: flex; 
    gap: 0.5rem; 
} 
.search-field { 
    flex: 1; 
    padding: 0.5rem; 
    border: 1px solid var(--border); 
    border-radius: 4px; 
} 
.search-submit { 
    padding: 0.5rem 1rem; 
    background: var(--primary); 
    color: #fff; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
} 
.tag-cloud-link { 
    display: inline-block; 
    padding: 0.3rem 0.6rem; 
    background: var(--bg-light); 
    border-radius: 4px; 
    margin: 0.3rem 0.2rem; 
    font-size: 0.85rem !important; 
} 
 
/* 底部 */ 
.site-footer { 
    background: var(--white); 
    border-top: 1px solid var(--border); 
    padding: 2rem 0; 
    margin-top: 3rem; 
    text-align: center; 
} 
.footer-nav ul { 
    display: flex; 
    justify-content: center; 
    gap: 1.5rem; 
    list-style: none; 
    margin-bottom: 1rem; 
} 
.copyright { 
    color: var(--text-secondary); 
    font-size: 0.9rem; 
} 
.back-top { 
    position: fixed; 
    bottom: 2rem; 
    right: 2rem; 
    width: 45px; 
    height: 45px; 
    background: var(--primary); 
    color: #fff; 
    border-radius: 50%; 
    display: none; 
    text-align: center; 
    line-height: 45px; 
    font-size: 1.2rem; 
} 
.back-top:hover { 
    background: #1d4ed8; 
    color: #fff; 
} 
 
/* 移动端适配 */ 
@media (max-width: 768px) { 
    .header-wrap { 
        flex-direction: column; 
        gap: 1rem; 
        text-align: center; 
    } 
    .content-wrap { 
        grid-template-columns: 1fr; 
    } 
    .related-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
    .post-nav { 
        grid-template-columns: 1fr; 
    } 
    .primary-content { 
        padding: 1.5rem; 
    } 
    .single-post .post-title { 
        font-size: 1.5rem; 
    } 
} 
@media (max-width: 480px) { 
    .related-grid { 
        grid-template-columns: 1fr; 
    } 
} 