/* ======================== 培训心得工具 - 主题色：知识蓝 + 成长橙 ======================== */
:root {
    --te-primary: #4a90b8;
    --te-primary-light: #6eb4d8;
    --te-primary-dark: #2d6e94;
    --te-accent: #e8964d;
    --te-accent-light: #f0b87a;
    --te-warm: #5cad6f;
    --te-bg: #f4f6f9;
    --te-card-bg: #ffffff;
    --te-text: #2c3e50;
    --te-text-secondary: #7a8a9a;
    --te-border: #dfe6ed;
    --te-hover: #eaf0f6;
    --te-shadow: rgba(74, 144, 184, 0.08);
    --te-radius: 12px;
    --te-radius-sm: 8px;
}

/* ======================== 暗黑模式 ======================== */
body.dark {
    --te-primary: #6eb4d8;
    --te-primary-light: #4a90b8;
    --te-primary-dark: #8ed0f0;
    --te-accent: #f0b87a;
    --te-accent-light: #e8964d;
    --te-warm: #6fca82;
    --te-bg: #1a1d23;
    --te-card-bg: #22262e;
    --te-text: #dce4ec;
    --te-text-secondary: #8a96a4;
    --te-border: #333a44;
    --te-hover: #2a2f38;
    --te-shadow: rgba(0, 0, 0, 0.3);
}

/* ======================== 主容器 ======================== */
.te-container {
    background: var(--te-bg);
    border-radius: var(--te-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px var(--te-shadow);
}

.te-container.fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
}

/* ======================== 工具栏 ======================== */
.te-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--te-primary) 0%, var(--te-accent) 100%);
    border-bottom: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(74, 144, 184, 0.25);
}

.te-toolbar .toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.te-toolbar .toolbar-title {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    margin-right: 8px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.te-toolbar .toolbar-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: rgba(255,255,255,0.9);
    color: var(--te-primary-dark);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.te-toolbar .toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.te-toolbar .toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.te-toolbar .toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.te-toolbar .toolbar-btn-primary {
    background: #fff;
    color: var(--te-primary-dark);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.te-toolbar .toolbar-btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.te-toolbar .toolbar-btn-active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.4);
}

.te-toolbar .toolbar-btn-active:hover {
    background: rgba(255,255,255,0.35);
    color: #fff;
    transform: translateY(-1px);
}

/* 取消按钮红色醒目 */
#teCancelBtn {
    background: #ef4444 !important;
    color: #fff !important;
    font-weight: 600;
}

#teCancelBtn:hover {
    background: #dc2626 !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
}

/* 全屏右下角退出按钮 */
.te-exit-fs-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10002;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
    opacity: 0.6;
}

.te-exit-fs-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* ======================== 三栏布局 ======================== */
.te-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* 左栏 - 历史记录 */
.te-history-panel {
    width: 220px;
    min-width: 220px;
    background: var(--te-card-bg);
    border-right: 1px solid var(--te-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.te-history-panel .history-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--te-border);
    background: linear-gradient(to bottom, var(--te-card-bg), var(--te-bg));
}

.te-history-panel .history-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--te-text);
}

.te-history-panel .history-count {
    font-size: 11px;
    color: var(--te-text-secondary);
    margin-left: 4px;
}

.te-history-panel .history-clear-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.te-history-panel .history-clear-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

.te-history-panel .history-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--te-border);
}

.te-history-panel .history-search input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--te-border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--te-bg);
    color: var(--te-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.te-history-panel .history-search input:focus {
    border-color: var(--te-primary);
}

.te-history-panel .history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.history-empty {
    text-align: center;
    color: var(--te-text-secondary);
    font-size: 12px;
    padding: 30px 10px;
    line-height: 1.8;
}

.history-item {
    padding: 10px 12px;
    border-radius: var(--te-radius-sm);
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.history-item:hover {
    background: var(--te-hover);
    border-color: var(--te-border);
}

.history-item.active {
    background: rgba(74, 144, 184, 0.1);
    border-color: var(--te-primary);
    border-left: 3px solid var(--te-primary);
}

.history-item.active .history-item-title {
    color: var(--te-primary);
    font-weight: 600;
}

.history-item-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--te-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.history-item-meta {
    font-size: 10px;
    color: var(--te-text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item-type {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--te-primary);
    color: #fff;
    opacity: 0.8;
}

.history-item-delete {
    display: none;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 12px;
    cursor: pointer;
    padding: 0 4px;
}

.history-item:hover .history-item-delete {
    display: inline-block;
}

/* 中栏 - 输入面板 */
.te-input-panel {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--te-border);
}

.te-input-panel .panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--te-border);
    background: linear-gradient(to bottom, var(--te-card-bg), var(--te-bg));
}

