/* 
Theme Name: dark_blog墨黑轻博客 
Theme URI: https://example.com  
Author: 自定义 
Description: 磨砂玻璃风自适应SEO博客主题 
Version: 1.0 
License: GPLv2 
Tags: 深色, 磨砂, 自适应, SEO, 轻量 
*/ 
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: system-ui, -apple-system, sans-serif; 
} 
/* 明暗模式变量自动适配 */ 
:root { 
    --bg-primary: #f8fafc; 
    --bg-secondary: #ffffff; 
    --bg-glass: rgba(255,255,255,0.8); 
    --border: #e2e8f0; 
    --text-primary: #0f172a; 
    --text-secondary: #64748b; 
    --accent: #10b981; 
    --shadow: 0 4px 20px rgba(0,0,0,0.05); 
    --radius: 12px; 
} 
@media (prefers-color-scheme: dark) { 
    :root { 
        --bg-primary: #0f172a; 
        --bg-secondary: #1e293b; 
        --bg-glass: rgba(30,41,59,0.8); 
        --border: #334155; 
        --text-primary: #f1f5f9; 
        --text-secondary: #94a3b8; 
        --accent: #34d399; 
        --shadow: 0 4px 20px rgba(0,0,0,0.2); 
    } 
} 
body { 
    background: var(--bg-primary); 
    color: var(--text-primary); 
    line-height: 1.7; 
} 
a { 
    color: var(--accent); 
    text-decoration: none; 
    transition: all 0.3s ease; 
} 
a:hover { 
    opacity: 0.8; 
} 
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
} 
.grid-layout { 
    display: grid; 
    grid-template-columns: 1fr 300px; 
    gap: 30px; 
    margin: 30px 0; 
} 
/* 磨砂导航栏 */ 
.site-header { 
    background: var(--bg-glass); 
    backdrop-filter: blur(10px); 
    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(--accent); 
} 
.nav-menu { 
    display: flex; 
    gap: 25px; 
    list-style: none; 
} 
.nav-menu a { 
    color: var(--text-primary); 
    font-weight: 500; 
} 
.nav-menu a:hover { 
    color: var(--accent); 
} 
/* 文章卡片 悬浮动效 */ 
.post-card { 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 25px; 
    margin-bottom: 20px; 
    box-shadow: var(--shadow); 
    transition: all 0.3s ease; 
} 
.post-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 30px rgba(16,185,129,0.1); 
    border-color: var(--accent); 
} 
.post-thumb img { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
    border-radius: var(--radius); 
    margin-bottom: 15px; 
} 
.post-title { 
    font-size: 20px; 
    margin-bottom: 10px; 
    line-height: 1.4; 
} 
.post-title a { 
    color: var(--text-primary); 
} 
.post-title a:hover { 
    color: var(--accent); 
} 
.post-meta { 
    color: var(--text-secondary); 
    font-size: 13px; 
    margin-bottom: 12px; 
    display: flex; 
    gap: 18px; 
} 
.post-excerpt { 
    color: var(--text-secondary); 
    font-size: 14px; 
    margin-bottom: 12px; 
} 
.read-more { 
    font-size: 14px; 
    font-weight: 500; 
    display: inline-block; 
    padding: 6px 16px; 
    border: 1px solid var(--accent); 
    border-radius: 20px; 
} 
.read-more:hover { 
    background: var(--accent); 
    color: #fff; 
} 
/* 侧边栏磨砂效果 */ 
.sidebar-widget { 
    background: var(--bg-glass); 
    backdrop-filter: blur(10px); 
    border: 1px solid var(--border); 
    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); 
    color: var(--accent); 
} 
.widget-list { 
    list-style: none; 
    font-size: 14px; 
} 
.widget-list li { 
    padding: 8px 0; 
    border-bottom: 1px dashed var(--border); 
} 
.widget-list li:last-child { 
    border: none; 
} 
.search-form input { 
    width: 100%; 
    padding: 10px 15px; 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    background: var(--bg-secondary); 
    color: var(--text-primary); 
} 
/* 文章页 */ 
.single-content { 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 30px; 
    box-shadow: var(--shadow); 
} 
.single-content h1 { 
    font-size: 26px; 
    margin-bottom: 15px; 
    line-height: 1.4; 
    color: var(--accent); 
} 
.single-content .post-meta { 
    padding-bottom: 15px; 
    border-bottom: 1px solid var(--border); 
    margin-bottom: 20px; 
} 
.content-body { 
    color: var(--text-primary); 
} 
.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: 20px 0 10px; 
    color: var(--accent); 
} 
/* 分页 */ 
.pagination { 
    display: flex; 
    gap: 10px; 
    justify-content: center; 
    margin: 30px 0; 
} 
.page-numbers { 
    padding: 8px 16px; 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    color: var(--text-primary); 
} 
.page-numbers.current { 
    background: var(--accent); 
    color: #fff; 
    border-color: var(--accent); 
} 
/* 首页猜你喜欢 随机10篇 文字列表样式 */ 
.guess-like { 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 25px; 
    margin: 40px 0; 
    box-shadow: var(--shadow); 
} 
.guess-like h3 { 
    font-size: 18px; 
    margin-bottom: 15px; 
    color: var(--accent); 
} 
.guess-list { 
    columns: 2; 
    list-style: none; 
    gap: 15px; 
} 
.guess-list li { 
    padding: 6px 0; 
    font-size: 14px; 
    display: flex; 
    justify-content: space-between; 
} 
.guess-date { 
    color: var(--text-secondary); 
    font-size: 12px; 
} 
/* 文章页相关推荐4篇 卡片样式 与猜你喜欢完全不同 */ 
.related-posts { 
    margin: 30px 0; 
} 
.related-posts h3 { 
    font-size: 18px; 
    margin-bottom: 20px; 
    color: var(--accent); 
} 
.related-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
} 
.related-card { 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 15px; 
    box-shadow: var(--shadow); 
    font-size: 14px; 
} 
.related-card img { 
    width: 100%; 
    height: 100px; 
    object-fit: cover; 
    border-radius: var(--radius); 
    margin-bottom: 10px; 
} 
/* 上下篇导航 */ 
.post-nav { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
    margin: 20px 0; 
} 
.nav-item { 
    background: var(--bg-secondary); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 20px; 
    box-shadow: var(--shadow); 
    font-size: 14px; 
} 
.nav-item:last-child { 
    text-align: right; 
} 
/* 底部 */ 
.site-footer { 
    background: var(--bg-secondary); 
    border-top: 1px solid var(--border); 
    padding: 25px 0; 
    text-align: center; 
    font-size: 14px; 
    color: var(--text-secondary); 
    margin-top: 50px; 
} 
/* 返回顶部按钮 */ 
.back-top { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 45px; 
    height: 45px; 
    background: var(--accent); 
    color: #fff; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    opacity: 0; 
    visibility: hidden; 
    transition: all 0.3s ease; 
    box-shadow: var(--shadow); 
} 
.back-top.show { 
    opacity: 1; 
    visibility: visible; 
} 
/* 移动端适配 */ 
@media (max-width: 768px) { 
    .grid-layout { 
        grid-template-columns: 1fr; 
    } 
    .nav-menu { 
        gap: 15px; 
        font-size: 14px; 
    } 
    .guess-list { 
        columns: 1; 
    } 
    .related-grid { 
        grid-template-columns: 1fr; 
    } 
    .post-nav { 
        grid-template-columns: 1fr; 
    } 
    .single-content { 
        padding: 20px; 
    } 
    .back-top { 
        bottom: 20px; 
        right: 20px; 
        width: 40px; 
        height: 40px; 
    } 
} 