@font-face {
    font-family: 'FZXiaoBiaoSong';
    src: url('fonts/FZXiaoBiaoSong.ttf') format('truetype');
}

@font-face {
    font-family: 'SimHei';
    src: url('fonts/SimHei.ttf') format('truetype');
}

@font-face {
    font-family: 'KaiTi';
    src: url('fonts/KaiTi.ttf') format('truetype');
}

@font-face {
    font-family: 'FangSong';
    src: url('fonts/FangSong.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'FangSong', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.editor-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.input-section, .output-section {
    flex: 1;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

h2 {
    margin-bottom: 15px;
    font-size: 18px;
}

textarea {
    width: 100%;
    height: 500px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: 'FangSong', sans-serif;
    font-size: 16px;
}

.output-container {
    width: 100%;
    height: 500px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    overflow-y: auto;
}

button {
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 5px;
}

button:hover {
    background-color: #45a049;
}

#clear-btn {
    background-color: #f44336;
}

#clear-btn:hover {
    background-color: #d32f2f;
}

#copy-btn, #download-btn, #print-btn {
    background-color: #2196F3;
}

#copy-btn:hover, #download-btn:hover, #print-btn:hover {
    background-color: #0b7dda;
}

#paste-btn {
    background-color: #ff9800;
}

#paste-btn:hover {
    background-color: #e68a00;
}

#export-pdf-btn {
    background-color: #f44336;
}

#export-pdf-btn:hover {
    background-color: #d32f2f;
}

#export-word-btn {
    background-color: #2979FF;
}

#export-word-btn:hover {
    background-color: #2962FF;
}

/* 排版后的样式 - 更新为指定格式 */
/* A4纸张规格: 210mm×297mm */
/* 版心: 156mm×225mm */
.output-container {
    /* 设置A4纸张比例 */
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    /* 设置页边距 */
    padding-top: 37mm;
    padding-bottom: 35mm;
    padding-left: 28mm;
    padding-right: 26mm;
    /* 版心尺寸为156mm×225mm */
    box-sizing: border-box;
    background-color: white;
    /* 添加阴影突出显示纸张效果 */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.title {
    font-family: 'FZXiaoBiaoSong', serif;
    font-size: 22pt; /* 二号字 */
    text-align: center;
    font-weight: bold;
    margin-bottom: 20pt;
}

.heading-1 {
    font-family: 'SimHei', sans-serif; /* 黑体 */
    font-size: 16pt; /* 三号字 */
    text-align: left;
    line-height: 30pt;
    font-weight: normal;
    margin-bottom: 10pt;
    text-indent: 0; /* 成段左对齐 */
}

.heading-2 {
    font-family: 'KaiTi', sans-serif; /* 楷体 */
    font-size: 16pt; /* 三号字 */
    text-align: left;
    line-height: 30pt;
    font-weight: normal;
    margin-bottom: 10pt;
    text-indent: 0; /* 成段左对齐 */
}

.heading-3 {
    font-family: 'FangSong', sans-serif; /* 仿宋 */
    font-size: 16pt; /* 三号字 */
    text-align: left;
    line-height: 30pt;
    font-weight: normal;
    margin-bottom: 10pt;
    text-indent: 0; /* 成段左对齐 */
}

.heading-4 {
    font-family: 'FangSong', sans-serif;
    font-size: 16pt; /* 三号字 */
    text-align: left;
    line-height: 30pt;
    font-weight: normal;
    margin-bottom: 10pt;
    text-indent: 0; /* 成段左对齐 */
}

.paragraph {
    font-family: 'FangSong', sans-serif; /* 仿宋 */
    font-size: 16pt; /* 三号字 */
    text-indent: 2em; /* 首行缩进2字符 */
    text-align: left;
    line-height: 30pt; /* 30pt行距 */
    margin-bottom: 10pt;
}

/* 打印样式优化 */
@media print {
    body {
        background-color: #fff;
        padding: 0;
        margin: 0;
    }
    
    .container {
        box-shadow: none;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }
    
    h1, h2, .input-section, button {
        display: none;
    }
    
    .editor-container {
        display: block;
        margin: 0;
        gap: 0;
    }
    
    .output-section {
        background-color: #fff;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .output-container {
        border: none;
        height: auto;
        padding-top: 37mm;
        padding-bottom: 35mm;
        padding-left: 28mm;
        padding-right: 26mm;
        margin: 0;
        width: 210mm;
        min-height: 297mm;
        box-shadow: none;
    }
    
    /* 确保打印时页面居中 */
    @page {
        size: A4;
        margin: 0;
    }
}

/* 移动端响应式设计 */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .editor-container {
        flex-direction: column;
    }
    
    .input-section, .output-section {
        width: 100%;
    }
    
    textarea, .output-container {
        height: 300px;
    }
    
    button {
        margin-bottom: 5px;
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .input-section, .output-section {
        display: flex;
        flex-direction: column;
    }
    
    .input-section button, .output-section button {
        align-self: flex-start;
    }
}

/* 小屏幕手机适配 */
@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 5px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    h2 {
        font-size: 16px;
    }
    
    textarea, .output-container {
        height: 250px;
    }
    
    .input-section, .output-section {
        padding: 10px;
    }
    
    /* 按钮组样式 */
    .input-section, .output-section {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    button {
        margin: 3px;
        font-size: 12px;
        padding: 5px 8px;
        flex-grow: 1;
    }
} 