.te-input-panel .panel-header h3 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--te-text);
}

.te-input-panel .panel-tip {
    font-size: 11px;
    color: var(--te-accent);
    font-style: italic;
}

.te-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--te-bg);
}

/* 培训类型选择 */
.te-type-group {
    margin-bottom: 16px;
}

.te-type-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--te-text-secondary);
    display: block;
    margin-bottom: 8px;
}

.te-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.te-type-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--te-border);
    background: var(--te-card-bg);
    color: var(--te-text);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.te-type-option:hover {
    border-color: var(--te-primary);
    background: rgba(74, 144, 184, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 144, 184, 0.12);
}

.te-type-option.selected {
    background: var(--te-primary);
    color: #fff;
    border-color: var(--te-primary);
}

/* ✓勾选标记 */
.te-check {
    font-size: 11px;
    font-weight: 700;
    margin-left: 2px;
    opacity: 0.9;
}

.te-type-icon {
    font-size: 14px;
}

/* 输入字段 */
.te-field-group {
    margin-bottom: 14px;
}

.te-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--te-text);
    display: block;
    margin-bottom: 6px;
}

.te-field-label .required {
    color: #ef4444;
    font-size: 14px;
}

/* 表单焦点引导：focus-within时label变色 */
.te-field-group:focus-within .te-field-label {
    color: var(--te-primary);
    transition: color 0.2s;
}

.te-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--te-border);
    border-radius: var(--te-radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--te-card-bg);
    color: var(--te-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.te-input:focus {
    border-color: var(--te-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 184, 0.15);
}

.te-input::placeholder {
    color: var(--te-text-secondary);
    opacity: 0.7;
}

.te-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--te-border);
    border-radius: var(--te-radius-sm);
    font-size: 13px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    background: var(--te-card-bg);
    color: var(--te-text);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
    min-height: 60px;
}

.te-textarea:focus {
    border-color: var(--te-primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 184, 0.15);
}

.te-textarea::placeholder {
    color: var(--te-text-secondary);
    opacity: 0.7;
}

.te-char-counter {
    text-align: right;
    font-size: 11px;
    color: var(--te-text-secondary);
    margin-top: 2px;
}

/* 输出风格 */
.te-style-group {
    margin-bottom: 12px;
}

.te-style-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--te-text-secondary);
    display: block;
    margin-bottom: 8px;
}

.te-style-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.te-style-option {
    flex: 1;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: var(--te-radius-sm);
    border: 2px solid var(--te-border);
    background: var(--te-card-bg);
    color: var(--te-text);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.te-style-option:hover {
    border-color: var(--te-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(232, 150, 77, 0.12);
}

.te-style-option.selected {
    border-color: var(--te-primary);
    background: linear-gradient(135deg, rgba(74,144,184,0.08), rgba(232,150,77,0.06));
    color: var(--te-primary);
    box-shadow: 0 2px 8px rgba(74, 144, 184, 0.12);
}

.te-style-option .te-check {
    color: var(--te-primary);
}

.te-style-icon {
    font-size: 14px;
}

/* 使用提示 */
.te-tips-box {
    background: var(--te-card-bg);
    border: 1px solid var(--te-border);
    border-radius: var(--te-radius-sm);
    padding: 12px 14px;
    margin-top: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.te-tips-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--te-shadow);
}

.te-tips-box p {
    margin: 0 0 6px 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--te-accent);
}

.te-tips-box ul {
    margin: 0;
    padding-left: 18px;
}

.te-tips-box li {
    font-size: 11px;
    color: var(--te-text-secondary);
    line-height: 1.7;
}

/* 右栏 - 结果面板 */
.te-result-panel {
    flex: 1.2;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--te-card-bg);
}

.te-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--te-border);
    background: linear-gradient(to bottom, var(--te-card-bg), var(--te-bg));
}

.te-result-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--te-text);
}

.result-style-badge {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
    background: var(--te-primary);
    color: #fff;
}

.te-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--te-bg);
}

/* 占位提示 */
.result-placeholder {
    text-align: center;
    padding: 60px 20px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.placeholder-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--te-primary);
    margin: 0 0 12px 0;
}

.placeholder-desc {
    font-size: 12px;
    color: var(--te-text-secondary);
    margin: 4px 0;
    line-height: 1.6;
}

/* 加载动画 */
.result-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-breath {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.breath-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--te-primary-light), var(--te-primary));
    animation: breathe 4s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.9; }
}

.loading-text {
    font-size: 14px;
    color: var(--te-primary);
    margin: 0 0 6px 0;
    font-weight: 500;
}

