/* ==========================================
   Emoji转换器 - 专属样式
   主题色：橙黄渐变（emoji风格）
   ========================================== */

/* ========== 主容器 ========== */
.ec-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 580px;
    background: #fffdf7;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(255, 180, 0, 0.12);
    transition: all 0.3s ease;
    border: 1px solid #ffe8a0;
}

/* 全屏模式 */
.ec-container.fullscreen {
    position: fixed;
    top: 0; left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    border: none;
}

/* ========== 工具栏 ========== */
.ec-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #FFB347 0%, #FF6B35 50%, #FF4500 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 100, 30, 0.35);
}

.ec-toolbar .toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.ec-toolbar-logo {
    font-size: 14px;
    font-weight: 700;
    margin-right: 6px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.ec-btn {
    padding: 5px 11px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #d4380d;
    transition: all 0.2s;
    white-space: nowrap;
}

.ec-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.ec-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ec-btn-primary {
    background: #fff3e0;
    color: #e65100;
    font-weight: 700;
    border: 1px solid rgba(255,255,255,0.5);
}

.ec-btn-primary:hover:not(:disabled) {
    background: #fff8ee;
    box-shadow: 0 3px 12px rgba(230, 81, 0, 0.35);
    transform: translateY(-1px);
}

/* ========== 主内容区 ========== */
.ec-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #fffdf7;
}

/* ========== 左栏：历史记录 ========== */
.ec-history-panel {
    width: 210px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #ffe8a0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ec-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fffdf0, #fff8e1);
    border-bottom: 1px solid #ffe8a0;
    flex-shrink: 0;
}

.ec-history-header h3 {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
}

.ec-history-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    background: #ffedd5;
    color: #ea580c;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.ec-history-clear-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ec-history-clear-btn:hover {
    background: #fee2e2;
}

.ec-history-search {
    padding: 8px;
    border-bottom: 1px solid #ffe8a0;
    flex-shrink: 0;
}

.ec-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    background: #fffdf7;
    transition: border-color 0.2s;
}

