/* 已关闭FancyBox缩略图功能，移除相关样式 */
/* ===== 文章详情页样式（单栏布局）===== */
.article-main {
    padding: 2rem 0;
    max-width: 800px; /* 更小的宽度 */
    margin: 0 auto;
    background: #fff;
}

.article-content {
    background: white;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 2rem;
}

.article-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #000;
}
.article-meta {
    width: 100%;
}
.article-meta .hubsi-views-count {
    margin-left: auto;
}
.article-title {
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 1rem 0 1.5rem 0;
    color: #000;
}

.article-summary {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 400;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.author-avatar a{
    display: block;
    text-decoration: none;
    width: 50px;
    height: 50px;
}
.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    color: #000;
    text-decoration: none;
}

.author-title {
    display: block;
    color: #666;
    font-size: 0.85rem;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #000;
    margin-bottom: 3rem;
}

/* 标题样式 */
.article-body h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 3rem 0 1.5rem 0;
    color: #000;
    line-height: 1.3;
    border-bottom: 2px solid #000;
    padding-bottom: 0.5rem;
}

.article-body h2 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem 0;
    color: #000;
    line-height: 1.4;
    position: relative;
}

.article-body h2::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 0.3rem;
    width: 4px;
    height: 30px;
    background: #2563eb;
    border-radius: 2px;
}

.article-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #000;
    line-height: 1.4;
}

.article-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.8rem 0;
    color: #333;
    line-height: 1.4;
}

.article-body h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.2rem 0 0.6rem 0;
    color: #333;
    line-height: 1.4;
}

.article-body h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #333;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 段落样式 */
.article-body p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.article-body p:last-child {
    margin-bottom: 0;
}

/* 强调文本 */
.article-body strong, .article-body b {
    font-weight: 600;
    color: #000;
}

.article-body em, .article-body i {
    font-style: italic;
    color: #333;
}

/* 列表样式 */
.article-body ul, .article-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-body ul li {
    list-style: disc;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-body ol li {
    list-style: decimal;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-body ul ul, .article-body ol ol, .article-body ul ol, .article-body ol ul {
    margin: 0.5rem 0;
}

.article-body ul ul li {
    list-style: circle;
}

.article-body ul ul ul li {
    list-style: square;
}

/* 引用样式 */
.article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: transparent;
    border: 2px solid #000;
    border-left: 4px solid #000;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #333;
    position: relative;
}

.article-body blockquote::before {
    content: '“';
    font-size: 4rem;
    color: #000;
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    opacity: 0.3;
    font-family: Georgia, serif;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body blockquote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    font-style: normal;
}

.article-body blockquote cite::before {
    content: '— ';
}

/* 代码样式 */
.article-body code {
    background: transparent !important;
    padding: 0.2rem 0.4rem !important;
    border: 1px solid #000 !important;
    border-radius: 3px !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 0.85rem !important;
    color: #000 !important;
}

.article-body pre {
    background: transparent !important;
    border: 2px solid #000 !important;
    border-radius: 8px !important;
    padding: 1.5rem !important;
    margin: 2rem 0 !important;
    overflow-x: auto !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

.article-body pre code {
    background: none !important;
    padding: 0 !important;
    color: #000 !important;
    font-size: inherit !important;
    border: none !important;
}

/* 表格样式 */
.article-body table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #000;
}

.article-body table th {
    background: #000;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid #000;
}

.article-body table td {
    padding: 1rem;
    border: 1px solid #000;
}

.article-body table tr:nth-child(even) {
    background: #f5f5f5;
}

.article-body table tr:hover {
    background: #eee;
}

/* 图片样式 */
.article-body .wp-caption {
    margin: 0;
    max-width: 100%;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    border: 2px solid #000;
    display: block;
}

/* FancyBox 图片样式 - 使用自定义类避免与库内置样式冲突 */
.article-body .hubsi-fancybox-image {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    cursor: zoom-in;
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* 继承原有的图片样式 */
    border-radius: 8px;
    border: 2px solid #000;
}

.article-body .hubsi-fancybox-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.article-body .fancybox-image-link {
    display: block;
    line-height: 0;
    text-decoration: none;
    border: none !important;
    margin: 2rem 0;
    /* 确保链接不影响布局 */
    width: auto;
    max-width: 100%;
}

/* 兼容WordPress对齐类，保持图片原有布局 */
.article-body .fancybox-image-link.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}
.article-body .fancybox-image-link.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}
.article-body .fancybox-image-link.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
.article-body .fancybox-image-link.alignnone {
    display: block;
}

