/* blog.css - 博客页面专用样式 */

/* 相关文章图片样式 */
#tagdfwee0ee1bf img {
    width: 150px;
    height: 150px; /* 设置固定高度 */
    object-fit: cover; /* 保持图片比例并填充容器 */
    display: block; /* 确保图片是块级元素 */
    border-radius: 4px; /* 可选：添加圆角 */
    margin-bottom: 8px; /* 可选：图片和标题之间的间距 */
}

/* 基础样式 */
.blog-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
}

/* 博客头部 */
.blog-header {
    margin-bottom: 40px;
    border-bottom: 1px solid #e1e1e1;
    padding-bottom: 20px;
}

.breadcrumb {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.blog-title {
    font-size: 32px;
    color: #2c3e50;
    margin: 0 0 15px;
    line-height: 1.3;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.blog-meta a {
    color: #3498db;
    text-decoration: none;
}

.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #f1f8fe;
    color: #3498db;
    border-radius: 15px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s;
}

.tag:hover {
    background-color: #3498db;
    color: white;
}

/* 博客内容 */
.blog-content {
    font-size: 16px;
    line-height: 1.8;
}

.blog-content h2 {
    color: #2c3e50;
    font-size: 24px;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.blog-content h3 {
    color: #34495e;
    font-size: 20px;
    margin: 30px 0 15px;
}

.blog-content h4 {
    color: #2c3e50;
    font-size: 18px;
    margin: 25px 0 10px;
}

.blog-intro {
    font-size: 18px;
    color: #34495e;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
}

.featured-image {
    margin: 30px 0;
    text-align: center;
}

.featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.featured-image figcaption {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 10px;
    text-align: center;
}

/* 代码块样式 */
.code-block, .code-example {
    background-color: #f5f7fa;
    padding: 15px;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 15px 0;
    border-left: 3px solid #3498db;
}

.code-example {
    font-size: 14px;
    margin: 10px 0;
}

.comment {
    color: #7f8c8d;
    font-style: italic;
}

kbd {
    background-color: #f1f1f1;
    border: 1px solid #d1d1d1;
    border-radius: 3px;
    padding: 2px 5px;
    font-family: monospace;
    font-size: 0.9em;
    color: #333;
}

/* 特殊内容框 */
.tip-box {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #1976d2;
}

.tip-box h3 {
    margin-top: 0;
    color: #0d47a1;
}

.example-box {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #607d8b;
}

/* 网格布局 */
.function-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.function-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e1e1e1;
    transition: transform 0.3s, box-shadow 0.3s;
}

.function-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 表格样式 */
.comparison-table {
    margin: 30px 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table caption {
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}

.comparison-table th, 
.comparison-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e1e1;
}

.comparison-table th {
    background-color: #f5f5f5;
    font-weight: 500;
    color: #34495e;
}

.comparison-table tr:hover td {
    background-color: #f9f9f9;
}

.comparison-table td {
    color: #555;
}

/* FAQ项 */
.faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #e1e1e1;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    text-align: left;
    background-color: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #2c3e50;
    display: flex;
    align-items: center;
    transition: background-color 0.3s;
}

.faq-question:hover {
    background-color: #eef2f5;
}

.faq-icon {
    margin-right: 12px;
    font-weight: bold;
    font-size: 18px;
    width: 20px;
    display: inline-block;
    text-align: center;
}

.faq-answer {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    background-color: white;
}

.faq-answer p, 
.faq-answer ol, 
.faq-answer ul {
    margin: 15px 20px;
}

.faq-item.active .faq-answer {
    padding: 15px 0;
    max-height: 1000px;
}

.faq-item.active .faq-question {
    background-color: #e3f2fd;
}

.faq-item.active .faq-icon {
    content: "-";
}