.loading-sub {
    font-size: 12px;
    color: var(--te-text-secondary);
    margin: 0;
}

/* 结果内容样式 */
.result-content {
    line-height: 1.7;
    color: var(--te-text);
    font-size: 14px;
}

.result-content ::selection {
    background: rgba(74, 144, 184, 0.25);
    color: var(--te-text);
}

.result-content .te-result {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-content .te-section {
    margin-bottom: 16px;
    padding: 16px 18px;
    background: var(--te-card-bg);
    border-radius: var(--te-radius);
    border-left: 4px solid var(--te-primary);
    box-shadow: 0 1px 4px var(--te-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-content .te-section:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px var(--te-shadow);
}

.result-content .te-section h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: var(--te-primary);
}

.result-content .te-section h5 {
    margin: 10px 0 6px 0;
    font-size: 13px;
    color: var(--te-accent);
}

.result-content .te-section p {
    margin: 6px 0;
    line-height: 1.8;
}

.result-content .te-section ul {
    padding-left: 20px;
    margin: 6px 0;
}

.result-content .te-section li {
    margin-bottom: 6px;
    line-height: 1.7;
}

.result-content .te-section strong {
    color: var(--te-primary);
    font-weight: 600;
}

.result-content .action-group {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(92, 173, 111, 0.04);
    border-radius: var(--te-radius-sm);
    border: 1px dashed rgba(92, 173, 111, 0.2);
}

.result-content .overview-section {
    border-left-color: var(--te-primary);
}

.result-content .harvest-section {
    border-left-color: var(--te-accent);
}

.result-content .thinking-section {
    border-left-color: #9b7ec8;
}

.result-content .action-section {
    border-left-color: var(--te-warm);
}

.result-content .quote-section {
    border-left-color: #d4956b;
}

.result-content .quote-section blockquote {
    margin: 8px 0;
    padding: 12px 16px;
    background: rgba(74, 144, 184, 0.05);
    border-radius: 6px;
    font-style: italic;
    color: var(--te-primary);
    font-size: 15px;
    line-height: 1.8;
}

.result-content .closing-section {
    border-left-color: var(--te-primary);
    background: linear-gradient(135deg, rgba(74, 144, 184, 0.05), rgba(232, 150, 77, 0.03));
}

.result-content .te-closing {
    font-style: italic;
    color: var(--te-primary);
    font-weight: 500;
}

/* 错误提示 */
#teResultError {
    text-align: center;
    padding: 20px;
    color: #ef4444;
    font-size: 13px;
}

.te-error-card {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 32px;
    background: var(--te-card-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--te-radius);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}

.te-error-card .error-icon {
    font-size: 28px;
}

.te-error-card .error-msg {
    font-size: 13px;
    color: #ef4444;
    font-weight: 500;
}

.te-error-card .error-hint {
    font-size: 11px;
    color: var(--te-text-secondary);
}

/* Toast 通知 */
.te-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

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

.te-toast.success { background: var(--te-primary); color: #fff; }
.te-toast.error { background: #ef4444; color: #fff; }
.te-toast.info { background: var(--te-accent); color: #fff; }

/* ======================== 模态框 ======================== */
.te-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
}

.te-modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--te-card-bg);
    border-radius: var(--te-radius);
    box-shadow: 0 20px 60px var(--te-shadow);
    z-index: 10001;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    flex-direction: column;
}

.te-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--te-border);
}

.te-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--te-text);
}

.te-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--te-text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.te-modal-close:hover {
    background: var(--te-hover);
    color: var(--te-text);
}

.te-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    counter-reset: example-counter;
}

.example-card {
    padding: 14px;
    border: 1px solid var(--te-border);
    border-radius: var(--te-radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--te-bg);
    position: relative;
    counter-increment: example-counter;
}

.example-card::after {
    content: counter(example-counter);
    position: absolute;
    top: 8px;
    right: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--te-border);
    color: var(--te-text-secondary);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.example-card:hover::after {
    background: var(--te-primary);
    color: #fff;
}

.example-card:hover {
    border-color: var(--te-primary);
    box-shadow: 0 4px 16px var(--te-shadow);
    transform: translateY(-2px);
    background: var(--te-card-bg);
}

.example-card-type {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--te-primary);
    color: #fff;
    margin-bottom: 6px;
}

