/* 基础变量 */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-tertiary: #e8ecf1;
    --text-primary: #2c3e50;
    --text-secondary: #5a6d82;
    --text-muted: #8795a5;
    --border-color: #dcdfe6;
    --accent-color: #409eff;
    --accent-hover: #66b1ff;
    --success-color: #67c23a;
    --warning-color: #e6a23c;
    --danger-color: #f56c6c;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* 暗色主题 */
[data-theme="dark"] {
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --bg-tertiary: #2d2d30;
    --text-primary: #d4d4d4;
    --text-secondary: #a0a0a0;
    --text-muted: #707070;
    --border-color: #3c3c3c;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 护眼绿主题 */
[data-theme="green"] {
    --bg-primary: #f0f7e9;
    --bg-secondary: #e3f0d8;
    --bg-tertiary: #d4e8c5;
    --text-primary: #2d4a22;
    --text-secondary: #4a6b3d;
    --text-muted: #6b8a5e;
    --border-color: #b8d4a8;
    --accent-color: #5a9f4a;
    --accent-hover: #6db85c;
    --shadow-sm: 0 2px 4px rgba(90, 159, 74, 0.1);
    --shadow-md: 0 4px 12px rgba(90, 159, 74, 0.15);
}

/* 紫色主题 */
[data-theme="purple"] {
    --bg-primary: #faf8ff;
    --bg-secondary: #f3f0ff;
    --bg-tertiary: #e9e3ff;
    --text-primary: #4a3f69;
    --text-secondary: #6b5b95;
    --text-muted: #8b7db5;
    --border-color: #d4c9f0;
    --accent-color: #8b5cf6;
    --accent-hover: #a78bfa;
    --shadow-sm: 0 2px 4px rgba(139, 92, 246, 0.1);
    --shadow-md: 0 4px 12px rgba(139, 92, 246, 0.15);
}

/* 暖色主题 */
[data-theme="warm"] {
    --bg-primary: #fffbf5;
    --bg-secondary: #fff5e6;
    --bg-tertiary: #ffe9cc;
    --text-primary: #5c4033;
    --text-secondary: #8b6f47;
    --text-muted: #a89070;
    --border-color: #e6d5c3;
    --accent-color: #e67e22;
    --accent-hover: #f39c12;
    --shadow-sm: 0 2px 4px rgba(230, 126, 34, 0.1);
    --shadow-md: 0 4px 12px rgba(230, 126, 34, 0.15);
}

/* 海洋蓝主题 */
[data-theme="ocean"] {
    --bg-primary: #f0f9ff;
    --bg-secondary: #e0f2fe;
    --bg-tertiary: #bae6fd;
    --text-primary: #0c4a6e;
    --text-secondary: #0369a1;
    --text-muted: #38bdf8;
    --border-color: #7dd3fc;
    --accent-color: #0ea5e9;
    --accent-hover: #38bdf8;
    --shadow-sm: 0 2px 4px rgba(14, 165, 233, 0.1);
    --shadow-md: 0 4px 12px rgba(14, 165, 233, 0.15);
}

/* 粉色主题 */
[data-theme="pink"] {
    --bg-primary: #fdf2f8;
    --bg-secondary: #fce7f3;
    --bg-tertiary: #fbcfe8;
    --text-primary: #831843;
    --text-secondary: #9d174d;
    --text-muted: #be185d;
    --border-color: #f9a8d4;
    --accent-color: #ec4899;
    --accent-hover: #f472b6;
    --shadow-sm: 0 2px 4px rgba(236, 72, 153, 0.1);
    --shadow-md: 0 4px 12px rgba(236, 72, 153, 0.15);
}

/* 深蓝主题 */
[data-theme="midnight"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #475569;
    --accent-color: #3b82f6;
    --accent-hover: #60a5fa;
    --shadow-sm: 0 2px 4px rgba(59, 130, 246, 0.2);
    --shadow-md: 0 4px 12px rgba(59, 130, 246, 0.3);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

/* 应用容器 */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg-primary);
}

/* 顶部工具栏 */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}

/* 格式栏 */
.format-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.format-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.format-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.format-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 100px;
}

.format-select:hover {
    border-color: var(--accent-color);
}

.format-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(66, 185, 131, 0.1);
}

.format-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

.format-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.format-action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--accent-color);
}

.format-action-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.format-action-btn i {
    font-size: 14px;
}

.toolbar-left {
    flex-shrink: 0;
}

.app-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-title i {
    color: var(--accent-color);
}

.toolbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.format-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-primary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tool-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 14px;
}

.tool-btn:hover {
    background: var(--bg-tertiary);
    color: var(--accent-color);
}