.ec-history-search input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.ec-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.ec-history-list::-webkit-scrollbar { width: 4px; }
.ec-history-list::-webkit-scrollbar-thumb { background: #fcd34d; border-radius: 2px; }
.ec-history-list::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

.ec-history-empty {
    text-align: center;
    color: #d4a017;
    font-size: 12px;
    padding: 20px 10px;
    line-height: 1.8;
}

.ec-history-item {
    padding: 9px 10px;
    margin-bottom: 5px;
    background: #fffbf0;
    border: 1px solid #fde68a;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: fadeIn 0.2s ease;
}

.ec-history-item:hover {
    background: #fff3cd;
    border-color: #f59e0b;
    transform: translateX(2px);
}

.ec-history-item.active {
    background: #fef3c7;
    border-color: #f59e0b;
    border-left: 3px solid #f59e0b;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.25);
}

.ec-history-item-label {
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.ec-history-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3px;
}

.ec-history-item-mode {
    font-size: 10px;
    color: #b45309;
    background: #fef3c7;
    padding: 1px 5px;
    border-radius: 8px;
}

.ec-history-item-time {
    font-size: 10px;
    color: #d97706;
}

.ec-history-item-del {
    position: absolute;
    top: 4px; right: 4px;
    width: 16px; height: 16px;
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.ec-history-item:hover .ec-history-item-del {
    display: flex;
}

.ec-history-item-del:hover {
    background: #fca5a5;
}

/* ========== 中栏：输入配置 ========== */
.ec-input-panel {
    width: 320px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #ffe8a0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ec-panel-header {
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fffdf0, #fff8e1);
    border-bottom: 1px solid #ffe8a0;
    flex-shrink: 0;
}

.ec-panel-header h3 {
    margin: 0 0 2px 0;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
}

.ec-panel-tip {
    font-size: 11px;
    color: #b45309;
    opacity: 0.8;
}

.ec-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ec-input-body::-webkit-scrollbar { width: 4px; }
.ec-input-body::-webkit-scrollbar-thumb { background: #fcd34d; border-radius: 2px; }
.ec-input-body::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

/* 模式选择 */
.ec-mode-group {
    display: flex;
    gap: 8px;
}

.ec-mode-option {
    flex: 1;
    padding: 10px 8px;
    border: 2px solid #fde68a;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    background: #fffbf0;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.ec-mode-option:hover {
    border-color: #f59e0b;
    background: #fef3c7;
}

.ec-mode-selected {
    border-color: #f59e0b !important;
    background: #fef3c7 !important;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
    color: #78350f !important;
}

.ec-mode-icon {
    font-size: 18px;
    display: block;
}

/* 风格选择 */
.ec-style-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ec-style-label {
    font-size: 11px;
    font-weight: 700;
    color: #92400e;
}

.ec-style-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ec-style-item {
    padding: 5px 10px;
    border: 1px solid #fde68a;
    border-radius: 20px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: #b45309;
    background: #fffbf0;
    transition: all 0.2s;
    user-select: none;
}

.ec-style-item:hover {
    border-color: #f59e0b;
    background: #fef3c7;
}

.ec-style-selected {
    border-color: #f59e0b !important;
    background: #fef3c7 !important;
    color: #78350f !important;
}

/* 输入框 */
.ec-textarea-wrap {
    position: relative;
}

.ec-textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    padding: 10px 12px;
    border: 1.5px solid #fde68a;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.7;
    outline: none;
    font-family: inherit;
    background: #fffdf7;
    color: #44200a;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ec-textarea:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.ec-textarea::placeholder {
    color: #d4a017;
    font-size: 12px;
    line-height: 1.8;
}

.ec-char-counter {
    text-align: right;
    font-size: 11px;
    color: #b45309;
    margin-top: 3px;
}

.ec-char-counter.warning { color: #ef4444; font-weight: 700; }

/* 快速示例标签 */
.ec-quick-area {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ec-quick-label {
    font-size: 11px;
    font-weight: 700;
    color: #92400e;
}

.ec-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ec-quick-tag {
    padding: 4px 10px;
    background: #fff3e0;
    border: 1px solid #fcd34d;
    border-radius: 12px;
    font-size: 11px;
    color: #c2410c;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.ec-quick-tag:hover {
    background: #fde68a;
    border-color: #f59e0b;
    transform: scale(1.03);
}

/* 提示说明 */
.ec-tips {
    background: #fff8e1;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 13px;
    font-size: 12px;
    color: #92400e;
}

.ec-tips p {
    margin: 0 0 5px 0;
    font-weight: 700;
    color: #b45309;
}

.ec-tips ul {
    margin: 0;
    padding-left: 16px;
}

.ec-tips ul li::marker {
    color: #ff9800;
}

.ec-tips li {
    margin-bottom: 3px;
    line-height: 1.6;
}

/* ========== 右栏：转换结果 ========== */
.ec-result-panel {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.ec-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: linear-gradient(to bottom, #fffdf0, #fff8e1);
    border-bottom: 1px solid #ffe8a0;
    flex-shrink: 0;
}

.ec-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
}

.ec-result-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 头部「换一批」按鈕 */
.ec-rebuild-btn {
    padding: 4px 11px;
    border: 1.5px solid #fcd34d;
    border-radius: 5px;
    background: #fff3e0;
    color: #b45309;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ec-rebuild-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

.ec-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ec-mode-badge {
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.ec-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.ec-result-body::-webkit-scrollbar { width: 4px; }
.ec-result-body::-webkit-scrollbar-thumb { background: #fcd34d; border-radius: 2px; }
.ec-result-body::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

/* 占位符 */
.ec-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 10px;
    color: #d4a017;
    text-align: center;
}

.ec-placeholder-emoji {
    font-size: 56px;
    line-height: 1;
    animation: floatEmoji 3s ease-in-out infinite;
}

@keyframes floatEmoji {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    33%  { transform: translateY(-12px) rotate(4deg) scale(1.05); }
    66%  { transform: translateY(-6px) rotate(-2deg) scale(1.02); }
}

.ec-placeholder-title {
    font-size: 16px;
    font-weight: 700;
    color: #b45309;
    margin: 0;
}

.ec-placeholder-desc {
    font-size: 13px;
    color: #d4a017;
    margin: 0;
}

/* 加载动画 */
.ec-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 16px;
}

.ec-loading-emojis {
    display: flex;
    gap: 8px;
}

.ec-loading-emojis span {
    font-size: 28px;
    animation: emojiPulse 1.5s ease-in-out infinite;
}

.ec-loading-emojis span:nth-child(1) { animation-delay: 0s; }
.ec-loading-emojis span:nth-child(2) { animation-delay: 0.2s; }
.ec-loading-emojis span:nth-child(3) { animation-delay: 0.4s; }
.ec-loading-emojis span:nth-child(4) { animation-delay: 0.6s; }
.ec-loading-emojis span:nth-child(5) { animation-delay: 0.8s; }

@keyframes emojiPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.4) rotate(10deg); opacity: 1; }
}

.ec-loading-text {
    font-size: 13px;
    color: #b45309;
    font-weight: 500;
    margin: 0;
}

/* 结果入场动画 */
@keyframes resultSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 结果内容 */
.ec-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: resultSlideIn 0.3s ease;
}

.ec-result-text {
    flex: 1;
    font-size: 28px;
    line-height: 1.8;
    word-break: break-word;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fffdf7 0%, #fff8e1 100%);
    border: 1.5px solid #fde68a;
    border-radius: 12px;
    min-height: 100px;
    color: #44200a;
    letter-spacing: 3px;
    text-align: center;
    white-space: pre-wrap;
    text-shadow: 0 1px 3px rgba(255, 180, 0, 0.15);
}

.ec-result-text.text-mode {
    font-size: 14px;
    line-height: 1.9;
    letter-spacing: 0;
    text-align: left;
    color: #374151;
}

.ec-result-actions {
    display: flex;
    gap: 10px;
}

.ec-action-btn {
    padding: 7px 16px;
    border: 1.5px solid #fcd34d;
    border-radius: 6px;
    background: #fffbf0;
    color: #b45309;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.ec-action-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}

/* 错误 */
.ec-error {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 200px;
}

.ec-error-card {
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 14px;
    padding: 24px 28px;
    color: #b91c1c;
    font-size: 13px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    width: 100%;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.1);
}

.ec-error-icon {
    font-size: 38px;
    line-height: 1;
}

.ec-error-msg {
    line-height: 1.7;
    font-weight: 500;
}

/* ========== 模态框 ========== */
.ec-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.ec-modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: #fff;
    border-radius: 12px;
    width: 560px;
    max-width: 95vw;
    max-height: 80vh;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(255, 100, 30, 0.25);
    border: 1px solid #fde68a;
    overflow: hidden;
}

