/* 
Theme Name: sunshine-blog阳光橙博客 
Theme URI: https://demo.com/sunshine-blog/  
Author: 原创开发 
Author URI: https://demo.com/  
Description: 橙色系活力自适应博客模板，SEO友好，自带网站地图、相关推荐、阅读统计等功能 
Version: 1.0 
License: GPL v3 
License URI: https://www.gnu.org/licenses/gpl-3.0.html  
Tags: blog, responsive, orange, vibrant, seo 
Text Domain: sunshine-blog 
*/ 
 
/* 全局重置与变量定义 */ 
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
} 
:root { 
    --primary: #f97316; 
    --primary-hover: #ea580c; 
    --primary-light: #ffedd5; 
    --text-dark: #111827; 
    --text-gray: #4b5563; 
    --border: #e5e7eb; 
    --bg: #fef3c710; 
    --card-bg: #ffffff; 
    --shadow: 0 3px 12px rgba(249, 115, 22, 0.08); 
    --radius: 16px; 
} 
body { 
    font-family: "Inter", "Noto Sans SC", "Microsoft Yahei", sans-serif; 
    line-height: 1.75; 
    color: var(--text-dark); 
    background-color: var(--bg); 
} 
a { 
    color: var(--primary); 
    text-decoration: none; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
} 
a:hover { 
    color: var(--primary-hover); 
} 
img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
} 
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
} 
 
/* 头部样式 */ 
.header-bar { 
    background: var(--card-bg); 
    box-shadow: var(--shadow); 
    padding: 1rem 0; 
    position: sticky; 
    top: 0; 
    z-index: 999; 
    border-bottom: 2px solid var(--primary); 
} 
.header-inner { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
} 
.site-brand a { 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
} 
.site-brand h1 { 
    font-size: 1.8rem; 
    color: var(--primary); 
    font-weight: 800; 
} 
.site-brand p { 
    font-size: 0.85rem; 
    color: var(--text-gray); 
} 
.desktop-nav ul { 
    display: flex; 
    gap: 2rem; 
    list-style: none; 
} 
.desktop-nav a { 
    color: var(--text-dark); 
    font-weight: 600; 
    padding: 0.5rem 0; 
    position: relative; 
} 
.desktop-nav a:hover, .desktop-nav .current-menu-item a { 
    color: var(--primary); 
} 
.desktop-nav a::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 0; 
    height: 3px; 
    background: var(--primary); 
    border-radius: 2px; 
    transition: width 0.3s ease; 
} 
.desktop-nav a:hover::after, .desktop-nav .current-menu-item a::after { 
    width: 100%; 
} 
.mobile-toggle { 
    display: none; 
    background: var(--primary); 
    color: #fff; 
    border: none; 
    padding: 0.4rem 0.8rem; 
    border-radius: 8px; 
    font-size: 1.2rem; 
    cursor: pointer; 
} 
.mobile-nav { 
    position: fixed; 
    top: 0; 
    right: -300px; 
    width: 280px; 
    height: 100vh; 
    background: var(--card-bg); 
    box-shadow: -2px 0 15px rgba(0,0,0,0.1); 
    padding: 2rem; 
    transition: right 0.3s ease; 
    z-index: 1000; 
} 
.mobile-nav.show { 
    right: 0; 
} 
.mobile-nav ul { 
    list-style: none; 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
} 
.mobile-nav a { 
    color: var(--text-dark); 
    font-weight: 500; 
    padding: 0.5rem 0; 
    display: block; 
} 
.mobile-nav .close-btn { 
    position: absolute; 
    top: 1rem; 
    right: 1rem; 
    background: none; 
    border: none; 
    font-size: 1.5rem; 
    cursor: pointer; 
} 
.mask { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh; 
    background: rgba(0,0,0,0.5); 
    z-index: 999; 
    display: none; 
} 
.mask.show { 
    display: block; 
} 
 
/* 面包屑 */ 
.breadcrumb-box { 
    background: var(--card-bg); 
    padding: 0.8rem 1.2rem; 
    border-radius: var(--radius); 
    margin: 1.5rem 0; 
    font-size: 0.9rem; 
    color: var(--text-gray); 
    border-left: 4px solid var(--primary); 
} 
 
/* 内容布局 */ 
.content-box { 
    display: grid; 
    grid-template-columns: 1fr 320px; 
    gap: 2rem; 
    margin-bottom: 3rem; 
} 
.post-list-wrap { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem; 
} 
 
