/* ========================================
   博客详情页样式 - Blog Post Page Styles
   使用 .blog-post-wrapper 确保样式不影响其他页面
   ======================================== */

/* 主内容区域 */
.blog-post-wrapper {
    background: #f8f9fa;
    padding: 60px 0 80px;
}

/* 左侧文章区域 */
.blog-post-wrapper .blog-details-desc {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* 文章内容 */
.blog-post-wrapper .article-content {
    padding: 40px 45px;
}

/* 文章标题 */
.blog-post-wrapper .article-content h3 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.4;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}

/* 文章元信息 */
.blog-post-wrapper .entry-meta {
    margin-bottom: 35px;
    padding: 20px 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f5 100%);
    border-radius: 12px;
}

.blog-post-wrapper .entry-meta ul {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-post-wrapper .entry-meta ul li {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #5a5a6e;
}

.blog-post-wrapper .entry-meta ul li span {
    font-weight: 600;
    color: #1a1a2e;
    margin-right: 6px;
}

.blog-post-wrapper .entry-meta ul li a {
    color: #0078d4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-post-wrapper .entry-meta ul li a:hover {
    color: #005a9e;
}

/* 文章正文 */
.blog-post-wrapper .article-content p {
    font-size: 16px;
    line-height: 1.9;
    color: #4a4a5a;
    margin-bottom: 20px;
}

.blog-post-wrapper .article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 25px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.blog-post-wrapper .article-content h1,
.blog-post-wrapper .article-content h2,
.blog-post-wrapper .article-content h4,
.blog-post-wrapper .article-content h5,
.blog-post-wrapper .article-content h6 {
    color: #1a1a2e;
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.blog-post-wrapper .article-content h2 {
    font-size: 26px;
}

.blog-post-wrapper .article-content h4 {
    font-size: 20px;
}

.blog-post-wrapper .article-content ul,
.blog-post-wrapper .article-content ol {
    padding-left: 25px;
    margin-bottom: 20px;
}

.blog-post-wrapper .article-content li {
    font-size: 16px;
    line-height: 1.8;
    color: #4a4a5a;
    margin-bottom: 8px;
}

.blog-post-wrapper .article-content blockquote {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    border-left: 4px solid #0078d4;
    padding: 25px 30px;
    margin: 25px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #3a3a4a;
}

/* 代码块样式 - 覆盖 style.css 全局 pre 样式 */
.blog-post-wrapper .article-content pre {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    padding: 20px 25px !important;
    border-radius: 10px !important;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px !important;
    line-height: 1.7 !important;
    margin: 20px 0;
    white-space: pre;
    word-wrap: normal !important;
    word-break: normal !important;
    border: 1px solid #334155 !important;
    box-shadow: none;
}

.blog-post-wrapper .article-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    background-color: #f0f2f5;
    color: #e74c3c;
    padding: 2px 6px;
    border-radius: 4px;
}

.blog-post-wrapper .article-content pre code {
    background-color: transparent !important;
    color: inherit !important;
    padding: 0;
    font-size: 14px;
    border-radius: 0;
}

/* table 样式 */
.blog-post-wrapper .article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
}

.blog-post-wrapper .article-content table th,
.blog-post-wrapper .article-content table td {
    border: 1px solid #e0e0e0;
    padding: 10px 14px;
    text-align: left;
}

.blog-post-wrapper .article-content table th {
    background: #f0f2f5;
    font-weight: 600;
    color: #1a1a2e;
}

.blog-post-wrapper .article-content table tr:nth-child(even) {
    background: #fafbfc;
}

/* 文章底部 */
.blog-post-wrapper .article-footer {
    margin: 0;
    padding: 30px 45px;
    border-top: 2px solid #f0f2f5;
    background: #fafbfc;
}

/* 分享区域 */
.blog-post-wrapper .article-share {
    margin-bottom: 25px;
}

.blog-post-wrapper .share-title {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-right: 20px;
    margin-bottom: 12px;
}

.blog-post-wrapper .share-title i {
    margin-right: 8px;
    color: #0078d4;
    font-size: 16px;
}

.blog-post-wrapper .social-share {
    display: inline-flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 10px;
}

.blog-post-wrapper .share-item a {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
    color: #666;
    border: 1px solid #e0e0e0;
}

.blog-post-wrapper .share-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.blog-post-wrapper .share-item a i {
    margin-right: 6px;
    font-size: 15px;
}

.blog-post-wrapper .share-item.weibo a:hover {
    background: #ff8140;
    color: #fff;
    border-color: #ff8140;
}

.blog-post-wrapper .share-item.wechat a:hover {
    background: #09BB07;
    color: #fff;
    border-color: #09BB07;
}

.blog-post-wrapper .share-item.qq a:hover {
    background: #12B7F5;
    color: #fff;
    border-color: #12B7F5;
}

.blog-post-wrapper .share-item.qzone a:hover {
    background: #FDBE3D;
    color: #fff;
    border-color: #FDBE3D;
}