.ec-modal.open {
    display: flex;
}

.ec-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #FFB347 0%, #FF6B35 100%);
    color: white;
    flex-shrink: 0;
}

.ec-modal-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.ec-modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 24px; height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ec-modal-close:hover { background: rgba(255,255,255,0.35); }

.ec-modal-body {
    overflow-y: auto;
    padding: 16px;
}

.ec-modal-body::-webkit-scrollbar { width: 4px; }
.ec-modal-body::-webkit-scrollbar-thumb { background: #fcd34d; border-radius: 2px; }

.ec-example-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.ec-example-card {
    padding: 12px 14px;
    border: 1.5px solid #fde68a;
    border-radius: 8px;
    cursor: pointer;
    background: #fffbf0;
    transition: all 0.2s;
}

.ec-example-card:hover {
    border-color: #f59e0b;
    background: #fef3c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.ec-example-card-label {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 5px;
}

.ec-example-card-text {
    font-size: 12px;
    color: #b45309;
    word-break: break-word;
    line-height: 1.6;
}

.ec-example-card-meta {
    margin-top: 6px;
    display: flex;
    gap: 5px;
}

.ec-example-tag {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #fff3e0;
    color: #ea580c;
    border: 1px solid #fcd34d;
    font-weight: 600;
}

/* ========== Toast 通知 ========== */
.ec-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 10px 18px;
    background: #78350f;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 4px 15px rgba(120, 53, 15, 0.3);
}