/* 文章卡片 */ 
.article-card { 
    background: var(--card-bg); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    overflow: hidden; 
    transition: all 0.3s ease; 
    border: 2px solid transparent; 
} 
.article-card:hover { 
    border-color: var(--primary); 
    transform: translateY(-6px); 
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.15); 
} 
.card-thumb { 
    height: 180px; 
    overflow: hidden; 
    position: relative; 
} 
.card-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.4s ease; 
} 
.article-card:hover .card-thumb img { 
    transform: scale(1.1); 
} 
.card-cat { 
    position: absolute; 
    top: 0.8rem; 
    right: 0.8rem; 
    background: var(--primary); 
    color: #fff; 
    padding: 0.2rem 0.6rem; 
    border-radius: 20px; 
    font-size: 0.75rem; 
    font-weight: 500; 
} 
.card-info { 
    padding: 1.2rem; 
} 
.card-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    margin-bottom: 0.8rem; 
    line-height: 1.5; 
    height: 3.6rem; 
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
} 
.card-meta { 
    font-size: 0.8rem; 
    color: var(--text-gray); 
    margin-bottom: 0.8rem; 
    display: flex; 
    justify-content: space-between; 
} 
.card-excerpt { 
    color: var(--text-gray); 
    font-size: 0.9rem; 
    height: 4.7rem; 
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical; 
    margin-bottom: 1rem; 
} 
.card-more { 
    display: inline-block; 
    padding: 0.4rem 1rem; 
    background: var(--primary-light); 
    color: var(--primary); 
    border-radius: 20px; 
    font-size: 0.85rem; 
    font-weight: 500; 
} 
.card-more:hover { 
    background: var(--primary); 
    color: #fff; 
} 
 
/* 分页 */ 
.pagination-box { 
    grid-column: 1/-1; 
    display: flex; 
    justify-content: center; 
    gap: 0.8rem; 
    margin-top: 1rem; 
} 
.pagination-box a, .pagination-box span { 
    padding: 0.5rem 1.2rem; 
    background: var(--card-bg); 
    border-radius: 8px; 
    box-shadow: var(--shadow); 
    font-weight: 500; 
} 
.pagination-box .current { 
    background: var(--primary); 
    color: #fff; 
} 
 
/* 单篇文章/页面样式 */ 
.single-wrap { 
    background: var(--card-bg); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    padding: 2.5rem; 
} 
.single-title { 
    font-size: 2rem; 
    margin-bottom: 1rem; 
    line-height: 1.4; 
} 
.single-meta { 
    font-size: 0.9rem; 
    color: var(--text-gray); 
    padding-bottom: 1rem; 
    border-bottom: 2px solid var(--primary-light); 
    margin-bottom: 2rem; 
    display: flex; 
    gap: 2rem; 
    flex-wrap: wrap; 
} 
.single-content { 
    margin-bottom: 2rem; 
} 
.single-content h2 { 
    font-size: 1.6rem; 
    margin: 2rem 0 1rem; 
    padding-left: 1rem; 
    border-left: 4px solid var(--primary); 
} 
.single-content h3 { 
    font-size: 1.3rem; 
    margin: 1.5rem 0 0.8rem; 
} 
.single-content p { 
    margin-bottom: 1rem; 
} 
.single-content ul, .single-content ol { 
    margin: 1rem 0 1rem 2.5rem; 
} 
.single-tags { 
    padding: 1.5rem 0; 
    border-top: 1px solid var(--border); 
    margin-bottom: 2rem; 
} 
.single-tags a { 
    display: inline-block; 
    padding: 0.3rem 0.8rem; 
    background: var(--primary-light); 
    border-radius: 20px; 
    margin-right: 0.6rem; 
    font-size: 0.85rem; 
    margin-bottom: 0.5rem; 
} 
.single-tags a:hover { 
    background: var(--primary); 
    color: #fff; 
} 
 
/* 上下篇导航 */ 
.post-nav-box { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1.5rem; 
    margin: 2rem 0; 
} 
.nav-item { 
    padding: 1.2rem; 
    border-radius: 12px; 
    border: 2px solid var(--primary-light); 
    transition: all 0.3s ease; 
} 
.nav-item:hover { 
    border-color: var(--primary); 
    background: var(--primary-light); 
} 
.nav-item.prev { 
    text-align: left; 
} 
.nav-item.next { 
    text-align: right; 
} 
.nav-label { 
    font-size: 0.85rem; 
    color: var(--text-gray); 
    margin-bottom: 0.5rem; 
    display: block; 
} 
 
