/* 
Theme Name: 瀑布流自媒体SEO主题 
Theme URI: https://你的站点地址 
Author: 你的名称 
Description: 双列卡片瀑布流主题，适配自媒体场景，原生社交SEO支持 
Version: 1.0 
License: GPL v2 
Tags: 瀑布流, 双列, 自媒体, SEO, 响应式 
Text Domain: card-flow-seo 
*/ 
 
:root { 
    --bg: #f5f7fa; 
    --card-bg: #fff; 
    --text-main: #1d2129; 
    --text-gray: #86909c; 
    --primary: #4e6ef2; 
    --primary-hover: #3654d6; 
    --border: #e5e6eb; 
    --shadow: 0 4px 12px rgba(0,0,0,0.05); 
    --radius: 12px; 
} 
[data-theme="dark"] { 
    --bg: #121212; 
    --card-bg: #1e1e1e; 
    --text-main: #e0e0e0; 
    --text-gray: #9e9e9e; 
    --primary: #64b5f6; 
    --primary-hover: #42a5f5; 
    --border: #333; 
    --shadow: 0 4px 12px rgba(0,0,0,0.3); 
} 
 
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
} 
body { 
    font-family: "PingFang SC", "Microsoft Yahei", sans-serif; 
    background: var(--bg); 
    color: var(--text-main); 
    line-height: 1.6; 
} 
a { 
    color: var(--text-main); 
    text-decoration: none; 
    transition: all 0.3s; 
} 
a:hover { 
    color: var(--primary); 
} 
img { 
    max-width: 100%; 
    height: auto; 
    border-radius: var(--radius); 
} 
 
/* 全局容器 */ 
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
} 
 
/* 阅读进度条 */ 
.progress-bar { 
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 3px; 
    background: linear-gradient(90deg, var(--primary), #87d0ff); 
    z-index: 9999; 
    width: 0%; 
} 
 
/* 顶部导航栏 */ 
.header-bar { 
    background: var(--card-bg); 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    z-index: 999; 
    box-shadow: var(--shadow); 
} 
.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1rem 0; 
} 
.site-logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--primary); 
} 
.nav-list { 
    display: flex; 
    gap: 2rem; 
    list-style: none; 
} 
.nav-list a { 
    font-weight: 500; 
} 
.nav-list a.active { 
    color: var(--primary); 
} 
 
/* 分类筛选栏 */ 
.cat-tabs { 
    margin: 2rem 0; 
    display: flex; 
    gap: 1rem; 
    flex-wrap: wrap; 
} 
.cat-tab { 
    padding: 0.5rem 1.2rem; 
    background: var(--card-bg); 
    border: 1px solid var(--border); 
    border-radius: 20px; 
    cursor: pointer; 
    transition: all 0.3s; 
} 
.cat-tab.active, .cat-tab:hover { 
    background: var(--primary); 
    color: #fff; 
    border-color: var(--primary); 
} 
 
/* 轮播区域 */ 
.swiper-area { 
    margin-bottom: 2rem; 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: var(--shadow); 
} 
.swiper-item { 
    position: relative; 
    height: 360px; 
    background: var(--card-bg); 
} 
.swiper-item img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 0; 
} 
.swiper-info { 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    padding: 2rem; 
    background: linear-gradient(transparent, rgba(0,0,0,0.7)); 
    color: #fff; 
} 
.swiper-info h2 { 
    font-size: 1.8rem; 
    margin-bottom: 0.5rem; 
} 
.swiper-info p { 
    opacity: 0.9; 
} 
 
/* 双列瀑布流布局 */ 
.content-wrap { 
    display: flex; 
    gap: 2rem; 
    margin-bottom: 3rem; 
} 
.post-grid { 
    flex: 1; 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.5rem; 
} 
.post-card-flow { 
    background: var(--card-bg); 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    transition: transform 0.3s; 
    border: 1px solid var(--border); 
} 
.post-card-flow:hover { 
    transform: translateY(-5px); 
} 
.post-thumb { 
    height: 180px; 
    overflow: hidden; 
} 
.post-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 0; 
    transition: transform 0.5s; 
} 
.post-card-flow:hover .post-thumb img { 
    transform: scale(1.1); 
} 
.post-info { 
    padding: 1.2rem; 
} 
.post-title-flow { 
    font-size: 1.1rem; 
    font-weight: 600; 
    margin-bottom: 0.8rem; 
    line-height: 1.5; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
} 
.post-meta-flow { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.85rem; 
    color: var(--text-gray); 
} 
 