/* 结论部分 */
.conclusion {
    background-color: #f5f7fa;
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

.conclusion h2 {
    margin-top: 0;
    color: #2c3e50;
}

.conclusion ul {
    padding-left: 20px;
}

/* 博客底部 */
.blog-footer {
    margin-top: 60px;
}

.author-bio {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 40px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
}

.author-info p {
    margin: 0;
    color: #555;
}

/* 博客导航 */
.blog-navigation {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
}

.nav-previous, .nav-next {
    width: 48%;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-previous:hover, .nav-next:hover {
    background-color: #eef2f5;
}

.nav-previous span, .nav-next span {
    display: block;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.nav-previous h4, .nav-next h4 {
    margin: 0;
    color: #3498db;
}

/* 相关文章 */
.related-posts {
    margin: 50px 0;
}

.related-posts h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 22px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-card {
    display: block;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.related-card h4 {
    margin: 0;
    padding: 15px;
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    font-size: 16px;
}

/* 评论区域 */
.comment-section {
    margin-top: 60px;
}

.comment-section h3 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
}

.comment-form {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    min-height: 120px;
    margin-bottom: 15px;
    font-family: inherit;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.comment-form button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.comment-form button:hover {
    background-color: #2980b9;
}

.comment-list {
    margin-top: 30px;
}

.comment {
    display: flex;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid #eee;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-body {
    flex: 1;
}

.comment-author {
    margin: 0 0 5px;
    color: #2c3e50;
    font-size: 16px;
}

.comment-date {
    font-size: 13px;
    color: #7f8c8d;
}

.comment-text {
    margin: 10px 0 0;
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .blog-container {
        padding: 15px;
    }
    
    .blog-title {
        font-size: 28px;
    }
    
    .function-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-previous, .nav-next {
        width: 100%;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 24px;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
}

/* yuce主容器样式 */
.main-wrapperyuce {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 主内容区布局 */
.main-contentyuce {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-start;
}

/* 博客内容容器 */
.blog-containeryuce {
    width: 70%;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

/* 博客头部样式 */
.blog-headeryuce {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.blog-titleyuce {
    font-size: 32px;
    color: #2c3e50;
    margin: 0 0 15px;
    line-height: 1.3;
}

.blog-metayuce {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* 博客标签样式 */
.blog-tagsyuce {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 30px;
    padding-top: 15px;
}

.blog-tagsyuce a {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border-radius: 15px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

.blog-tagsyuce a:hover {
    background-color: #e67e22;
    color: white;
}

/* 博客内容样式 */
.blog-contentyuce {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 40px;
}

/* 博客底部样式 */
.blog-footeryuce {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* 博客导航容器 */
.blog-navigationyuce {
    display: flex;
    justify-content: space-between;
    margin: 30px 0;
    gap: 20px; /* 两篇文章标题之间的间距 */
}

/* 上一篇/下一篇基础样式 */
.article-nav-prevyuce,
.article-nav-nextyuce {
    flex: 1; /* 各占一半空间 */
    min-width: 0; /* 关键：允许内容收缩 */
    white-space: nowrap; /* 禁止换行 */
    overflow: hidden; /* 隐藏溢出内容 */
    text-overflow: ellipsis; /* 溢出显示省略号 */
    position: relative;
}

/* 上一篇特定样式 */
.article-nav-prevyuce {
    text-align: left;
    padding-right: 10px; /* 留出空间 */
}

/* 下一篇特定样式 */
.article-nav-nextyuce {
    text-align: right;
    padding-left: 10px; /* 留出空间 */
}

/* 超链接样式 - 保持颜色不变 */
.article-nav-prevyuce a,
.article-nav-nextyuce a,
.article-nav-prevyuce a:hover,
.article-nav-nextyuce a:hover,
.article-nav-prevyuce a:visited,
.article-nav-nextyuce a:visited {
    color: inherit !important; /* 继承父元素颜色 */
    text-decoration: none !important; /* 去掉下划线 */
}

/* 鼠标悬停时只加下划线 */
.article-nav-prevyuce a:hover,
.article-nav-nextyuce a:hover {
    text-decoration: underline !important;
}

/* 文字前缀样式 */
.article-nav-prevyuce::before {
    content: "";
    color: inherit;
}
.article-nav-nextyuce::before {
    content: "";
    color: inherit;
}

.related-postsyuce {
    margin-top: 40px;
}

.related-postsyuce h3,
.related-postsyuce #tagdfwee0ee1bfyuce dd {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* 相关文章链接样式 - 保持颜色不变 */
#tagdfwee0ee1bfyuce dd a,
#tagdfwee0ee1bfyuce dd a:visited,
#tagdfwee0ee1bfyuce dd a:hover,
#tagdfwee0ee1bfyuce dd a:active {
    color: inherit !important;         /* 继承父元素文字颜色 */
    text-decoration: none !important;  /* 移除下划线 */
}

/* 鼠标悬停时只加下划线（可选） */
#tagdfwee0ee1bfyuce dd a:hover {
    text-decoration: underline !important;
}

/* 保持原有布局样式 */
#tagdfwee0ee1bfyuce dd {
    margin: 0 0 10px 0;
    padding: 0;
    text-align: left;
}

#tagdfwee0ee1bfyuce dd span {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;      /* 不换行 */
    overflow: hidden;         /* 隐藏溢出 */
    text-overflow: ellipsis;  /* 溢出显示省略号 */
}

/* 侧边栏样式 */
.rboxyuce {
    width: 28%;
    padding: 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    box-sizing: border-box;
    position: sticky;
    top: 20px;
}

/* 人气点击样式 */
.hot_newsyuce {
    margin-bottom: 40px;
}

.hot_newsyuce h3.h_title {
    color: #e67e22;
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left !important;
}

.hot_newsyuce li {
    list-style: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    padding-left: 20px;
    margin-bottom: -20px;
}

.hot_newsyuce li::before {
    content: "•";
    color: #e67e22;
    font-size: 20px;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.hot_newsyuce li a {
    color: inherit;
    text-decoration: none;
}

.hot_newsyuce li:hover a {
    color: #e67e22;
}

/* 标签云样式 */
.tagsclousyuce h3.h_title {
    text-align: left !important;
}

.tagsclousyuce ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}
.tagsclousyuce a {
    display: inline-block;
    padding: 0 8px;
    line-height: 24px;
    background: #f5f5f5;
    border-radius: 3px;
    color: #2c3e50;
    text-decoration: none;
    transition: .2s;
}

.tagsclousyuce a:hover {
    background: #e67e22;
    color: #fff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-contentyuce {
        flex-direction: column;
    }
    
    .blog-containeryuce,
    .rboxyuce {
        width: 100%;
    }
    
    .rboxyuce {
        position: static;
        margin-top: 40px;
    }

    .blog-navigationyuce {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-nav-prevyuce,
    .article-nav-nextyuce {
        width: 100%;
        text-align: left !important; /* 强制左对齐 */
        padding: 0 !important;
    }
    
    .article-nav-nextyuce {
        margin-top: 10px;
    }
}