:root { --primary-color: #07c160; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; padding: 0; display: flex; height: 100vh; background-color: #f5f5f5; }
.sidebar { width: 320px; background: #fff; padding: 20px; box-shadow: 2px 0 5px rgba(0,0,0,0.05); overflow-y: auto; z-index: 10; }
.main { flex: 1; padding: 20px; display: flex; flex-direction: column; align-items: center; }
h2 { font-size: 18px; margin-top: 0; color: #333; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 5px; color: #666; font-weight: bold; }
.form-group input, .form-group select { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; background-color: white; font-size: 14px; }

button.sidebar-btn { width: 100%; padding: 10px; margin-bottom: 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; transition: 0.2s; }
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: #06ad56; }
.btn-outline { background: white; border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background: #e6f9ef; }
.btn-danger { background: white; border: 1px solid #dc3545; color: #dc3545; }
.btn-danger:hover { background: #fdf2f2; }

/* 阴影参数输入框专有样式 */
.shadow-inputs { display: flex; gap: 5px; margin-bottom: 8px; }
.shadow-inputs input[type="number"] { padding: 4px; font-size: 12px; text-align: center; }
.shadow-inputs input[type="color"] { width: 40px; padding: 0; border: 1px solid #ddd; cursor: pointer; }

.editor-container { width: 100%; max-width: 450px; background: #fff; flex: 1; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); overflow: hidden; display: flex; flex-direction: column; }
.editor-header { padding: 10px; background: #f8f9fa; border-bottom: 1px solid #eee; text-align: center; font-size: 14px; color: #999; }

/* 工具栏样式 */
.editor-toolbar { padding: 8px 10px; background: #fff; border-bottom: 1px solid #eee; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.toolbar-btn { padding: 4px 8px; border: 1px solid transparent; background: transparent; border-radius: 4px; cursor: pointer; font-size: 15px; color: #333; transition: 0.2s; font-family: "Times New Roman", serif; font-weight: bold;}
.toolbar-btn:hover { background: #f0f0f0; border-color: #ddd; }
.toolbar-select { padding: 4px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; background: white; cursor: pointer; height: 26px; }
.toolbar-divider { width: 1px; height: 16px; background: #ddd; margin: 0 2px; }
.btn-clear-format { color: #dc3545; font-size: 12px; display: flex; align-items: center; gap: 4px; font-family: inherit; font-weight: normal; margin-left: auto;}
.btn-clear-format:hover { background: #fdf2f2; border-color: #f5c6cb; }

/* 色板样式 */
.color-picker-wrapper { position: relative; display: inline-block; }
.color-trigger { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: 12px; color: #333; }
.color-trigger:hover { background: #f0f0f0; border-color: #ddd; }
.color-preview { width: 14px; height: 14px; border: 1px solid #ccc; border-radius: 2px; display: inline-block; box-sizing: border-box; }
.color-panel { position: absolute; top: 100%; left: 0; margin-top: 4px; background: #fff; border: 1px solid #ddd; box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100; width: 220px; padding: 10px; border-radius: 4px; display: none; }
.color-panel.active { display: block; }
.color-section-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 5px; margin-bottom: 8px; }
.color-section-title { font-size: 12px; color: #666; }
.panel-clear-btn { background: none; border: 1px solid #ddd; border-radius: 2px; font-size: 12px; padding: 2px 6px; cursor: pointer; color: #333; transition: 0.2s; }
.panel-clear-btn:hover { background: #fdf2f2; color: #dc3545; border-color: #f5c6cb; }
.color-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; margin-bottom: 10px; }
.color-swatch { width: 16px; height: 16px; cursor: pointer; border: 1px solid #e0e0e0; box-sizing: border-box; transition: transform 0.1s; }
.color-swatch:hover { border-color: #000; transform: scale(1.15); z-index: 2; box-shadow: 0 0 2px rgba(0,0,0,0.3); }
.color-swatch.empty { border: 1px dashed #ddd; background: #fafafa; cursor: default; }
.color-swatch.empty:hover { border-color: #ddd; transform: none; box-shadow: none; }

#editor { flex: 1; padding: 20px; outline: none; overflow-y: auto; background-color: #fff; }
#editor:empty:before { content: '请在此处粘贴或输入您的草稿内容（支持图文）...'; color: #ccc; }

/* 源代码编辑区样式（可编辑） */
#sourceCode { flex: 1; padding: 20px; outline: none; overflow-y: auto; background-color: #2b2b2b; color: #f8f8f2; font-family: 'Consolas', 'Monaco', 'Courier New', monospace; font-size: 13px; line-height: 1.5; white-space: pre; display: none; border: none; resize: none; width: 100%; box-sizing: border-box; tab-size: 2; }
.btn-code { color: #1890ff; font-weight: normal; font-family: inherit; }