/* 相关文章 */ 
.related-wrap { 
    margin: 3rem 0; 
} 
.related-wrap h3 { 
    font-size: 1.5rem; 
    margin-bottom: 1.5rem; 
    display: inline-block; 
    background: var(--primary); 
    color: #fff; 
    padding: 0.3rem 1rem; 
    border-radius: 20px; 
} 
.related-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.5rem; 
} 
.related-card { 
    background: var(--card-bg); 
    border-radius: 12px; 
    box-shadow: var(--shadow); 
    overflow: hidden; 
} 
.related-card-thumb { 
    height: 120px; 
    overflow: hidden; 
} 
.related-card-thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
} 
.related-card-info { 
    padding: 1rem; 
} 
.related-card-title { 
    font-size: 0.95rem; 
    font-weight: 600; 
    height: 2.7rem; 
    overflow: hidden; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
} 
 
/* 侧边栏 */ 
.sidebar-wrap { 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
} 
.sidebar-widget { 
    background: var(--card-bg); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    padding: 1.5rem; 
} 
.widget-title { 
    font-size: 1.1rem; 
    margin-bottom: 1.2rem; 
    background: var(--primary-light); 
    color: var(--primary); 
    padding: 0.5rem 1rem; 
    border-radius: 8px; 
    font-weight: 600; 
} 
.widget ul { 
    list-style: none; 
} 
.widget ul li { 
    padding: 0.7rem 0; 
    border-bottom: 1px dashed var(--border); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 0.95rem; 
} 
.widget ul li:last-child { 
    border-bottom: none; 
} 
.widget ul li span { 
    background: var(--primary-light); 
    color: var(--primary); 
    font-size: 0.75rem; 
    padding: 0.2rem 0.5rem; 
    border-radius: 12px; 
} 
.search-form { 
    display: flex; 
    gap: 0.5rem; 
} 
.search-input { 
    flex: 1; 
    padding: 0.6rem; 
    border: 2px solid var(--border); 
    border-radius: 8px; 
    outline: none; 
    transition: border-color 0.3s ease; 
} 
.search-input:focus { 
    border-color: var(--primary); 
} 
.search-submit { 
    padding: 0 1.2rem; 
    background: var(--primary); 
    color: #fff; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 500; 
} 
.search-submit:hover { 
    background: var(--primary-hover); 
} 
.tag-cloud a { 
    display: inline-block; 
    padding: 0.3rem 0.7rem; 
    background: var(--primary-light); 
    border-radius: 20px; 
    margin: 0.3rem 0.2rem; 
    font-size: 0.85rem !important; 
} 
.tag-cloud a:hover { 
    background: var(--primary); 
    color: #fff; 
} 
 
/* 底部+网站地图 */ 
.footer-wrap { 
    background: var(--card-bg); 
    box-shadow: 0 -3px 15px rgba(249, 115, 22, 0.08); 
    padding: 3rem 0 1.5rem; 
    border-top: 2px solid var(--primary); 
} 
.footer-sitemap { 
    display: grid; 
    grid-template-columns: 1.2fr 1fr 1fr; 
    gap: 2.5rem; 
    margin-bottom: 2rem; 
    padding-bottom: 2rem; 
    border-bottom: 1px solid var(--border); 
} 
.sitemap-col h4 { 
    font-size: 1.2rem; 
    color: var(--primary); 
    margin-bottom: 1.2rem; 
    font-weight: 700; 
} 
.sitemap-col p { 
    color: var(--text-gray); 
    line-height: 1.8; 
    margin-bottom: 1rem; 
} 
.sitemap-col ul { 
    list-style: none; 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 0.6rem; 
} 
.sitemap-col.full-list ul { 
    grid-template-columns: 1fr; 
} 
.copyright { 
    text-align: center; 
    color: var(--text-gray); 
    font-size: 0.9rem; 
} 
.back-top { 
    position: fixed; 
    bottom: 2rem; 
    right: 2rem; 
    width: 50px; 
    height: 50px; 
    background: var(--primary); 
    color: #fff; 
    border-radius: 50%; 
    display: none; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.4rem; 
    cursor: pointer; 
    z-index: 99; 
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); 
} 
 
/* 移动端适配 */ 
@media (max-width: 992px) { 
    .post-list-wrap { 
        grid-template-columns: 1fr; 
    } 
    .related-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
} 
@media (max-width: 768px) { 
    .desktop-nav { 
        display: none; 
    } 
    .mobile-toggle { 
        display: block; 
    } 
    .content-box { 
        grid-template-columns: 1fr; 
    } 
    .related-grid { 
        grid-template-columns: 1fr; 
    } 
    .post-nav-box { 
        grid-template-columns: 1fr; 
    } 
    .single-wrap { 
        padding: 1.5rem; 
    } 
    .single-title { 
        font-size: 1.5rem; 
    } 
    .footer-sitemap { 
        grid-template-columns: 1fr; 
        gap: 1.5rem; 
    } 
} 
