.lig-tool-wrapper { --p-bg: #ffffff; --p-border: #e2e8f0; --p-primary: #8b5cf6; --p-text: #0f172a; width: 100%; max-width: 1200px; margin: 0 auto; background: var(--p-bg); border-radius: 20px; padding: 24px; border: 1px solid var(--p-border); box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); box-sizing: border-box; }
.lig-header-main { font-size: 1.6rem; font-weight: 800; color: var(--p-text); margin-bottom: 8px; text-align: center; }
.lig-subtitle { color: #64748b; font-size: 0.95rem; padding-bottom: 20px; border-bottom: 1px solid var(--p-border); margin-bottom: 24px; text-align: center; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.6; }

.lig-layout { display: flex; flex-direction: column; gap: 24px; }
.lig-panel { display: flex; flex-direction: column; background: #f8fafc; border: 1px solid var(--p-border); border-radius: 16px; overflow: hidden; box-sizing: border-box; }
.lig-panel-title { font-size: 1.05rem; font-weight: 700; color: #334155; padding: 16px 20px; border-bottom: 1px solid var(--p-border); background: #ffffff; margin: 0; }
.lig-panel-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

/* 表单与控制 */
.lig-controls-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.lig-form-group { display: flex; flex-direction: column; min-width: 150px; }
.lig-label { font-size: 0.85rem; font-weight: 600; color: #64748b; margin-bottom: 8px; }

.lig-input, .lig-select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid #cbd5e1; background: #ffffff; color: var(--p-text); font-size: 0.95rem; outline: none; transition: 0.2s; box-sizing: border-box; }
.lig-input:focus, .lig-select:focus { border-color: var(--p-primary); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }

/* 复选框美化 */
.lig-checkbox-label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.lig-checkbox-label input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; border: 2px solid #cbd5e1; border-radius: 4px; outline: none; cursor: pointer; transition: 0.2s; position: relative; display: flex; align-items: center; justify-content: center; }
.lig-checkbox-label input[type="checkbox"]:checked { background-color: var(--p-primary); border-color: var(--p-primary); }
.lig-checkbox-label input[type="checkbox"]:checked::after { content: '✓'; color: white; font-size: 12px; font-weight: bold; position: absolute; }
.lig-checkbox-text { font-size: 0.95rem; font-weight: 600; color: #475569; }

/* 按钮 */
.lig-btn-wrap { display: flex; }
.lig-btn-primary { background: var(--p-primary); color: white; border: none; padding: 12px 24px; border-radius: 8px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3); }
.lig-btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* 动作按钮 */
.lig-actions { display: flex; gap: 12px; }
.lig-action-btn { padding: 6px 14px; font-size: 0.85rem; font-weight: 600; color: #475569; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 6px; }
.lig-action-btn:hover { background: #e2e8f0; color: #0f172a; }

/* 文本输出框 */
.lig-textarea { width: 100%; min-height: 350px; padding: 24px; font-size: 1.05rem; line-height: 1.6; color: var(--p-text); background: #ffffff; border: none; outline: none; resize: vertical; box-sizing: border-box; font-family: inherit; }
.lig-textarea:focus { box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.2); }

/* 状态栏 */
.lig-statusbar { display: flex; justify-content: flex-end; gap: 24px; padding: 12px 20px; background: #f1f5f9; border-top: 1px solid var(--p-border); font-size: 0.85rem; color: #64748b; font-weight: 600; }
.lig-stat-item span { color: var(--p-primary); font-family: monospace; font-size: 0.95rem; margin-left: 4px; }


/* 黑夜模式 */
[data-theme="dark"] .lig-tool-wrapper { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .lig-header-main, [data-theme="dark"] .lig-panel-title { color: #f8fafc; }
[data-theme="dark"] .lig-panel { background: #0f172a; border-color: #475569; }
[data-theme="dark"] .lig-panel-title { background: #1e293b; border-bottom-color: #475569; }
[data-theme="dark"] .lig-label, [data-theme="dark"] .lig-checkbox-text { color: #cbd5e1; }
[data-theme="dark"] .lig-input, [data-theme="dark"] .lig-select { background: #020617; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .lig-checkbox-label input[type="checkbox"] { border-color: #475569; background: #020617; }
[data-theme="dark"] .lig-checkbox-label input[type="checkbox"]:checked { background-color: var(--p-primary); border-color: var(--p-primary); }
[data-theme="dark"] .lig-textarea { background: #020617; color: #f8fafc; }
[data-theme="dark"] .lig-statusbar { background: #1e293b; border-top-color: #475569; color: #94a3b8; }
[data-theme="dark"] .lig-action-btn { background: #334155; border-color: #475569; color: #f8fafc; }
[data-theme="dark"] .lig-action-btn:hover { background: #475569; }