.article-body .fancybox-image-link:hover {
    border: none !important;
    text-decoration: none;
    outline: none;
}

.article-body .fancybox-image-link:focus {
    border: none !important;
    outline: none;
    box-shadow: none;
}

/* 确保包装在链接中的图片保持原有边距 */
.article-body .fancybox-image-link .hubsi-fancybox-image {
    margin: 0 !important;
}

/* 清除浮动，防止因左/右浮动导致父级高度塌陷 */
.article-body::after {
    content: "";
    display: block;
    clear: both;
}

.article-body .wp-caption img{
    margin-bottom: 0;
}

/* WordPress 图片对齐支持 */
.article-body .alignleft,
.article-body img.alignleft,
.article-body figure.alignleft,
.article-body .wp-caption.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.article-body .alignright,
.article-body img.alignright,
.article-body figure.alignright,
.article-body .wp-caption.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.article-body .aligncenter,
.article-body img.aligncenter,
.article-body figure.aligncenter,
.article-body .wp-caption.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.article-body .alignnone,
.article-body img.alignnone,
.article-body figure.alignnone,
.article-body .wp-caption.alignnone {
    float: none;
    display: block;
    margin: 2rem 0;
}

/* 移动端下取消左右浮动，统一居中显示，避免布局拥挤 */
@media (max-width: 768px) {
    .article-body .alignleft,
    .article-body img.alignleft,
    .article-body figure.alignleft,
    .article-body .wp-caption.alignleft,
    .article-body .alignright,
    .article-body img.alignright,
    .article-body figure.alignright,
    .article-body .wp-caption.alignright {
        float: none;
        display: block;
        margin: 1.5rem auto;
    }
}

.article-body figure {
    margin: 2rem 0;
    text-align: center;
}

.article-body figure img {
    margin: 0 0 1rem 0;
}

.article-body figcaption, .article-body .wp-caption-text {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* 链接样式 */
.article-body a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-body a:hover {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

/* 分隔线 */
.article-body hr {
    border: none;
    height: 2px;
    background: #000;
    margin: 3rem 0;
}

/* 注释框 */
.article-body .note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.article-body .note::before {
    content: '💡';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.2rem;
}

.article-body .note p {
    margin-left: 2rem;
    margin-bottom: 0;
}

/* 警告框 */
.article-body .warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.article-body .warning::before {
    content: '⚠️';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.2rem;
}

.article-body .warning p {
    margin-left: 2rem;
    margin-bottom: 0;
    color: #721c24;
}

/* 信息框 */
.article-body .info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.article-body .info::before {
    content: 'ℹ️';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.2rem;
}

.article-body .info p {
    margin-left: 2rem;
    margin-bottom: 0;
    color: #0c5460;
}

/* 成功框 */
.article-body .success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.article-body .success::before {
    content: '✅';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 1.2rem;
}

.article-body .success p {
    margin-left: 2rem;
    margin-bottom: 0;
    color: #155724;
}

/* ===== 目录样式（移到文章内部）===== */
.table-of-contents {
    background: #ffffff;
    border: 2px solid #000;
    border-radius: 6px;
    padding: 0;
    margin: 2rem 0;
    font-size: 0.9rem;
}

.table-of-contents h3 {
    background: transparent;
    color: #000;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.table-of-contents h3 .title-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-of-contents h3 small {
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
}

.table-of-contents .toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-of-contents .toc-list li {
    border-bottom: 1px solid #ddd;
}

.table-of-contents .toc-list li:last-child {
    border-bottom: none;
}

.table-of-contents a {
    display: block;
    color: #333;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s ease;
    font-weight: 400;
}

.table-of-contents a:hover {
    background: #f5f5f5;
    color: #000;
}

.toc-level-2 a {
    font-weight: 500;
    color: #000;
}

.toc-level-3 a {
    padding-left: 2.5rem;
    font-weight: 400;
    color: #666;
    font-size: 0.85rem;
}

/* ===== 下载区域样式 ===== */
.downloads-section {
    background: transparent;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
}

.downloads-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #000;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.download-item {
    background: white;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.download-item:hover {
    transform: none;
    background: #f5f5f5;
}
.download-icon {
    font-size: 1.5rem;
}
.download-icon img {
    width: 20px;

}

.download-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #000;
}

.download-info p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.download-btn {
    background: #2563eb;
    color: white;
    border: 2px solid #2563eb;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.keywords-section {
    margin-top: 3rem;
}

.keywords-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000;
}

