/* ========== PDF风格详情页样式（完整修复版） ========== */

/* 整体背景 */
.pdf-container {
    background: #e8eef2;
    padding: 3rem 0;
    min-height: 100vh;
}

/* PDF纸张 */
.pdf-paper {
    max-width: 1280px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 3rem;
}

/* ========== 头部 ========== */
.pdf-header {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.pdf-breadcrumb {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 1rem;
    word-break: break-word;
}

.pdf-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.pdf-breadcrumb a:hover {
    color: #2563eb;
}

.pdf-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
    line-height: 1.3;
    word-break: break-word;
}

.pdf-meta {
    margin-top: 0.5rem;
}

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.pdf-featured-image {
    margin-top: 1.5rem;
}

.pdf-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-caption {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.5rem;
    text-align: center;
}

/* ========== 正文 ========== */
.pdf-content {
    color: #1f2937;
    font-size: 1rem;
    line-height: 1.8;
    overflow-x: auto;
    word-wrap: break-word;
    word-break: break-word;
}

.pdf-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
}

.pdf-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem;
    color: #111827;
}

.pdf-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    word-wrap: break-word;
}

.pdf-content a {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

.pdf-content ul, .pdf-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.pdf-content li {
    margin: 0.25rem 0;
    line-height: 1.7;
}

.pdf-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-left: 4px solid #2563eb;
    font-style: italic;
    color: #4b5563;
    overflow-x: auto;
}

.pdf-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pdf-content th, .pdf-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
    word-break: break-word;
}

.pdf-content th {
    background: #f9fafb;
    font-weight: 600;
}

.pdf-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border-radius: 8px;
}

/* ========== 文章底部标签 ========== */
.pdf-footer-tags {
    margin: 2rem 0 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.pdf-tags {
    font-size: 0.8rem;
    color: #4b5563;
    word-break: break-word;
}

.pdf-tags a {
    color: #2563eb;
    text-decoration: none;
}

/* ========== 上一篇/下一篇导航 ========== */
.pdf-post-nav {
    display: flex;
    justify-content: space-between;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.pdf-post-nav .nav-previous,
.pdf-post-nav .nav-next {
    width: 45%;
}

.pdf-post-nav .nav-previous a,
.pdf-post-nav .nav-next a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.85rem;
    word-break: break-word;
}

.pdf-post-nav .nav-previous {
    text-align: left;
}

.pdf-post-nav .nav-next {
    text-align: right;
}

/* ========== 评论区域 - 修复字体颜色 ========== */
.pdf-comments {
    margin: 2rem 0;
    overflow-x: hidden;
}

.pdf-comments .comments-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
    color: #111827;
}

.pdf-comments .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pdf-comments .comment {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb;
}

.pdf-comments .comment-author {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.pdf-comments .comment-meta {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.pdf-comments .comment-content p {
    font-size: 0.85rem;
    color: #4b5563;
    margin: 0;
}

/* 评论表单 */
.pdf-comments .comment-respond {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.pdf-comments .comment-reply-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

/* 表单说明文字 - 颜色加深 */
.pdf-comments .comment-notes {
    font-size: 0.75rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

.pdf-comments .required {
    color: #dc2626;
}

/* 字段标签 - 颜色加深（显示名称、邮箱、网站等） */
.pdf-comments .comment-form-author label,
.pdf-comments .comment-form-email label,
.pdf-comments .comment-form-url label,
.pdf-comments .comment-form-comment label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

/* 输入框样式 */
.pdf-comments .comment-form-author input,
.pdf-comments .comment-form-email input,
.pdf-comments .comment-form-url input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f2937;
}

.pdf-comments .comment-form-author input:focus,
.pdf-comments .comment-form-email input:focus,
.pdf-comments .comment-form-url input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

/* 评论内容输入框 */
.pdf-comments .comment-form-comment textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #ffffff;
    color: #1f2937;
    min-height: 120px;
}

.pdf-comments .comment-form-comment textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.1);
}

/* 复选框 */
.pdf-comments .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.pdf-comments .comment-form-cookies-consent input {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.pdf-comments .comment-form-cookies-consent label {
    font-size: 0.75rem;
    color: #4b5563;
    margin: 0;
    font-weight: normal;
    cursor: pointer;
}

/* 提示文字（您的邮箱不会被公开等） */
.pdf-comments .form-allowed-tags,
.pdf-comments .form-text {
    font-size: 0.7rem;
    color: #6b7280;
    margin: 0.5rem 0;
    line-height: 1.4;
}

/* 已登录用户信息 */
.pdf-comments .logged-in-as {
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 1rem;
}

.pdf-comments .logged-in-as a {
    color: #2563eb;
    text-decoration: none;
}

/* 提交按钮 */
.pdf-comments .form-submit {
    margin-top: 1rem;
}

.pdf-comments .submit {
    background: #2563eb;
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.pdf-comments .submit:hover {
    background: #1e40af;
}

.comments-closed {
    color: #6b7280;
    font-size: 0.85rem;
    text-align: center;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* ========== 版权信息 ========== */
.pdf-copyright {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
    font-size: 0.7rem;
    color: #9ca3af;
    text-align: center;
}

/* ========== 工具栏 ========== */
.pdf-tools {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}

.tool-btn {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

/* ========== 打印 ========== */
@media print {
    .site-header, .site-footer, .pdf-tools, .header-cta, .side-contact, .wechat-modal {
        display: none !important;
    }
    .pdf-container {
        background: white;
        padding: 0;
    }
    .pdf-paper {
        padding: 0;
        box-shadow: none;
    }
    .pdf-post-nav {
        display: none;
    }
}

/* ========== 手机端 ========== */
@media (max-width: 768px) {
    .pdf-container {
        padding: 0.5rem;
    }
    .pdf-paper {
        padding: 1rem;
    }
    .pdf-title {
        font-size: 1.3rem;
    }
    .meta-line {
        flex-direction: column;
        gap: 0.25rem;
    }
    .pdf-post-nav {
        flex-direction: column;
        gap: 0.75rem;
    }
    .pdf-post-nav .nav-previous,
    .pdf-post-nav .nav-next {
        width: 100%;
        text-align: center;
    }
    .pdf-tools {
        right: 0.8rem;
        bottom: 0.8rem;
    }
    .tool-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    .pdf-comments .submit {
        width: 100%;
        padding: 0.6rem;
    }
    .pdf-comments .comment-form-author label,
    .pdf-comments .comment-form-email label,
    .pdf-comments .comment-form-url label,
    .pdf-comments .comment-form-comment label {
        font-size: 0.8rem;
    }
}