* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    padding: 20px;
    color: #2c3e50;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.editor-container {
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.editor {
    width: 100%;
    min-height: 300px;
    padding: 40px;
    background: #fff9f0;
    border: 1px solid #e0e0e0;
    line-height: 2;
    color: #2c3e50;
    white-space: pre-wrap;
}

.editor p {
    text-indent: 2em;
    margin-bottom: 1em;
}

.editor:focus {
    outline: none;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding: 20px;
    background: white;
}

button {
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

button:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.preview-area {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

canvas {
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* 编辑器内容为空时的提示文字样式 */
.editor[contenteditable=true]:empty:before {
    content: '在这里输入文字...';
    color: #999;
}

.toolbar {
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.toolbar button {
    padding: 8px 15px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.toolbar button:hover {
    background: #e0e0e0;
    transform: none;
}

.toolbar button.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

/* 标题样式 */
.editor p.title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 1.2em;
    text-indent: 0;
    text-align: center;
}

/* 正文样式 */
.editor p.normal {
    font-size: 18px;
    font-weight: normal;
    margin-bottom: 1em;
    text-indent: 2em;
}

/* 添加使用说明样式 */
.instructions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #666;
}

.instructions p {
    margin-bottom: 8px;
    font-weight: bold;
}

.instructions ol {
    padding-left: 20px;
    margin: 0;
}

.instructions li {
    margin-bottom: 4px;
} 