.keywords-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.keyword-tag {
    background-color: transparent;
    color: #666;
    border: 1px solid #000;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* ===== 分享区域样式 ===== */
.share-section {
    border-top: 2px solid #000;
    padding-top: 2rem;
    margin-top: 3rem;
}

.share-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #000;
}

.share-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #000;
    background: white;
    color: #000;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* ===== 相关文章推荐区域 ===== */
.recommendations-section {
    background: white;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.recommendations-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #000;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 1rem;
}

/* 推荐文章在中等屏幕也强制单列 */
@media (max-width: 860px) and (min-width: 769px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
    }
}



/* ===== 下载资源增强样式 ===== */
.download-item {
    background: white;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.download-item:hover {
    transform: none;
    background: #f5f5f5;
}

.download-item.protected::before {
    content: "🔒";
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.2rem;
}

.download-btn.protected {
    background: #f59e0b;
    color: #000;
    border-color: #f59e0b;
}

.download-btn.protected:hover {
    background: #d97706;
    border-color: #d97706;
}

/* ===== 参考文献区域样式 ===== */
.references-section {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 3px solid #000;
    background: transparent;
}

.references-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #000;
    text-align: center;
}

.references-list {
    max-width: 800px;
    margin: 0 auto;
}

.reference-item {
    background: white;
    border: 2px solid #000;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    border-left: 4px solid #000;
}

.reference-item:hover {
    background: #f5f5f5;
    transform: none;
}

.reference-title {
    font-weight: 600;
    color: #000;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.reference-description {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.reference-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
}

.reference-link:hover {
    text-decoration: underline;
}

@media (max-width: 1199px) {
    .recommendations-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
    
    .share-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .article-content {
        padding: 2rem 1.5rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }

    .comment-form-author, .comment-form-email{
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 1.6rem;
    }

    .article-content {
        padding: 1.5rem 1rem;
    }
}

/* ===== 悬浮目录按钮样式 ===== */
div[title="目录"] {
    position: fixed !important;
    bottom: 120px !important;
    right: 20px !important;
    width: 50px !important;
    height: 50px !important;
    background: #fff !important;
    color: #000 !important;
    border: 3px solid #000 !important;
    box-shadow: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    user-select: none !important;
    transition: all 0.3s ease !important;
}

div[title="目录"]:hover {
    background: #f5f5f5 !important;
    color: #000 !important;
    border-color: #2563eb !important;
    transform: scale(1) !important;
}

div[title="目录"]:active {
    background: #e5e5e5 !important;
    transform: scale(0.95) !important;
}

/* 目录按钮装饰线条 */
div[title="目录"]::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border: 1px solid #000;
    border-radius: 50%;
    opacity: 0.3;
    transition: all 0.3s ease;
}

div[title="目录"]:hover::before {
    opacity: 1;
    border-color: #2563eb;
}

/* 移动端目录按钮定位调整 */
@media (max-width: 768px) {
    div[title="目录"] {
        right: 25px !important;
        bottom: 80px !important;
    }
}