.separator {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 8px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 主编辑区域 */
.editor-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.editor-pane,
.preview-pane {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-pane {
    flex: 1;
    min-width: 300px;
    border-right: 1px solid var(--border-color);
}

.preview-pane {
    flex: 1;
    min-width: 300px;
}

.pane-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.pane-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.word-count {
    font-size: 12px;
    color: var(--text-muted);
}

.preview-tabs {
    display: flex;
    gap: 4px;
}

.tab-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    color: var(--accent-color);
    background: var(--bg-primary);
    font-weight: 500;
}

/* 编辑器 */
#editor {
    flex: 1;
    width: 100%;
    padding: 20px;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.8;
    resize: none;
    outline: none;
}

#editor::placeholder {
    color: var(--text-muted);
}

/* 行号样式 */
#editor.line-numbers {
    padding-left: 50px;
    position: relative;
    background-image: linear-gradient(to right, var(--bg-secondary) 40px, var(--bg-primary) 40px);
    background-attachment: local;
}

#editor.line-numbers::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-color);
    pointer-events: none;
}

/* 预览区域 */
.preview-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.preview-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 30px;
    overflow-y: auto;
    background: var(--bg-primary);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.preview-area.active {
    opacity: 1;
    visibility: visible;
}

/* Markdown预览样式 */
#preview-markdown {
    font-size: 15px;
    color: var(--text-primary);
}

#preview-markdown h1,
#preview-markdown h2,
#preview-markdown h3,
#preview-markdown h4,
#preview-markdown h5,
#preview-markdown h6 {
    margin: 24px 0 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

#preview-markdown h1 { font-size: 28px; border-bottom: 2px solid var(--border-color); padding-bottom: 8px; }
#preview-markdown h2 { font-size: 24px; }
#preview-markdown h3 { font-size: 20px; }
#preview-markdown h4 { font-size: 18px; }

#preview-markdown p {
    margin: 16px 0;
    line-height: 1.8;
}

#preview-markdown a {
    color: var(--accent-color);
    text-decoration: none;
}

#preview-markdown a:hover {
    text-decoration: underline;
}

#preview-markdown blockquote {
    margin: 16px 0;
    padding: 12px 20px;
    border-left: 4px solid var(--accent-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

#preview-markdown code {
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 13px;
}

#preview-markdown pre {
    margin: 16px 0;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

#preview-markdown pre code {
    padding: 0;
    background: transparent;
}

#preview-markdown ul,
#preview-markdown ol {
    margin: 16px 0;
    padding-left: 24px;
}

#preview-markdown li {
    margin: 8px 0;
}

#preview-markdown img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

#preview-markdown table {
    width: 100%;
    margin: 16px 0;
    border-collapse: collapse;
}

#preview-markdown th,
#preview-markdown td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

#preview-markdown th {
    background: var(--bg-secondary);
    font-weight: 600;
}

#preview-markdown hr {
    margin: 24px 0;
    border: none;
    border-top: 2px solid var(--border-color);
}

/* 公众号预览样式 */
#preview-wechat {
    background: #fff;
    color: #333;
    font-size: 16px;
    padding: 20px;
}

#preview-wechat.wechat-style {
    max-width: 677px;
    margin: 0 auto;
}

#preview-wechat h1,
#preview-wechat h2,
#preview-wechat h3,
#preview-wechat h4,
#preview-wechat h5,
#preview-wechat h6 {
    margin: 20px 0 10px;
    font-weight: bold;
    color: #333;
}

#preview-wechat h1 { font-size: 22px; }
#preview-wechat h2 { font-size: 20px; }
#preview-wechat h3 { font-size: 18px; }
#preview-wechat h4 { font-size: 16px; }

#preview-wechat p {
    margin: 15px 0;
    line-height: 1.75;
    letter-spacing: 0.5px;
}

#preview-wechat blockquote {
    margin: 15px 0;
    padding: 10px 15px;
    border-left: 4px solid #42b983;
    background: #f8f8f8;
    color: #666;
}

#preview-wechat code {
    padding: 2px 6px;
    background: #f5f5f5;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 14px;
    color: #e96900;
}

#preview-wechat pre {
    margin: 15px 0;
    padding: 15px;
    background: #282c34;
    border-radius: 6px;
    overflow-x: auto;
}

#preview-wechat pre code {
    padding: 0;
    background: transparent;
    color: #abb2bf;
}

#preview-wechat ul,
#preview-wechat ol {
    margin: 15px 0;
    padding-left: 20px;
}

#preview-wechat li {
    margin: 8px 0;
}

#preview-wechat img {
    max-width: 100%;
    display: block;
    margin: 15px auto;
    border-radius: 4px;
}

