/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 主容器布局 */
.container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.logo {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
    padding: 1rem 0;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.15);
    border-left-color: white;
    font-weight: 600;
}

.nav-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* 页面通用样式 */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.page-header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* 导入区域样式 */
.import-section {
    max-width: 800px;
    margin: 0 auto 2rem;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upload-area:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.upload-area i {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.upload-area p {
    color: #7f8c8d;
    font-size: 1rem;
}

/* 结果区域样式 */
.results-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.results-header h2 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* 错误列表样式 */
.errors-list {
    margin-bottom: 2rem;
}

.errors-list h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.errors-container {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.error-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.error-item:last-child {
    margin-bottom: 0;
}

.error-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.error-details {
    flex: 1;
}

.error-location {
    font-weight: 600;
    color: #e53e3e;
    margin-bottom: 0.5rem;
}

.error-message {
    color: #4a5568;
    font-size: 0.95rem;
}

.error-severity {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.error-severity.high {
    background: #fed7d7;
    color: #e53e3e;
}

.error-severity.medium {
    background: #feebc8;
    color: #dd6b20;
}

/* 错误分组样式 */
.error-group {
    margin-bottom: 0.8rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background: white;
    border: 1px solid #e0e0e0;
}

.error-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e0e0e0;
}

.error-group-header:hover {
    background: #edf2f7;
}

.group-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.group-count {
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.group-message {
    font-weight: 500;
    color: #2d3748;
    flex: 1;
}

.group-severity {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 1rem;
}

.group-toggle {
    color: #718096;
    transition: transform 0.3s ease;
}

.toggle-icon {
    font-size: 0.8rem;
    font-weight: bold;
}

.error-group-content {
    padding: 0;
    max-height: 500px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.error-group-content .error-item {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    padding: 0.8rem 2rem;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-group-content .error-item:last-child {
    border-bottom: none;
}

.error-group-content .error-location {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 修复选项样式 */
.fix-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f0fff4;
    border: 1px solid #c6f6d5;
    border-radius: 8px;
}

.fix-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.fix-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.fix-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.fix-option:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.fix-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.fix-option label {
    font-weight: 500;
    color: #2d3748;
    cursor: pointer;
    flex: 1;
}

/* 表格区域样式 */
.table-section {
    margin-bottom: 2rem;
}

.table-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#dataTable th,
#dataTable td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

#dataTable th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
    position: sticky;
    top: 0;
    z-index: 10;
}

#dataTable tr:hover {
    background: #f7fafc;
}

#dataTable tr.error-row {
    background: #fff5f5;
}

#dataTable tr.warning-row {
    background: #fffaf0;
}

/* 按钮样式 */
.btn {
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-success {
    background: #38a169;
    color: white;
}

.btn-success:hover {
    background: #2f855a;
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

/* 导出区域样式 */
.export-section {
    text-align: right;
    margin-top: 2rem;
}

/* 加载动画样式 */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 公示模板样式 */
.publicity-editor {
    margin: 0 auto;
}

.editor-toolbar {
    margin-bottom: 2rem;
    text-align: right;
}

.publicity-preview {
    background: white;
    border-radius: 8px;
    padding: 4rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

.publicity-content {
    text-align: center;
    line-height: 1.8;
}

.publicity-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    padding: 1rem;
    border-bottom: 2px solid #e0e0e0;
}

.publicity-subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 2rem;
    padding: 1rem;
}

.publicity-info {
    margin-bottom: 2rem;
}

.publicity-info p {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.publicity-date {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #4a5568;
}

.publicity-note {
    font-size: 1rem;
    color: #64748b;
    border-top: 2px solid #e0e0e0;
    padding-top: 2rem;
    margin-top: 2rem;
}

/* 可编辑内容样式 */
[contenteditable="true"] {
    outline: none;
    transition: all 0.3s ease;
}

[contenteditable="true"]:hover {
    background: #f7fafc;
}

[contenteditable="true"]:focus {
    background: #edf2f7;
    border-radius: 4px;
}

/* 页面设置 - 公示模板横向 */
@page publicity-page {
    size: landscape;
    margin: 1.8cm 1cm 0cm;
    header: none;
    footer: none;
}

/* 页面设置 - 土地权属证明纵向 */
@page certificate-page {
    size: portrait;
    margin: 2cm;
    header: none;
    footer: none;
}

/* 打印样式 - 通用 */
@media print {
    /* 隐藏不需要打印的元素 */
    .sidebar,
    .editor-toolbar,
    .page-header,
    /* 隐藏滚动条 */
    ::-webkit-scrollbar {
        display: none !important;
    }

    /* 确保滚动条不影响打印 */
    * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* 重置页面背景为白色 */
    html, body {
        background: white !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* 确保主内容区域正常显示 */
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }
}

/* 页面设置 - 公示模板横向 */
@page publicity {
    size: landscape;
    margin: 1.8cm 1cm 0cm;
    header: none;
    footer: none;
}

/* 页面设置 - 土地权属证明纵向 */
@page certificate {
    size: portrait;
    margin: 2cm;
    header: none;
    footer: none;
}

/* 打印样式 - 通用 */
@media print {
    /* 隐藏不需要打印的元素 */
    .sidebar,
    .editor-toolbar,
    .page-header,
    /* 隐藏滚动条 */
    ::-webkit-scrollbar {
        display: none !important;
    }

    /* 确保滚动条不影响打印 */
    * {
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* 重置页面背景为白色 */
    html, body {
        background: white !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* 确保主内容区域正常显示 */
    .main-content {
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }
    
    /* 只显示当前活跃的页面 */
    .page:not(.active) {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* 确保当前活跃页面显示 */
    .page.active {
        display: block !important;
        visibility: visible !important;
    }
    
    /* 根据活跃页面应用不同的页面设置 */
    .page.active#publicity {
        page: publicity;
    }
    
    .page.active#land-certificate {
        page: certificate;
    }
    
    /* 公示模板样式 */
    #publicity {
        page: publicity !important;
        size: landscape !important;
    }
    
    #publicity .publicity-preview {
        width: 100% !important;
        max-width: none !important;
        min-width: 100% !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: white !important;
        box-sizing: border-box !important;
        transform: rotate(0deg) !important;
    }

    #publicity .publicity-content {
        width: 100% !important;
        max-width: none !important;
        text-align: center !important;
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box !important;
        transform: rotate(0deg) !important;
    }

    #publicity .publicity-title {
        font-size: 48pt !important;
        font-weight: bold !important;
        margin-bottom: 10pt !important;
        line-height: 1.2 !important;
        color: #000 !important;
        border-bottom: none !important;
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #publicity .publicity-subtitle {
        font-size: 42pt !important;
        font-weight: bold !important;
        margin-top: 0 !important;
        margin-bottom: 20pt !important;
        line-height: 1.2 !important;
        color: #000 !important;
        text-align: center !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #publicity .publicity-info {
        margin-bottom: 30pt !important;
        text-align: right !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #publicity .publicity-info p {
        font-size: 26pt !important;
        margin-bottom: 8pt !important;
        line-height: 1.3 !important;
        text-align: right !important;
        color: #000 !important;
    }

    #publicity .publicity-date {
        margin-bottom: 25pt !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    #publicity .publicity-date p {
        font-size: 30pt !important;
        margin-bottom: 10pt !important;
        line-height: 1.4 !important;
        text-align: center !important;
        color: #000 !important;
    }

    #publicity .publicity-note p {
        font-size: 16pt !important;
        margin-bottom: 5pt !important;
        line-height: 1.5 !important;
        text-align: center !important;
        color: #000 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 土地权属证明样式 */
    #land-certificate .certificate-preview {
        font-family: 'FangSong_GB2312', 'Times New Roman', Times, serif !important;
        box-shadow: none !important;
        border: none !important;
        padding: 2cm !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        background: white !important;
    }
    
    #land-certificate .certificate-preview h1 {
        font-family: 'Times New Roman', Times, serif !important;
        font-size: 24pt !important;
        text-align: center !important;
        margin-bottom: 2rem !important;
        color: #000 !important;
    }
    
    #land-certificate .certificate-preview .certificate-content {
        font-size: 12pt !important;
        line-height: 2 !important;
        text-align: justify !important;
        text-justify: inter-character !important;
        color: #000 !important;
        width: 100% !important;
        max-width: 100% !important;
        page-break-inside: avoid !important;
    }
    
    #land-certificate .certificate-preview .section-title {
        font-weight: bold !important;
        font-size: 14pt !important;
        margin-top: 1.5rem !important;
        margin-bottom: 0.5rem !important;
        color: #000 !important;
        width: 100% !important;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .nav-menu {
        display: flex;
        padding: 0;
    }

    .nav-item {
        flex: 1;
        justify-content: center;
        padding: 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .nav-item.active {
        border-left-color: transparent;
        border-bottom-color: white;
    }

    .nav-item:hover {
        border-left-color: transparent;
        border-bottom-color: white;
    }

    .results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .stats {
        width: 100%;
        justify-content: space-between;
    }

    .fix-options {
        grid-template-columns: 1fr;
    }

    .publicity-preview {
        padding: 2rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 导入区域拖拽样式 */
.upload-area.dragover {
    background: #f0f7ff;
    border-color: #3182ce;
    transform: scale(1.02);
}



/* 二级菜单切换样式 */
.subpage-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.subpage-tab {
    padding: 0.7rem 1.5rem;
    background: #f7fafc;
    border: 1px solid #e0e0e0;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: none;
}

.subpage-tab:hover {
    background: #edf2f7;
}

.subpage-tab.active {
    background: white;
    border-color: #667eea;
    color: #667eea;
}

/* 子页面样式 */
.subpage {
    display: none;
    animation: fadeIn 0.5s ease;
}

.subpage.active {
    display: block;
}

/* 表单样式 */
.form-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

.form-group input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-actions {
    margin-top: 2rem;
    text-align: right;
}

/* 证明预览样式 */
.preview-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.certificate-preview {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 4rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-height: 500px;
    margin-top: 1rem;
    font-family: 'Times New Roman', Times, serif;
    position: relative;
}

/* 土地权属证明样式 */
.certificate-preview {
    font-family: 'FangSong_GB2312', 'Times New Roman', Times, serif;
}

.certificate-preview h1 {
    font-family: 'Times New Roman', Times, serif;
    text-align: center;
    font-size: 28pt;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #000;
}

.certificate-preview .certificate-content {
    font-size: 19pt;
    line-height: 2;
    text-align: justify;
    color: #000;
}

.certificate-preview .section-title {
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 20pt;
    color: #000;
}

.certificate-preview ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.certificate-preview li {
    font-size: 19pt;
    line-height: 2;
    color: #000;
}

.certificate-preview .input-field {
    display: inline-block;
    min-width: 100px;
    border-bottom: 1px solid #000;
    margin: 0 0.3rem;
    padding: 0 0.3rem;
}

.certificate-preview .red-text {
    color: #e53e3e;
}

/* 引入指定字体 - 添加多种格式支持 */
@font-face {
    font-family: 'FangSong_GB2312';
    src: url('./font/仿宋_GB2312.ttf') format('truetype'),
         local('SimSun'); /* 回退到本地宋体 */
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* 字体加载过程中使用回退字体 */
}

/* 打印样式 - 土地权属证明 */
@media print and (min-width: 0px) {
    /* 只对土地权属证明页面应用 */
    #land-certificate {
        /* 设置页面边距为0，让内容完全占满 */
        @page {
            size: A4 portrait !important;
            margin: 0 !important;
            padding: 0 !important;
            header: none !important;
            footer: none !important;
        }
        
        /* 重置所有默认样式 */
        * {
            margin: 0 !important;
            padding: 0 !important;
            box-sizing: border-box !important;
        }
        
        /* 隐藏不需要打印的元素 */
        .sidebar,
        .page-header,
        .subpage-tabs,
        .form-section,
        .editor-toolbar,
        /* 隐藏所有可能的浏览器默认元素 */
        header,
        footer,
        nav,
        aside,
        /* 隐藏其他页面 */
        #checklist,
        #publicity,
        /* 隐藏打印预览中可能出现的其他元素 */
        #loading,
        .results-section,
        /* 隐藏滚动条 */
        ::-webkit-scrollbar {
            display: none !important;
            visibility: hidden !important;
            width: 0 !important;
            height: 0 !important;
        }
        
        /* 确保滚动条不影响打印 */
        * {
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
        }
        
        /* 重置页面背景为白色 */
        html, body {
            background: white !important;
            color: #000 !important;
            margin: 0 !important;
            padding: 0 !important;
            height: auto !important;
            overflow: visible !important;
        }
        
        /* 确保土地权属证明页面正常显示 */
        #land-certificate {
            display: block !important;
            visibility: visible !important;
        }
        
        /* 确保主内容区域占满整个页面 */
        .main-content {
            padding: 0 !important;
            margin: 0 !important;
            background: white !important;
            width: 100% !important;
            max-width: 100% !important;
            min-width: 100% !important;
            overflow: visible !important;
        }
        
        /* 使用指定字体 */
        .certificate-preview {
            font-family: 'FangSong_GB2312', 'Times New Roman', Times, serif !important;
            box-shadow: none !important;
            border: none !important;
            padding: 2cm 2cm !important;
            margin: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
            min-width: 100% !important;
            height: auto !important;
            min-height: 100vh !important;
            background: white !important;
        }
        
        /* 标题使用默认字体，其他文字使用指定字体 */
        .certificate-preview h1 {
            font-family: 'Times New Roman', Times, serif !important;
            font-size: 24pt !important;
            text-align: center !important;
            margin-bottom: 2rem !important;
            color: #000 !important;
        }
        
        /* 调整证明内容样式，确保内容充分利用宽度 */
        .certificate-preview .certificate-content {
            font-size: 12pt !important;
            line-height: 2 !important;
            text-align: justify !important;
            text-justify: inter-character !important;
            color: #000 !important;
            width: 100% !important;
            max-width: 100% !important;
        }
        
        /* 调整章节标题样式 */
        .certificate-preview .section-title {
            font-weight: bold !important;
            font-size: 14pt !important;
            margin-top: 1.5rem !important;
            margin-bottom: 0.5rem !important;
            color: #000 !important;
            width: 100% !important;
        }
        
        /* 确保证书内容在一页内 */
        .certificate-preview {
            page-break-inside: avoid !important;
            break-inside: avoid-page !important;
        }
        
        /* 确保html和body占满整个页面 */
        html, body {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 100% !important;
            height: 100% !important;
            min-height: 100vh !important;
            background: white !important;
            overflow: visible !important;
        }
        
        /* 确保证书预览容器占满整个页面 */
        #selfInsurancePreview,
        #groupInsurancePreview,
        #responsibilityNoticePreview {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 100% !important;
            height: auto !important;
            min-height: 100vh !important;
            margin: 0 !important;
            padding: 2cm !important;
            background: white !important;
        }
    }
}

/* 公示模板特殊打印规则 */
@media print {
    #publicity {
        page: publicity !important;
        size: landscape !important;
    }
    
    #publicity .publicity-preview {
        page: publicity !important;
        size: landscape !important;
    }
    
    #publicity .publicity-content {
        page: publicity !important;
        size: landscape !important;
    }
}