.example-card-topic {
    font-size: 13px;
    font-weight: 600;
    color: var(--te-text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.example-card-desc {
    font-size: 11px;
    color: var(--te-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ======================== 暗黑模式额外样式 ======================== */
body.dark .te-toolbar {
    background: linear-gradient(135deg, #2d5a72 0%, #8a6430 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

body.dark .te-container.fullscreen {
    background: var(--te-bg);
}

body.dark .te-toolbar .toolbar-btn {
    background: rgba(255,255,255,0.12);
    color: #dce4ec;
}

body.dark .te-toolbar .toolbar-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
}

body.dark .te-toolbar .toolbar-btn-primary {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

body.dark .te-toolbar .toolbar-title {
    color: #fff;
}

body.dark .history-item.active {
    background: rgba(110, 180, 216, 0.12);
    border-color: var(--te-primary);
}

body.dark .te-error-card {
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark .te-type-option:hover {
    background: rgba(110, 180, 216, 0.1);
}

body.dark .te-toolbar .toolbar-btn-active {
    background: rgba(255,255,255,0.2);
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.3);
}

body.dark .result-content .quote-section blockquote {
    background: rgba(110, 180, 216, 0.08);
}

body.dark .te-field-label .required {
    color: #f87171;
}

body.dark .history-item-meta {
    color: #7a8a9a;
}

body.dark .te-history-panel .history-count {
    color: #7a8a9a;
}

body.dark .result-placeholder .placeholder-desc {
    color: #7a8a9a;
}

body.dark .te-modal {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark .result-content ::selection {
    background: rgba(110, 180, 216, 0.3);
}

body.dark .te-style-option.selected {
    background: linear-gradient(135deg, rgba(110,180,216,0.12), rgba(240,184,122,0.08));
}

body.dark .te-input-panel .panel-tip {
    color: var(--te-accent);
}

body.dark .result-content .te-section strong {
    color: var(--te-primary);
}

body.dark .result-content .action-group {
    background: rgba(111, 202, 130, 0.06);
    border-color: rgba(111, 202, 130, 0.15);
}

body.dark .result-content .closing-section {
    background: linear-gradient(135deg, rgba(110, 180, 216, 0.08), rgba(240, 184, 122, 0.04));
}

body.dark .te-exit-fs-btn {
    background: rgba(255, 255, 255, 0.12);
}

body.dark .te-exit-fs-btn:hover {
    background: rgba(239, 68, 68, 0.7);
}

body.dark .te-type-option.selected {
    background: var(--te-primary);
    color: #fff;
}

body.dark .example-card {
    background: var(--te-bg);
    border-color: var(--te-border);
}

body.dark .example-card:hover {
    background: var(--te-card-bg);
    border-color: var(--te-primary);
}

body.dark .example-card::after {
    background: var(--te-border);
    color: var(--te-text-secondary);
}

body.dark .te-tips-box {
    background: var(--te-card-bg);
    border-color: var(--te-border);
}

body.dark .history-empty {
    color: #6a7a8a;
}

/* 暗黑模式平滑过渡 */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ======================== 响应式设计 ======================== */
@media (max-width: 1024px) {
    .te-history-panel {
        width: 180px;
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .te-main-content {
        flex-direction: column;
    }
    .te-history-panel {
        width: 100%;
        min-width: 100%;
        max-height: 150px;
        border-right: none;
        border-bottom: 1px solid var(--te-border);
    }
    .te-input-panel {
        border-right: none;
        border-bottom: 1px solid var(--te-border);
        min-width: auto;
    }
    .te-result-panel {
        min-width: auto;
    }
    .te-toolbar .toolbar-group {
        flex-wrap: wrap;
    }
    .example-grid {
        grid-template-columns: 1fr;
        counter-reset: example-counter;
    }
    .te-style-options {
        flex-wrap: wrap;
    }
    .te-style-option {
        min-width: calc(50% - 4px);
    }
}

@media (max-width: 480px) {
    .te-toolbar {
        padding: 8px 10px;
    }
    .te-toolbar .toolbar-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
    .te-type-options {
        gap: 4px;
    }
    .te-type-option {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ======================== 滚动条美化 ======================== */
.te-history-panel ::-webkit-scrollbar,
.te-input-body::-webkit-scrollbar,
.te-result-body::-webkit-scrollbar {
    width: 5px;
}

.te-history-panel ::-webkit-scrollbar-track,
.te-input-body::-webkit-scrollbar-track,
.te-result-body::-webkit-scrollbar-track {
    background: transparent;
}

.te-history-panel ::-webkit-scrollbar-thumb,
.te-input-body::-webkit-scrollbar-thumb,
.te-result-body::-webkit-scrollbar-thumb {
    background: var(--te-border);
    border-radius: 3px;
}

.te-history-panel ::-webkit-scrollbar-thumb:hover,
.te-input-body::-webkit-scrollbar-thumb:hover,
.te-result-body::-webkit-scrollbar-thumb:hover {
    background: var(--te-text-secondary);
}
