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

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

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* 页眉样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* 主要内容区域 */
main {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

section:last-child {
    border-bottom: none;
}

h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* 表单元素 */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

textarea {
    min-height: 200px;
    resize: vertical;
}

.help-text {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 按钮样式 */
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-right: 10px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

.actions {
    margin-top: 20px;
}

/* 预览区域 */
.preview-section {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
}

.preview-container {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.preview-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.preview-subject {
    font-weight: bold;
    font-size: 18px;
}

.preview-body {
    white-space: pre-wrap;
}

/* JSON输出区域 */
.json-output {
    background-color: #f9f9f9;
}

pre#jsonDisplay {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    white-space: pre-wrap;
    font-family: monospace;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.instructions {
    background-color: #e8f4fc;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.instructions h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin-bottom: 5px;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

footer a {
    color: #3498db;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 收件人预览表格 */
.recipients-preview {
    margin-top: 20px;
    margin-bottom: 20px;
}

#recipientsTable {
    overflow-x: auto;
}

#recipientsTable table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#recipientsTable th,
#recipientsTable td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#recipientsTable th {
    background-color: #f2f2f2;
    font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header, main, footer {
        padding: 15px;
    }
    
    button {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }
}
