/*
Theme Name: C pro
Theme URI: https://www.iplaysoft.com/
Description: WordPress 主题 - 仿制异次元软件世界设计风格，适用于软件推荐类博客网站
Author: Your Name
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: c-pro
*/

/* ==========================================
   全局样式重置与基础设置
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* 优化滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0052a3;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   容器布局
   ========================================== */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-content {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ==========================================
   顶部导航栏
   ========================================== */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-logo {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.site-logo a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-logo a:hover {
    color: #0066cc;
}

.site-description {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
    font-weight: normal;
}

.main-navigation {
    flex: 1;
    margin: 0 30px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    justify-content: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: #666;
    font-size: 14px;
    padding: 8px 0;
    display: block;
    transition: color 0.3s ease;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0066cc;
    transition: width 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: #0066cc;
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after {
    width: 100%;
}

.header-search {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    position: relative;
}

.search-form input[type="search"] {
    padding: 9px 35px 9px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 220px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-form input[type="search"]:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 12px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #0052a3;
}

/* ==========================================
   面包屑导航
   ========================================== */
.breadcrumb {
    padding: 12px 0;
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    background-color: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
}

.breadcrumb a {
    color: #666;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #0066cc;
}

.breadcrumb::before {
    content: '你的位置：';
    color: #999;
    margin-right: 5px;
}

/* ==========================================
   文章列表
   ========================================== */
.post-list {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
}

.post-item {
    background-color: #fff;
    border-radius: 4px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.post-item-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* 当没有缩略图时，通过 JavaScript 或类名控制 */
.post-item.no-thumbnail .post-item-header {
    flex-direction: column;
    gap: 0;
}

.post-item.no-thumbnail .post-item-content {
    width: 100%;
}

.post-thumbnail {
    flex-shrink: 0;
    width: 180px;
    height: 120px;
    overflow: hidden;
    border-radius: 4px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-item-content {
    flex: 1;
    min-width: 0;
}

.post-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    margin-top: 0;
}

.post-title a {
    color: #333;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #0066cc;
}

.post-meta {
    font-size: 13px;
    color: #999;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
}

.post-meta a {
    color: #999;
    transition: color 0.3s ease;
}

.post-meta a:hover {
    color: #0066cc;
}

.post-excerpt {
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
    font-size: 14px;
}

.post-categories {
    display: inline-block;
    padding: 4px 10px;
    background-color: #f0f8ff;
    border: 1px solid #d0e8ff;
    border-radius: 3px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 5px;
    color: #0066cc;
    transition: all 0.3s ease;
}

.post-categories:hover {
    background-color: #e0f0ff;
    border-color: #b0d8ff;
}

.read-more {
    display: inline-block;
    margin-top: 8px;
    color: #0066cc;
    font-size: 13px;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: underline;
}

/* ==========================================
   侧边栏
   ========================================== */
.sidebar {
    position: sticky;
    top: 70px;
    align-self: flex-start;
}

.sidebar-widget {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #0066cc;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    transition: padding-left 0.3s ease;
}

.widget-list li:hover {
    padding-left: 5px;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    display: block;
    transition: color 0.3s ease;
}

.widget-list a:hover {
    color: #0066cc;
}

.widget-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.widget-categories a {
    display: block;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    color: #666;
    transition: all 0.3s ease;
}

.widget-categories a:hover {
    background-color: #e7f3ff;
    border-color: #b3d9ff;
    color: #0066cc;
    transform: translateY(-1px);
}

/* ==========================================
   Puock 模块样式
   ========================================== */
.puock-module {
    margin: 30px 0;
    background-color: transparent;
}

/* 广告位样式 */
.ad-page-top,
.ad-global-top,
.ad-global-bottom,
.ad-page-innerb {
    margin: 20px 0;
    text-align: center;
}

.ad-page-top > *,
.ad-global-top > *,
.ad-global-bottom > *,
.ad-page-innerb > * {
    display: inline-block;
    max-width: 100%;
}

/* 全局公告 */
.global-top-notice {
    background-color: #fff;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.global-top-notice a {
    color: #666;
    transition: color 0.3s ease;
}

.global-top-notice a:hover {
    color: #0066cc;
}

/* CMS 模块 */
.puock-module-cms {
    margin: 30px 0;
}

/* 友链模块 */
.puock-module-links {
    background-color: #fff;
    border-radius: 4px;
    padding: 25px;
    margin: 30px 0;
    border: 1px solid #f0f0f0;
}

/* Banner 模块 */
.puock-module-banners {
    margin-bottom: 30px;
}

/* 文章动作区 */
.puock-module-post-actions {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

/* ==========================================
   归档页面标题
   ========================================== */
.archive-header {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.archive-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.archive-description {
    color: #666;
    line-height: 1.8;
}

.search-header {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.search-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.search-results-count {
    color: #999;
    font-size: 14px;
}

/* ==========================================
   单篇文章页面
   ========================================== */
.single-post {
    background-color: #fff;
    border-radius: 4px;
    padding: 35px;
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;
}

.single-post .post-title {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #333;
}

.single-post .post-meta {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 14px;
}

.post-content {
    line-height: 1.9;
    color: #444;
    font-size: 15px;
}

.post-content h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 35px 0 18px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.post-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 15px;
    color: #333;
}

.post-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 12px;
    color: #333;
}

.post-content p {
    margin-bottom: 18px;
}

.post-content img {
    margin: 25px 0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.post-content ul,
.post-content ol {
    margin: 18px 0;
    padding-left: 30px;
}

.post-content li {
    margin-bottom: 10px;
    line-height: 1.8;
}

.post-content blockquote {
    margin: 25px 0;
    padding: 15px 20px;
    border-left: 4px solid #0066cc;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-style: italic;
    color: #666;
}

.post-content code {
    background-color: #f4f4f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: 'Consolas', 'Monaco', monospace;
    color: #e83e8c;
}

.post-content pre {
    background-color: #282c34;
    color: #abb2bf;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 20px 0;
}

.post-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.post-tags {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.tags-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.tag-link {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 8px;
    margin-bottom: 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 13px;
    color: #666;
}

.tag-link:hover {
    background-color: #e0e0e0;
    color: #0066cc;
}

.page-links {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    color: #666;
}

.page-links a {
    color: #0066cc;
    margin: 0 5px;
}

/* ==========================================
   分页导航
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #f0f0f0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 38px;
    text-align: center;
}

.pagination .current {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
    font-weight: 600;
}

.pagination a:hover {
    background-color: #0066cc;
    color: #fff;
    border-color: #0066cc;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,102,204,0.3);
}

/* ==========================================
   页脚
   ========================================== */
.site-footer {
    background-color: #fff;
    border-top: 1px solid #e5e5e5;
    padding: 30px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 8px;
}

.footer-widget a {
    color: #666;
    font-size: 13px;
}

.footer-widget a:hover {
    color: #0066cc;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    color: #999;
    font-size: 12px;
}

.footer-bottom a {
    color: #666;
}

/* ==========================================
   响应式设计
   ========================================== */
/* ==========================================
   响应式设计
   ========================================== */
@media (max-width: 768px) {
    .site-content {
        flex-direction: column;
    }
    
    .sidebar {
        position: static;
        width: 100%;
        margin-top: 0;
    }
    
    .header-container {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .site-branding {
        text-align: center;
    }
    
    .main-navigation {
        margin: 0;
    }
    
    .main-navigation ul {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .header-search {
        width: 100%;
    }
    
    .search-form {
        width: 100%;
    }
    
    .search-form input[type="search"] {
        width: 100%;
        flex: 1;
    }
    
    .post-item-header {
        flex-direction: column;
    }
    
    .post-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .post-item-content {
        width: 100%;
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .widget-categories {
        grid-template-columns: 1fr;
    }
    
    .single-post {
        padding: 20px;
    }
    
    .single-post .post-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .post-title {
        font-size: 18px;
    }
    
    .single-post .post-title {
        font-size: 20px;
    }
    
    .post-content {
        font-size: 14px;
    }
    
    .post-content h2 {
        font-size: 20px;
    }
    
    .post-content h3 {
        font-size: 18px;
    }
}