/* 悬浮侧边栏 */ 
.sidebar-sticky { 
    flex: 0 0 300px; 
    position: sticky; 
    top: 80px; 
    align-self: flex-start; 
} 
.widget-flow { 
    background: var(--card-bg); 
    border-radius: var(--radius); 
    padding: 1.5rem; 
    margin-bottom: 1.5rem; 
    border: 1px solid var(--border); 
} 
.widget-title-flow { 
    font-size: 1.1rem; 
    margin-bottom: 1rem; 
    padding-bottom: 0.5rem; 
    border-bottom: 1px solid var(--border); 
} 
.widget-list { 
    list-style: none; 
} 
.widget-list li { 
    margin-bottom: 0.8rem; 
    padding-bottom: 0.8rem; 
    border-bottom: 1px dashed var(--border); 
    display: -webkit-box; 
    -webkit-line-clamp: 2; /* 原数值是1，改成2=最多显示2行，可自定义数字 */ 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
    line-height: 10.5; /* 新增行高，多行时间距更舒适 */ 
} 
 
/* 文章页 */ 
.single-wrap { 
    flex: 1; 
    background: var(--card-bg); 
    border-radius: var(--radius); 
    padding: 2rem; 
    box-shadow: var(--shadow); 
} 
.single-title { 
    font-size: 2rem; 
    margin-bottom: 1rem; 
    line-height: 1.4; 
} 
.single-meta { 
    color: var(--text-gray); 
    margin-bottom: 1.5rem; 
    padding-bottom: 1rem; 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    gap: 1.5rem; 
    flex-wrap: wrap; 
} 
.share-btns { 
    display: flex; 
    gap: 1rem; 
    margin-bottom: 1.5rem; 
} 
.share-btn { 
    padding: 0.5rem 1rem; 
    border-radius: 6px; 
    color: #fff; 
    font-size: 0.9rem; 
} 
.share-wx { background: #07c160; } 
.share-wb { background: #e6162d; } 
.share-link { background: var(--primary); } 
.single-content { 
    line-height: 1.8; 
} 
.single-content h2, .single-content h3 { 
    margin: 1.5rem 0 1rem 0; 
    font-weight: 600; 
} 
.single-content p { 
    margin-bottom: 1rem; 
} 
 
/* 分页 */ 
.pagination-flow { 
    grid-column: 1 / -1; 
    display: flex; 
    gap: 0.5rem; 
    justify-content: center; 
    margin-top: 1rem; 
} 
.pagination-flow a, .pagination-flow span { 
    padding: 0.5rem 1rem; 
    border-radius: 6px; 
    background: var(--card-bg); 
    border: 1px solid var(--border); 
} 
.pagination-flow .current { 
    background: var(--primary); 
    color: #fff; 
    border-color: var(--primary); 
} 
 
/* 页脚 */ 
.footer-bar { 
    background: var(--card-bg); 
    border-top: 1px solid var(--border); 
    padding: 2rem 0; 
    text-align: center; 
    color: var(--text-gray); 
} 
 
/* 响应式适配 */ 
@media (max-width: 1024px) { 
    .post-grid { 
        grid-template-columns: 1fr; 
    } 
    .sidebar-sticky { 
        flex: 0 0 260px; 
    } 
} 
@media (max-width: 768px) { 
    .content-wrap { 
        flex-direction: column; 
    } 
    .sidebar-sticky { 
        position: static; 
        width: 100%; 
    } 
    .nav-list { 
        gap: 1rem; 
        font-size: 0.9rem; 
    } 
    .swiper-item { 
        height: 240px; 
    } 
    .swiper-info h2 { 
        font-size: 1.3rem; 
    } 
    .single-title { 
        font-size: 1.5rem; 
    } 
} 
/* 分类页横排列表样式 */ 
.horizontal-list { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
} 
.horizontal-card { 
    background: var(--card-bg); 
    border-radius: var(--radius); 
    border: 1px solid var(--border); 
    box-shadow: var(--shadow); 
    display: flex; 
    gap: 1.5rem; 
    overflow: hidden; 
    transition: transform 0.3s; 
} 
.horizontal-card:hover { 
    transform: translateX(5px); 
} 
.horizontal-thumb { 
    flex: 0 0 200px; 
    height: 140px; 
    overflow: hidden; 
} 
.horizontal-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    border-radius: 0; 
} 
.horizontal-content { 
    flex: 1; 
    padding: 1.5rem 1.5rem 1.5rem 0; 
} 
.horizontal-title { 
    font-size: 1.2rem; 
    font-weight: 600; 
    margin-bottom: 0.8rem; 
    line-height: 1.5; 
} 
.horizontal-excerpt { 
    color: var(--text-gray); 
    font-size: 0.9rem; 
    line-height: 1.7; 
    margin-bottom: 1rem; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
} 
.horizontal-meta { 
    display: flex; 
    gap: 1.5rem; 
    font-size: 0.85rem; 
    color: var(--text-gray); 
} 
/* 横排分页适配 */ 
.horizontal-list .pagination-flow { 
    justify-content: flex-start; 
    margin-top: 1rem; 
} 
 
/* 移动端适配 */ 
@media (max-width: 768px) { 
    .horizontal-card { 
        flex-direction: column; 
        gap: 0; 
    } 
    .horizontal-thumb { 
        flex: 0 0 180px; 
        width: 100%; 
    } 
    .horizontal-content { 
        padding: 1.2rem; 
    } 
} 