.ec-toast.show { opacity: 1; }

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========== 打印适配 ========== */
@media print {
    .ec-toolbar, .ec-history-panel, .ec-input-panel { display: none !important; }
    .ec-result-panel { width: 100% !important; }
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .ec-input-panel { width: 280px; }
    .ec-history-panel { width: 180px; }
}

@media (max-width: 768px) {
    .ec-main-content { flex-direction: column; }
    .ec-history-panel { width: 100%; height: 140px; border-right: none; border-bottom: 1px solid #ffe8a0; }
    .ec-input-panel { width: 100%; border-right: none; border-bottom: 1px solid #ffe8a0; flex-shrink: 0; }
    .ec-result-panel { min-height: 250px; }
    .ec-example-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   暗黑模式（body.dark 前缀）
   ========================================== */
body.dark .ec-container {
    background: #1a1208;
    border-color: #5a3d00;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

body.dark .ec-toolbar {
    background: linear-gradient(135deg, #92400e 0%, #7c2d12 50%, #5a1a00 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

body.dark .ec-btn {
    background: rgba(30,15,0,0.7);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.2);
}

body.dark .ec-btn:hover:not(:disabled) {
    background: rgba(50,25,0,0.85);
}

body.dark .ec-btn-primary {
    background: rgba(120,53,15,0.6);
    color: #fde68a;
}

body.dark .ec-main-content {
    background: #1a1208;
}

body.dark .ec-history-panel {
    background: #1c1305;
    border-right-color: #5a3d00;
}

body.dark .ec-history-header {
    background: linear-gradient(to bottom, #231a08, #1c1305);
    border-bottom-color: #5a3d00;
}

body.dark .ec-history-header h3 {
    color: #fbbf24;
}

body.dark .ec-history-count {
    background: #451a03;
    color: #fbbf24;
}

body.dark .ec-history-clear-btn { color: #f87171; }
body.dark .ec-history-clear-btn:hover { background: #450a0a; }

body.dark .ec-history-search input {
    background: #231a08;
    border-color: #78350f;
    color: #fde68a;
}

body.dark .ec-history-search input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}

body.dark .ec-history-empty { color: #92400e; }

body.dark .ec-history-item {
    background: #231a08;
    border-color: #78350f;
}

body.dark .ec-history-item:hover {
    background: #2d1f0a;
    border-color: #f59e0b;
}

body.dark .ec-history-item.active {
    background: #3b2007;
    border-color: #f59e0b;
    border-left: 3px solid #f59e0b;
}

body.dark .ec-history-item-label { color: #fde68a; }
body.dark .ec-history-item-mode { background: #451a03; color: #fbbf24; }
body.dark .ec-history-item-time { color: #d97706; }

body.dark .ec-input-panel {
    background: #1c1305;
    border-right-color: #5a3d00;
}

body.dark .ec-panel-header {
    background: linear-gradient(to bottom, #231a08, #1c1305);
    border-bottom-color: #5a3d00;
}

body.dark .ec-panel-header h3 { color: #fbbf24; }
body.dark .ec-panel-tip { color: #d97706; }

body.dark .ec-mode-option {
    border-color: #78350f;
    background: #231a08;
    color: #fde68a;
}

body.dark .ec-mode-option:hover {
    border-color: #f59e0b;
    background: #3b2007;
}

body.dark .ec-mode-selected {
    border-color: #f59e0b !important;
    background: #3b2007 !important;
    color: #fef3c7 !important;
}

body.dark .ec-style-label { color: #fbbf24; }

body.dark .ec-style-item {
    background: #231a08;
    border-color: #78350f;
    color: #fde68a;
}

body.dark .ec-style-item:hover {
    border-color: #f59e0b;
    background: #3b2007;
}

body.dark .ec-style-selected {
    border-color: #f59e0b !important;
    background: #3b2007 !important;
    color: #fef3c7 !important;
}

body.dark .ec-textarea {
    background: #231a08;
    border-color: #78350f;
    color: #fde68a;
}

body.dark .ec-textarea:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.1);
}

body.dark .ec-textarea::placeholder { color: #92400e; }

body.dark .ec-char-counter { color: #d97706; }
body.dark .ec-char-counter.warning { color: #ef4444; font-weight: 700; }

body.dark .ec-quick-label { color: #fbbf24; }

body.dark .ec-quick-tag {
    background: #3b2007;
    border-color: #78350f;
    color: #fde68a;
}

body.dark .ec-quick-tag:hover {
    background: #451a03;
    border-color: #f59e0b;
}

body.dark .ec-tips {
    background: #231a08;
    border-color: #78350f;
    color: #fde68a;
}

body.dark .ec-tips p { color: #fbbf24; }

body.dark .ec-result-panel { background: #1c1305; }

body.dark .ec-result-header {
    background: linear-gradient(to bottom, #231a08, #1c1305);
    border-bottom-color: #5a3d00;
}

body.dark .ec-result-header h3 { color: #fbbf24; }

body.dark .ec-mode-badge {
    background: #451a03;
    color: #fbbf24;
    border-color: #78350f;
}

body.dark .ec-placeholder { color: #92400e; }
body.dark .ec-placeholder-title { color: #d97706; }
body.dark .ec-placeholder-desc { color: #92400e; }

body.dark .ec-loading-text { color: #d97706; }

body.dark .ec-result-text {
    background: linear-gradient(135deg, #1c1305 0%, #231a08 100%);
    border-color: #78350f;
    color: #fde68a;
}

body.dark .ec-result-text.text-mode { color: #e5e7eb; }

body.dark .ec-action-btn {
    background: #231a08;
    border-color: #78350f;
    color: #fbbf24;
}

body.dark .ec-action-btn:hover {
    background: #3b2007;
    border-color: #f59e0b;
}

/* 错误区套卡片暗黑模式在下方 ec-error-card 展开 */

body.dark .ec-modal {
    background: #1c1305;
    border-color: #78350f;
}

body.dark .ec-modal-body::-webkit-scrollbar-thumb { background: #78350f; }
body.dark .ec-modal-body::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

body.dark .ec-example-card {
    background: #231a08;
    border-color: #78350f;
}

body.dark .ec-example-card:hover {
    background: #3b2007;
    border-color: #f59e0b;
}

body.dark .ec-example-card-label { color: #fbbf24; }
body.dark .ec-example-card-text { color: #d97706; }

body.dark .ec-example-tag {
    background: #451a03;
    color: #fbbf24;
    border-color: #78350f;
}

body.dark .ec-error-card {
    background: #2d0a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

body.dark .ec-error-card .ec-action-btn {
    background: #3b1010;
    border-color: #7f1d1d;
    color: #fca5a5;
}

body.dark .ec-error-card .ec-action-btn:hover {
    background: #4d1515;
    border-color: #ef4444;
}

body.dark .ec-rebuild-btn {
    background: #3b2007;
    border-color: #78350f;
    color: #fbbf24;
}

body.dark .ec-rebuild-btn:hover {
    background: #451a03;
    border-color: #f59e0b;
}

body.dark .ec-result-header-right .ec-mode-badge {
    background: #451a03;
    color: #fbbf24;
    border-color: #78350f;
}

body.dark .ec-history-search input::placeholder { color: #92400e; }

body.dark .ec-result-body::-webkit-scrollbar-thumb { background: #78350f; }
body.dark .ec-result-body::-webkit-scrollbar-thumb:hover { background: #f59e0b; }
body.dark .ec-history-list::-webkit-scrollbar-thumb:hover { background: #f59e0b; }
body.dark .ec-input-body::-webkit-scrollbar-thumb { background: #78350f; }
body.dark .ec-input-body::-webkit-scrollbar-thumb:hover { background: #f59e0b; }

body.dark .ec-toast { background: #fbbf24; color: #1a1208; }
