/* 
Theme Name: 风信杂志 
Theme URI: https://example.com  
Author: 自定义 
Description: 3列瀑布流杂志风自适应博客主题 
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: #7c3aed; 
    --secondary: #06b6d4; 
    --gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%); 
    --bg: #f8fafc; 
    --card: #ffffff; 
    --border: #e2e8f0; 
    --text1: #1e293b; 
    --text2: #64748b; 
    --radius: 12px; 
} 
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: 1300px; 
    margin: 0 auto; 
    padding: 0 20px; 
} 
/* 阅读进度条 */ 
.read-progress { 
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 3px; 
    background: var(--gradient); 
    z-index: 1001; 
    width: 0%; 
} 
/* 顶部导航 */ 
.site-header { 
    background: var(--card); 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 3px; 
    z-index: 999; 
    padding: 12px 0; 
} 
.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
} 
.site-title { 
    font-size: 20px; 
    font-weight: 700; 
    background: var(--gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
} 
.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); 
} 
/* 轮播 仅首页显示 */ 
.carousel-wrap { 
    margin: 20px 0; 
    border-radius: var(--radius); 
    overflow: hidden; 
    position: relative; 
    height: 380px; 
} 
.carousel-list { 
    display: flex; 
    transition: transform .5s ease; 
    height: 100%; 
} 
.carousel-item { 
    min-width: 100%; 
    height: 100%; 
    position: relative; 
} 
.carousel-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
} 
.carousel-info { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    padding: 40px; 
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent); 
    color: #fff; 
} 
.carousel-title { 
    font-size: 28px; 
    font-weight: 600; 
    margin-bottom: 10px; 
    color: #fff; 
} 
.carousel-meta { 
    font-size: 14px; 
    opacity: .9; 
} 
/* 主布局 */ 
.grid-layout { 
    display: grid; 
    grid-template-columns: 1fr 320px; 
    gap: 30px; 
    margin: 30px 0; 
} 
/* 3列瀑布流文章 */ 
.post-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px; 
} 
.post-card { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    overflow: hidden; 
    transition: .3s; 
} 
.post-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 25px rgba(124,58,237,0.1); 
} 
.post-thumb img { 
    width: 100%; 
    height: 160px; 
    object-fit: cover; 
} 
.post-card-body { 
    padding: 18px; 
} 
.post-cat { 
    display: inline-block; 
    padding: 2px 8px; 
    background: var(--gradient); 
    color: #fff; 
    font-size: 12px; 
    border-radius: 4px; 
    margin-bottom: 8px; 
} 
.post-title { 
    font-size: 16px; 
    line-height: 1.5; 
    margin-bottom: 8px; 
} 
.post-title a { 
    color: var(--text1); 
} 
.post-title a:hover { 
    color: var(--primary); 
} 
.post-meta { 
    font-size: 12px; 
    color: var(--text2); 
    display: flex; 
    gap: 12px; 
} 
/* 悬浮侧边栏 */ 
.sidebar { 
    position: sticky; 
    top: 80px; 
    height: fit-content; 
} 
.sidebar-widget { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 20px; 
    margin-bottom: 20px; 
} 
.widget-title { 
    font-size: 16px; 
    margin-bottom: 15px; 
    padding-bottom: 8px; 
    border-bottom: 1px solid var(--border); 
    background: var(--gradient); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
} 
/* 热榜带序号 */ 
.hot-list { 
    list-style: none; 
    counter-reset: hot; 
} 
.hot-list li { 
    padding: 10px 0; 
    border-bottom: 1px dashed var(--border); 
    display: flex; 
    gap: 10px; 
    align-items: center; 
    font-size: 14px; 
} 
.hot-list li::before { 
    counter-increment: hot; 
    content: counter(hot); 
    width: 20px; 
    height: 20px; 
    background: var(--primary); 
    color: #fff; 
    font-size: 12px; 
    border-radius: 4px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0; 
} 
.hot-list li:nth-child(1)::before { 
    background: #ef4444; 
} 
.hot-list li:nth-child(2)::before { 
    background: #f59e0b; 
} 
.hot-list li:nth-child(3)::before { 
    background: #10b981; 
} 
/* 彩色标签云 */ 
.tag-cloud { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
} 
.tag-cloud a { 
    padding: 4px 10px; 
    background: var(--bg); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    font-size: 12px; 
    color: var(--text1); 
} 
.tag-cloud a:hover { 
    background: var(--gradient); 
    color: #fff; 
    border-color: transparent; 
} 
.search-form input { 
    width: 100%; 
    padding: 10px 15px; 
    border: 1px solid var(--border); 
    border-radius: 20px; 
} 
/* 分页 */ 
.pagination { 
    display: flex; 
    gap: 8px; 
    justify-content: center; 
    margin: 30px 0; 
} 
.page-numbers { 
    padding: 8px 16px; 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    color: var(--text1); 
} 
.page-numbers.current { 
    background: var(--gradient); 
    color: #fff; 
    border-color: transparent; 
} 
/* 猜你喜欢 标签卡片样式 10篇随机 */ 
.guess-like { 
    margin: 40px 0; 
} 
.guess-like h3 { 
    font-size: 20px; 
    margin-bottom: 20px; 
    color: var(--primary); 
} 
.guess-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px; 
} 
.guess-item { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 15px; 
    font-size: 14px; 
    text-align: center; 
} 
.guess-tag { 
    display: inline-block; 
    padding: 2px 6px; 
    background: var(--secondary); 
    color: #fff; 
    font-size: 12px; 
    border-radius: 4px; 
    margin-bottom: 8px; 
} 
/* 文章页 全屏题图+窄幅内容 */ 
.single-header { 
    width: 100%; 
    height: 350px; 
    position: relative; 
    margin-bottom: -80px; 
} 
.single-header img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
} 
.single-content { 
    max-width: 800px; 
    margin: 0 auto 30px; 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 40px; 
    position: relative; 
    z-index: 10; 
} 
.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; 
} 
/* 相关推荐 时间线样式 和猜你喜欢完全不同 */ 
.related-posts { 
    max-width: 800px; 
    margin: 0 auto 30px; 
} 
.related-posts h3 { 
    font-size: 18px; 
    margin-bottom: 20px; 
    color: var(--primary); 
} 
.related-timeline { 
    list-style: none; 
    border-left: 2px solid var(--border); 
    padding-left: 20px; 
} 
.related-timeline li { 
    margin-bottom: 20px; 
    position: relative; 
} 
.related-timeline li::before { 
    content: ''; 
    position: absolute; 
    left: -26px; 
    top: 5px; 
    width: 10px; 
    height: 10px; 
    background: var(--primary); 
    border-radius: 50%; 
} 
.related-title { 
    font-size: 15px; 
    margin-bottom: 5px; 
} 
.related-date { 
    font-size: 12px; 
    color: var(--text2); 
} 
/* 上下篇导航 */ 
.post-nav { 
    max-width: 800px; 
    margin: 0 auto 30px; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 20px; 
} 
.nav-item { 
    background: var(--card); 
    border: 1px solid var(--border); 
    border-radius: var(--radius); 
    padding: 20px; 
    font-size: 14px; 
} 
.nav-item:last-child { 
    text-align: right; 
} 
/* 底部 */ 
.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; 
} 
/* 移动端适配 */ 
@media (max-width: 768px) { 
    .grid-layout { 
        grid-template-columns: 1fr; 
    } 
    .post-grid { 
        grid-template-columns: 1fr; 
    } 
    .carousel-wrap { 
        height: 220px; 
    } 
    .carousel-info { 
        padding: 20px; 
    } 
    .carousel-title { 
        font-size: 18px; 
    } 
    .guess-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
    .single-header { 
        height: 200px; 
        margin-bottom: -50px; 
    } 
    .single-content { 
        padding: 20px; 
    } 
    .nav-menu { 
        gap: 15px; 
        font-size: 14px; 
    } 
} 