#preview-wechat table {
    width: 100%;
    margin: 15px 0;
    border-collapse: collapse;
}

#preview-wechat th,
#preview-wechat td {
    padding: 10px;
    border: 1px solid #e0e0e0;
}

#preview-wechat th {
    background: #f5f5f5;
    font-weight: bold;
}

#preview-wechat a {
    color: #42b983;
    text-decoration: none;
}

#preview-wechat hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #e0e0e0;
}

/* 调整器 */
.resizer {
    width: 6px;
    background: var(--border-color);
    cursor: col-resize;
    transition: background 0.2s;
    position: relative;
}

.resizer:hover,
.resizer.active {
    background: var(--accent-color);
}

.resizer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 30px;
    background: var(--text-muted);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.2s;
}

.resizer:hover::after {
    opacity: 1;
}

/* 底部操作栏 */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.action-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-text {
    font-size: 13px;
    color: var(--text-muted);
}

.auto-save-status {
    font-size: 12px;
    color: var(--success-color);
}

.action-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn.primary {
    background: var(--accent-color);
    color: #fff;
}

.action-btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.action-btn.secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.action-btn.secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* 提示消息 */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 12px 24px;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: 14px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

/* 导出菜单 */
.export-menu {
    position: fixed;
    top: 60px;
    right: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.export-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.export-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.export-option:hover {
    background: var(--bg-secondary);
    color: var(--accent-color);
}

.export-option:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.export-option:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* 整理选项菜单 */
.format-menu {
    position: fixed;
    top: 60px;
    right: 100px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 15px;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.format-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.format-menu-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.format-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.format-option:hover {
    color: var(--text-primary);
}

.format-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.format-apply-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.format-apply-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* 主题选择菜单 */
.theme-menu {
    position: fixed;
    top: 60px;
    right: 60px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
    min-width: 180px;
    padding: 8px 0;
}

.theme-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-menu-header {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.theme-option:hover {
    background: var(--bg-secondary);
}

.theme-option.active {
    background: var(--bg-tertiary);
    color: var(--accent-color);
}

.theme-preview {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.light-preview {
    background: linear-gradient(135deg, #ffffff 50%, #f5f7fa 50%);
}

.dark-preview {
    background: linear-gradient(135deg, #1e1e1e 50%, #252526 50%);
}

.green-preview {
    background: linear-gradient(135deg, #f0f7e9 50%, #5a9f4a 50%);
}

.purple-preview {
    background: linear-gradient(135deg, #faf8ff 50%, #8b5cf6 50%);
}

.warm-preview {
    background: linear-gradient(135deg, #fffbf5 50%, #e67e22 50%);
}

.ocean-preview {
    background: linear-gradient(135deg, #f0f9ff 50%, #0ea5e9 50%);
}

.pink-preview {
    background: linear-gradient(135deg, #fdf2f8 50%, #ec4899 50%);
}

.midnight-preview {
    background: linear-gradient(135deg, #0f172a 50%, #3b82f6 50%);
}

.theme-name {
    flex: 1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .toolbar {
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .toolbar-center {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }

    .format-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .editor-main {
        flex-direction: column;
    }

    .editor-pane,
    .preview-pane {
        min-width: 100%;
        min-height: 300px;
    }

    .resizer {
        width: 100%;
        height: 6px;
        cursor: row-resize;
    }

    .action-bar {
        flex-direction: column;
        gap: 12px;
    }

    .action-left,
    .action-right {
        width: 100%;
        justify-content: center;
    }
}

/* 内容主题设置面板 */
.content-theme-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.content-theme-panel.show {
    right: 0;
}

.theme-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.theme-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-panel-header h3 i {
    color: var(--accent-color);
}

.close-panel-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-panel-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.theme-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.theme-section {
    margin-bottom: 30px;
}

.theme-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
}

.preset-themes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.preset-theme-card {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.preset-theme-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.preset-theme-card.active {
    border-color: var(--accent-color);
    background: var(--bg-tertiary);
}

.preset-theme-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.preset-theme-preview {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.theme-setting-group {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.setting-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.setting-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-name {
    flex: 0 0 100px;
    font-size: 13px;
    color: var(--text-secondary);
}

.setting-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    outline: none;
    -webkit-appearance: none;
}

.setting-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: var(--transition);
}

.setting-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.setting-value {
    flex: 0 0 50px;
    font-size: 13px;
    color: var(--text-primary);
    text-align: right;
    font-weight: 500;
}

.setting-color {
    flex: 1;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: var(--bg-primary);
}

.save-custom-theme {
    display: flex;
    gap: 12px;
}

.theme-name-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

.theme-name-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.save-theme-btn {
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.save-theme-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