.blog-post-wrapper .share-item.copy a:hover {
    background: #666;
    color: #fff;
    border-color: #666;
}

/* 标签区域 */
.blog-post-wrapper .article-tags {
    margin-top: 0;
}

.blog-post-wrapper .article-tags .aside-item {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.blog-post-wrapper .article-tags .aside-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a1a2e;
}

.blog-post-wrapper .article-tags .button-tag {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    color: #5a5a6e;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.blog-post-wrapper .article-tags .button-tag:hover {
    background: #0078d4;
    border-color: #0078d4;
    color: #fff;
}

/* ========================================
   右侧边栏样式
   ======================================== */

.blog-post-wrapper .widget-area {
    position: sticky;
    top: 100px;
}

.blog-post-wrapper .widget {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.06);
}

.blog-post-wrapper .widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5;
    position: relative;
}

.blog-post-wrapper .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(135deg, #0078d4 0%, #00cdcd 100%);
}

/* 热门文章 */
.blog-post-wrapper .widget_inspire_posts_thumb .item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f2f5;
    transition: all 0.3s ease;
}

.blog-post-wrapper .widget_inspire_posts_thumb .item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-post-wrapper .widget_inspire_posts_thumb .item:first-child {
    padding-top: 0;
}

.blog-post-wrapper .widget_inspire_posts_thumb .item:hover {
    transform: translateX(5px);
}

.blog-post-wrapper .widget_inspire_posts_thumb .thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

.blog-post-wrapper .widget_inspire_posts_thumb .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-wrapper .widget_inspire_posts_thumb .item:hover .thumb img {
    transform: scale(1.1);
}

.blog-post-wrapper .widget_inspire_posts_thumb .info {
    flex: 1;
    min-width: 0;
}

.blog-post-wrapper .widget_inspire_posts_thumb .info .title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.blog-post-wrapper .widget_inspire_posts_thumb .info .title:hover {
    color: #0078d4;
}

.blog-post-wrapper .widget_inspire_posts_thumb .info .date {
    font-size: 12px;
    color: #999;
}

/* 分类列表 */
.blog-post-wrapper .widget_categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-post-wrapper .widget_categories ul li {
    margin-bottom: 0;
}

.blog-post-wrapper .widget_categories ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    color: #5a5a6e;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #f0f2f5;
    transition: all 0.3s ease;
}

.blog-post-wrapper .widget_categories ul li a .category-count {
    background: #f0f2f5;
    color: #5a5a6e;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.blog-post-wrapper .widget_categories ul li a:hover .category-count {
    background: #0078d4;
    color: #fff;
}

.blog-post-wrapper .widget_categories ul li a::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #0078d4;
    border-radius: 50%;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.blog-post-wrapper .widget_categories ul li a:hover {
    color: #0078d4;
    padding-left: 8px;
}

.blog-post-wrapper .widget_categories ul li a:hover::before {
    transform: scale(1.3);
}

.blog-post-wrapper .widget_categories ul li:last-child a {
    border-bottom: none;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 991px) {
    .blog-post-wrapper {
        padding: 40px 0 60px;
    }
    
    .blog-post-wrapper .widget-area {
        position: static;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .blog-post-wrapper .article-content {
        padding: 25px 20px;
    }
    
    .blog-post-wrapper .article-content h3 {
        font-size: 24px;
    }
    
    .blog-post-wrapper .entry-meta ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .blog-post-wrapper .article-footer {
        padding: 25px 20px;
    }
    
    .blog-post-wrapper .share-title {
        display: block;
        margin-bottom: 15px;
    }
    
    .blog-post-wrapper .share-item a span {
        display: none;
    }
    
    .blog-post-wrapper .share-item a i {
        margin-right: 0;
        font-size: 18px;
    }
    
    .blog-post-wrapper .share-item a {
        padding: 10px 14px;
    }
}

@media (max-width: 576px) {
    .blog-post-wrapper .article-content h3 {
        font-size: 20px;
    }
    
    .blog-post-wrapper .article-content p,
    .blog-post-wrapper .article-content li {
        font-size: 15px;
    }
    
    .blog-post-wrapper .entry-meta {
        padding: 15px;
    }
    
    .blog-post-wrapper .widget {
        padding: 20px;
    }
}

/* 页面进入动画 */
.blog-post-wrapper .blog-details-desc {
    opacity: 0;
    transform: translateY(30px);
    animation: postFadeIn 0.6s ease 0.1s forwards;
}

.blog-post-wrapper .widget {
    opacity: 0;
    transform: translateY(20px);
}

.blog-post-wrapper .widget:nth-child(1) {
    animation: postFadeIn 0.5s ease 0.2s forwards;
}

.blog-post-wrapper .widget:nth-child(2) {
    animation: postFadeIn 0.5s ease 0.3s forwards;
}

@keyframes postFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
