/* A4纸张标准排版样式 */
@page {
    size: A4;
    margin: 2.54cm;
}

/* 基础样式 */
body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e3e9f3 100%);
    color: #222;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 40px auto 0 auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 6px 32px rgba(60,80,120,0.10);
    padding: 36px 32px 32px 32px;
}

h1 {
    text-align: center;
    color: #2d3a4b;
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 32px;
    letter-spacing: 1px;
}

/* 上传区域样式 */
.upload-section {
    margin-bottom: 32px;
}

.drop-zone {
    border: 2.5px dashed #4f8cff;
    border-radius: 12px;
    padding: 48px 0;
    text-align: center;
    background: #f4f8ff;
    transition: background 0.3s, border-color 0.3s;
    cursor: pointer;
    position: relative;
}

.drop-zone.dragover {
    background: #e3f0ff;
    border-color: #2563eb;
}

.drop-zone p {
    margin: 12px 0 0 0;
    color: #5a6a85;
    font-size: 1.08em;
}

.drop-zone button {
    background: linear-gradient(90deg, #4f8cff 0%, #2563eb 100%);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 1.08em;
    font-weight: 500;
    margin-top: 10px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(79,140,255,0.08);
}

.drop-zone button:hover {
    background: linear-gradient(90deg, #2563eb 0%, #4f8cff 100%);
}

.hint {
    font-size: 0.98em;
    color: #8a99b3;
    margin-top: 10px;
}

/* 文件列表样式 */
.file-list {
    background: #f7faff;
    border-radius: 12px;
    padding: 24px 20px 18px 20px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(60,80,120,0.06);
}

.file-list h2 {
    margin: 0 0 18px 0;
    color: #2d3a4b;
    font-size: 1.18em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#sortableList {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

#sortableList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e3e9f3;
    font-size: 1.05em;
    transition: background 0.2s;
}

#sortableList li:last-child {
    border-bottom: none;
}

#sortableList li:hover {
    background: #f0f6ff;
}

.file-name {
    flex: 1;
    color: #3a4a5d;
    font-weight: 500;
    margin-right: 12px;
    word-break: break-all;
}

.remove-btn {
    background: #ff5c5c;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 5px;
    font-size: 0.98em;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.remove-btn:hover {
    background: #d32f2f;
}

/* 预览区域样式 */
.preview-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.preview-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5em;
}

#exportBtn {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#exportBtn:hover {
    background-color: #219a52;
}

/* 预览内容样式 */
.preview-content {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 24px 18px;
    font-family: 'Times New Roman', '宋体', serif;
    font-size: 1.08em;
    color: #222;
    line-height: 1.7;
    box-shadow: 0 1px 4px rgba(60,80,120,0.04);
    word-break: break-word;
}

.preview-content h1, .preview-content h2, .preview-content h3 {
    color: #2563eb;
    font-weight: 700;
    margin-top: 1.2em;
    margin-bottom: 0.6em;
}

.preview-content h1 { font-size: 1.7em; }
.preview-content h2 { font-size: 1.35em; }
.preview-content h3 { font-size: 1.13em; }
.preview-content p {
    margin: 0.7em 0;
    text-indent: 2em;
    text-align: justify;
}
.preview-content ul, .preview-content ol {
    margin: 0.7em 0 0.7em 2em;
}
.preview-content li {
    margin-bottom: 0.3em;
}
.preview-content pre {
    background: #f4f8ff;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.98em;
    overflow-x: auto;
    margin: 1em 0;
}
.preview-content code {
    background: #f0f2f5;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.98em;
}
.preview-content blockquote {
    border-left: 4px solid #4f8cff;
    background: #f4f8ff;
    color: #5a6a85;
    padding: 10px 18px;
    margin: 1em 0;
    border-radius: 6px;
}
.preview-content img {
    max-width: 100%;
    border-radius: 6px;
    margin: 1em 0;
    display: block;
}
.preview-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    background: #f8fafc;
    border-radius: 6px;
    overflow: hidden;
}
.preview-content th, .preview-content td {
    border: 1px solid #d0d7e5;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.98em;
}
.preview-content .page-break {
    display: block;
    height: 0;
    margin: 0;
    border: none;
    page-break-after: always;
}

/* 打印样式 */
@media print {
    .preview-content {
        margin: 0;
        box-shadow: none;
        border: none;
        width: 100%;
        height: 100%;
    }
    
    .no-print {
        display: none !important;
    }
}

/* 响应式设计 */
@media (max-width: 1000px) {
    .container, .modal-content {
        max-width: 98vw;
        padding: 18px 4vw;
    }
    .preview-content {
        max-width: 98vw;
        padding: 18px 4vw;
    }
}

@media (max-width: 600px) {
    .container, .modal-content {
        padding: 8px 2vw;
    }
    .modal-header, .modal-body {
        padding: 10px 6px;
    }
    .preview-content {
        padding: 10px 2vw;
        font-size: 0.98em;
    }
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    #docNameInput {
        min-width: 80px;
        font-size: 0.98em;
    }
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    gap: 12px;
    margin: 18px 0 10px 0;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn, #previewBtn, #exportBtn, #exportWordBtn {
    padding: 10px 28px;
    background: linear-gradient(90deg, #4f8cff 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(79,140,255,0.08);
}

.action-btn:hover, #previewBtn:hover, #exportBtn:hover, #exportWordBtn:hover {
    background: linear-gradient(90deg, #2563eb 0%, #4f8cff 100%);
}

.action-btn:disabled, #previewBtn:disabled, #exportBtn:disabled, #exportWordBtn:disabled {
    background: #bfc9d9;
    color: #fff;
    cursor: not-allowed;
}

#docNameInput {
    padding: 8px 14px;
    border: 1.5px solid #d0d7e5;
    border-radius: 6px;
    font-size: 1.05em;
    outline: none;
    transition: border 0.2s;
    min-width: 120px;
}

#docNameInput:focus {
    border-color: #4f8cff;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(44,62,80,0.18);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.25s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(44,62,80,0.18);
    width: 90vw;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: popIn 0.25s;
}

@keyframes popIn {
    from { transform: scale(0.95); }
    to { transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 28px 12px 28px;
    border-bottom: 1.5px solid #e3e9f3;
    background: #f7faff;
}

.modal-header h2 {
    margin: 0;
    color: #2d3a4b;
    font-size: 1.18em;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8em;
    color: #8a99b3;
    cursor: pointer;
    transition: color 0.2s;
    margin-left: 10px;
}

.close-btn:hover {
    color: #ff5c5c;
}

.modal-body {
    padding: 24px 28px 28px 28px;
    overflow-y: auto;
    background: #fff;
}

/* 预览内容在弹窗中的样式 */
.modal-body .preview-content {
    background: #fff;
    border-radius: 8px;
    padding: 18px 12px;
    margin: 0 auto;
    width: 100%;
    min-height: 320px;
    box-shadow: 0 2px 8px rgba(60,80,120,0.04);
} 