/* ========== Emoji翻译器容器 ========== */
.et-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 600px;
    background: #fdf6ff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(147, 51, 234, 0.1);
    transition: box-shadow 0.3s ease;
}

.et-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.et-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 14px;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.35);
    flex-shrink: 0;
    min-height: 36px;
}

.et-toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.et-toolbar-title-group {
    flex: 1;
    justify-content: center;
}

.et-toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.5px;
}

.et-toolbar-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #7c3aed;
    transition: all 0.2s;
    white-space: nowrap;
}

.et-toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.et-toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 主内容区 ========== */
.et-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========== 左侧历史面板 ========== */
.et-history-panel {
    width: 200px;
    background: white;
    border-right: 1px solid #e9d5ff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.et-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fdf6ff, #f5eeff);
    border-bottom: 1px solid #e9d5ff;
    flex-shrink: 0;
}

.et-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b21a8;
}

.et-history-clear-btn {
    background: #f3e8ff;
    border: none;
    color: #9333ea;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.et-history-clear-btn:hover {
    background: #e9d5ff;
    color: #7c3aed;
}

/* 历史搜索框 */
.et-history-search {
    padding: 6px 8px 8px;
    background: linear-gradient(to bottom, #f5eeff, #ede9fe);
    border-radius: 12px;
    margin: 6px 6px 4px;
}

.et-history-search input {
    width: 100%;
    padding: 5px 10px 5px 28px;
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    background: #fdf6ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8' stroke='%239333ea' stroke-width='2' fill='none'/%3E%3Cpath d='M21 21l-4.35-4.35' stroke='%239333ea' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat 8px center;
    font-size: 12px;
    outline: none;
    box-sizing: border-box;
    transition: all 0.2s;
    color: #4c1d95;
}

.et-history-search input:focus {
    background-color: white;
    border-color: #9333ea;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.15);
}

.et-history-search input::placeholder {
    color: #c4b5fd;
}

.et-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.et-history-list:hover {
    scrollbar-color: #f97316 transparent;
}

.et-history-list::-webkit-scrollbar {
    width: 4px;
}

.et-history-list::-webkit-scrollbar-track {
    background: transparent;
}

.et-history-list::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 2px;
}

.et-history-list:hover::-webkit-scrollbar-thumb {
    background: #f97316;
}

.et-history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    color: #c4b5fd;
    font-size: 12px;
    gap: 4px;
    text-align: center;
}

.et-history-empty small {
    color: #ddd6fe;
    font-size: 11px;
}

.et-history-item {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    margin: 3px 0;
    background: #fdf6ff;
    border: 1px solid #ede9fe;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.et-history-item:hover {
    background: #f5eeff;
    border-color: #ddd6fe;
    transform: translateX(2px);
}

.et-history-item.active {
    background: #f3e8ff;
    border-color: #9333ea;
    box-shadow: inset 3px 0 0 #9333ea, 0 1px 4px rgba(147, 51, 234, 0.2);
}

.et-history-item-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: #f3e8ff;
    color: #9333ea;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all 0.15s;
    border: none;
    cursor: pointer;
}

.et-history-item:hover .et-history-item-del {
    opacity: 1;
}

@media (hover: none) {
    .et-history-item-del { opacity: 0.7; }
}

.et-history-item-del:hover {
    background: #9333ea;
    color: white;
}

.et-history-item-preview {
    font-size: 12px;
    color: #4c1d95;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 22px);
    font-weight: 500;
}

.et-history-item-meta {
    font-size: 10px;
    color: #a78bfa;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.et-history-item-time {
    font-size: 10px;
    color: #c4b5fd;
    margin-top: 2px;
}

.et-history-footer {
    padding: 8px 12px;
    border-top: 1px solid #e9d5ff;
    background: #fdf6ff;
}

.et-history-count {
    font-size: 11px;
    color: #c4b5fd;
}

/* ========== 中间输入面板 ========== */
.et-input-panel {
    width: 340px;
    min-width: 280px;
    max-width: 400px;
    background: white;
    border-right: 1px solid #e9d5ff;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.et-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fdf6ff, #f5eeff);
    border-bottom: 1px solid #e9d5ff;
    flex-shrink: 0;
}

.et-panel-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b21a8;
}

.et-input-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.et-input-scroll:hover {
    scrollbar-color: #f97316 transparent;
}

.et-input-scroll::-webkit-scrollbar { width: 4px; }
.et-input-scroll::-webkit-scrollbar-track { background: transparent; }
.et-input-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 2px; }
.et-input-scroll:hover::-webkit-scrollbar-thumb { background: #f97316; }

.et-section-divider {
    font-size: 11px;
    font-weight: 600;
    color: #7c3aed;
    background: linear-gradient(to right, #f3e8ff, transparent);
    padding: 4px 8px;
    margin: 6px 0 8px;
    border-left: 3px solid #9333ea;
    border-radius: 0 4px 4px 0;
}

/* 翻译方向选择 */
.et-direction-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

.et-direction-option {
    cursor: pointer;
}

.et-direction-option input[type="radio"] {
    display: none;
}

.et-direction-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 4px;
    border: 1.5px solid #e9d5ff;
    border-radius: 8px;
    background: #fdf6ff;
    transition: all 0.2s;
    text-align: center;
    gap: 2px;
}

.et-direction-option:hover .et-direction-card {
    border-color: #c4b5fd;
    background: #f5eeff;
}

.et-direction-option input:checked + .et-direction-card {
    border-color: #9333ea;
    background: linear-gradient(135deg, #f3e8ff, #ede9fe);
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.15);
}

.et-direction-option input:checked + .et-direction-card .et-direction-label {
    color: #7c3aed;
}

.et-direction-option input:checked + .et-direction-card .et-direction-desc {
    color: #9333ea;
}

.et-direction-icon {
    font-size: 14px;
}

.et-direction-label {
    font-size: 11px;
    font-weight: 600;
    color: #4c1d95;
}

.et-direction-desc {
    font-size: 10px;
    color: #a78bfa;
    line-height: 1.3;
}

/* 翻译风格 */
.et-style-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

.et-style-option {
    cursor: pointer;
}

.et-style-option input[type="radio"] {
    display: none;
}

.et-style-badge {
    display: block;
    padding: 6px 8px;
    border: 1.5px solid #e9d5ff;
    border-radius: 6px;
    background: #fdf6ff;
    font-size: 12px;
    font-weight: 500;
    color: #5b21b6;
    text-align: center;
    transition: all 0.15s;
}

.et-style-option:hover .et-style-badge {
    border-color: #c4b5fd;
    background: #f5eeff;
}

.et-style-option input:checked + .et-style-badge {
    border-color: #9333ea;
    background: linear-gradient(135deg, #f3e8ff, #ede9fe);
    color: #6b21a8;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(147, 51, 234, 0.12);
}

/* Emoji密度 */
.et-density-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

.et-density-option {
    cursor: pointer;
}

.et-density-option input[type="radio"] {
    display: none;
}

.et-density-badge {
    display: block;
    padding: 6px 4px;
    border: 1.5px solid #e9d5ff;
    border-radius: 6px;
    background: #fdf6ff;
    font-size: 12px;
    font-weight: 500;
    color: #5b21b6;
    text-align: center;
    transition: all 0.15s;
}

.et-density-option:hover .et-density-badge {
    border-color: #c4b5fd;
    background: #f5eeff;
}

.et-density-option input:checked + .et-density-badge {
    border-color: #9333ea;
    background: linear-gradient(135deg, #f3e8ff, #ede9fe);
    color: #6b21a8;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(147, 51, 234, 0.12);
}

/* 输入区域 */
.et-input-area {
    position: relative;
}

.et-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e9d5ff;
    border-radius: 8px;
    font-size: 13px;
    color: #2d1b69;
    background: #fdfaff;
    outline: none;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
    line-height: 1.7;
    transition: all 0.2s;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.et-textarea:hover {
    scrollbar-color: #f97316 transparent;
}

.et-textarea::-webkit-scrollbar { width: 4px; }
.et-textarea::-webkit-scrollbar-track { background: transparent; }
.et-textarea::-webkit-scrollbar-thumb { background: transparent; border-radius: 2px; }
.et-textarea:hover::-webkit-scrollbar-thumb { background: #f97316; }

.et-textarea:focus {
    border-color: #9333ea;
    background: white;
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.12);
}

.et-textarea::placeholder {
    color: #c4b5fd;
    font-size: 12px;
    line-height: 1.8;
}

.et-char-counter {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.et-char-count {
    font-size: 11px;
    color: #c4b5fd;
    transition: color 0.2s;
}

.et-char-count.warning { color: #f59e0b; }
.et-char-count.danger  { color: #ef4444; }

/* 操作按钮区 */
.et-action-section {
    padding: 12px 14px;
    border-top: 1px solid #e9d5ff;
    background: linear-gradient(to bottom, #fdfaff, #fdf6ff);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.et-translate-btn {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.et-translate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

.et-translate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.et-translate-btn.et-btn-generating {
    animation: et-btn-pulse 1.2s infinite ease-in-out;
    cursor: wait;
}

@keyframes et-btn-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.72; }
}

.et-cancel-btn {
    padding: 10px 14px;
    background: #f3e8ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.et-cancel-btn:hover {
    background: #e9d5ff;
    color: #6d28d9;
}

.et-btn-icon {
    font-size: 14px;
}

/* ========== 右侧结果面板 ========== */
.et-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fdfaff;
    overflow: hidden;
    min-width: 300px;
}

.et-result-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.et-result-actions {
    display: flex;
    gap: 6px;
}

.et-result-action-btn {
    background: white;
    border: 1px solid #ddd6fe;
    color: #7c3aed;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}

.et-result-action-btn:hover {
    background: #f3e8ff;
    border-color: #9333ea;
}

/* 占位区域 */
.et-result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    text-align: center;
}

.et-placeholder-icon {
    font-size: 52px;
    margin-bottom: 12px;
    opacity: 0.75;
}

.et-placeholder-title {
    font-size: 16px;
    font-weight: 600;
    color: #5b21b6;
    margin: 0 0 8px;
}

.et-placeholder-desc {
    font-size: 13px;
    color: #7c3aed;
    margin: 0 0 18px;
    line-height: 1.6;
    max-width: 320px;
}

.et-placeholder-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.et-tip-item {
    font-size: 12px;
    color: #a78bfa;
    background: white;
    padding: 5px 14px;
    border-radius: 14px;
    border: 1px solid #e9d5ff;
}

.et-placeholder-quick-start {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.et-placeholder-btn {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.et-placeholder-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.35);
}

.et-placeholder-shortcut {
    font-size: 11px;
    color: #c4b5fd;
}

/* 加载状态 */
.et-result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.et-loading-animation {
    display: flex;
    gap: 10px;
    align-items: center;
}

.et-loading-emoji {
    font-size: 26px;
    animation: et-emoji-bounce 1.4s infinite ease-in-out;
}

.et-loading-emoji:nth-child(2) { animation-delay: 0.2s; }
.et-loading-emoji:nth-child(3) { animation-delay: 0.4s; }

@keyframes et-emoji-bounce {
    0%, 80%, 100% { transform: translateY(0) scale(0.85); opacity: 0.5; }
    40% { transform: translateY(-8px) scale(1.1); opacity: 1; }
}

.et-loading-text {
    font-size: 14px;
    font-weight: 500;
    color: #5b21b6;
    margin: 0;
}

.et-loading-sub {
    font-size: 12px;
    color: #c4b5fd;
    margin: 0;
}

/* 结果内容区域 */
.et-result-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.et-result-content:hover {
    scrollbar-color: #f97316 transparent;
}

.et-result-content::-webkit-scrollbar { width: 4px; }
.et-result-content::-webkit-scrollbar-track { background: transparent; }
.et-result-content::-webkit-scrollbar-thumb { background: transparent; border-radius: 2px; }
.et-result-content:hover::-webkit-scrollbar-thumb { background: #f97316; }

/* ========== 结果区块 ========== */
.et-result-section {
    background: white;
    border: 1px solid #e9d5ff;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    animation: et-fadeIn 0.25s ease;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.et-result-section:hover {
    border-color: #c4b5fd;
    box-shadow: 0 2px 10px rgba(147, 51, 234, 0.08);
}

@keyframes et-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.et-result-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to right, #f3e8ff, #fdf6ff);
    cursor: pointer;
    border-bottom: 1px solid #e9d5ff;
    user-select: none;
    transition: background 0.15s;
}

.et-result-section-header:hover {
    background: linear-gradient(to right, #e9d5ff, #f3e8ff);
}

.et-section-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.et-section-icon { font-size: 14px; }

.et-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #5b21b6;
}

.et-section-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.et-section-copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #c4b5fd;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.15s;
}

.et-section-copy-btn:hover {
    background: #f3e8ff;
    color: #7c3aed;
}

.et-section-collapse-icon {
    font-size: 12px;
    color: #c4b5fd;
    transition: transform 0.2s;
}

.et-result-section.collapsed .et-section-collapse-icon {
    transform: rotate(-90deg);
}

.et-result-section.collapsed .et-section-body,
.et-result-section.collapsed .et-main-result-box,
.et-result-section.collapsed .et-pure-emoji-box,
.et-result-section.collapsed .et-keyword-mapping,
.et-result-section.collapsed .et-emoji-breakdown,
.et-result-section.collapsed .et-summary-box {
    display: none;
}

.et-result-section.collapsed .et-result-section-header {
    border-bottom: none;
    border-radius: 8px;
}

/* 主要结果框 */
.et-main-result-box {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.85;
    color: #2d1b69;
    word-break: break-word;
    white-space: pre-wrap;
    background: #fdfaff;
    border-top: none;
    font-family: inherit;
}

/* 纯Emoji版本 */
.et-pure-emoji-box {
    padding: 16px 20px;
    font-size: 26px;
    text-align: center;
    letter-spacing: 4px;
    line-height: 1.8;
    background: linear-gradient(135deg, #f3e8ff, #ede9fe);
    word-break: break-word;
}

/* 关键词Emoji对照 */
.et-keyword-mapping {
    padding: 10px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.et-keyword-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5eeff;
    border: 1px solid #e9d5ff;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    transition: all 0.15s;
}

.et-keyword-item:hover {
    background: #ede9fe;
    border-color: #c4b5fd;
}

.et-keyword-word {
    color: #4c1d95;
    font-weight: 500;
}

.et-keyword-arrow {
    color: #c4b5fd;
    font-size: 10px;
}

.et-keyword-emoji {
    font-size: 16px;
}

/* Emoji逐一解读 */
.et-emoji-breakdown {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.et-breakdown-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    background: #fdf6ff;
    border: 1px solid #ede9fe;
    border-radius: 6px;
    transition: all 0.15s;
}

.et-breakdown-item:hover {
    background: #f3e8ff;
    border-color: #ddd6fe;
}

.et-breakdown-emoji {
    font-size: 22px;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
    line-height: 1.4;
}

.et-breakdown-meaning {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    word-break: break-word;
    flex: 1;
}

/* 翻译说明 */
.et-summary-box {
    padding: 12px 16px;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.7;
    background: #f9fafb;
    font-style: italic;
    word-break: break-word;
    border-left: 3px solid #c4b5fd;
    margin: 0;
}

/* 通用内容区 */
.et-section-body {
    padding: 14px 16px;
    color: #374151;
    line-height: 1.75;
    word-break: break-word;
    font-size: 13px;
}

.et-section-body p { margin: 0 0 10px; }
.et-section-body p:last-child { margin-bottom: 0; }

/* 原始文本区块 */
.et-raw-text-body {
    white-space: pre-wrap;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #4c1d95;
    background: #fdfaff;
}

.et-error-body {
    padding: 16px;
    color: #dc2626;
    font-size: 13px;
    line-height: 1.7;
    background: #fff5f5;
}

/* ========== 示例模态框 ========== */
.et-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.et-modal.show {
    display: flex;
}

.et-modal-content {
    background: white;
    border-radius: 10px;
    max-width: 680px;
    width: 100%;
    max-height: 82vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(147, 51, 234, 0.2);
    animation: et-modalIn 0.2s ease;
}

@keyframes et-modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.et-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(to right, #f3e8ff, #fdf6ff);
    border-bottom: 1px solid #e9d5ff;
    flex-shrink: 0;
}

.et-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #5b21b6;
}

.et-modal-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #a78bfa;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}

.et-modal-close:hover {
    background: #f3e8ff;
    color: #7c3aed;
}

.et-modal-body {
    overflow-y: auto;
    padding: 16px;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.et-modal-body:hover {
    scrollbar-color: #f97316 transparent;
}

.et-modal-body::-webkit-scrollbar { width: 4px; }
.et-modal-body::-webkit-scrollbar-track { background: transparent; }
.et-modal-body::-webkit-scrollbar-thumb { background: transparent; border-radius: 2px; }
.et-modal-body:hover::-webkit-scrollbar-thumb { background: #f97316; }

.et-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 99999;
    backdrop-filter: blur(2px);
}

/* 示例分类 */
.et-example-category {
    margin-bottom: 16px;
}

.et-example-category-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #5b21b6;
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid #9333ea;
}

.et-example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.et-example-item {
    padding: 10px 14px;
    border: 1.5px solid #e9d5ff;
    border-radius: 8px;
    cursor: pointer;
    background: #fdf6ff;
    transition: all 0.2s;
}

.et-example-item:hover {
    border-color: #9333ea;
    background: #f3e8ff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(147, 51, 234, 0.12);
}

.et-example-title {
    font-size: 13px;
    font-weight: 600;
    color: #4c1d95;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.et-example-desc {
    font-size: 11px;
    color: #a78bfa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.et-example-preview {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}

/* ========== Toast提示 ========== */
.et-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #2d1b69;
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 200000;
    opacity: 0;
    transition: all 0.25s ease;
    white-space: nowrap;
    pointer-events: none;
}

.et-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.et-toast.success { background: #059669; }
.et-toast.warning { background: #d97706; }
.et-toast.error   { background: #dc2626; }

/* ========== 打印样式 ========== */
@media print {
    .et-toolbar,
    .et-history-panel,
    .et-input-panel,
    .et-result-panel-header .et-result-actions,
    .et-result-placeholder,
    .et-result-loading,
    .et-section-copy-btn,
    .et-section-collapse-icon,
    #resultPlaceholder,
    #resultLoading {
        display: none !important;
    }

    .et-container {
        height: auto !important;
        position: static !important;
        box-shadow: none !important;
        background: white !important;
    }

    .et-main-content {
        display: block !important;
    }

    .et-result-panel {
        min-width: 0 !important;
        overflow: visible !important;
    }

    .et-result-content {
        overflow: visible !important;
    }

    .et-result-section {
        break-inside: avoid;
    }

    .et-result-section.collapsed .et-section-body,
    .et-result-section.collapsed .et-main-result-box,
    .et-result-section.collapsed .et-pure-emoji-box,
    .et-result-section.collapsed .et-keyword-mapping,
    .et-result-section.collapsed .et-emoji-breakdown,
    .et-result-section.collapsed .et-summary-box {
        display: block !important;
    }
}

/* 密度区块隐藏（emoji2text模式下） */
.et-section-hidden {
    display: none !important;
}

/* 输入框校验失败：红色边框 + 抖动动画（持续2.2秒）*/
@keyframes et-shake {
    0%, 100% { transform: translateX(0); }
    15%, 45%, 75% { transform: translateX(-5px); }
    30%, 60% { transform: translateX(5px); }
}

.et-textarea.et-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18) !important;
    animation: et-shake 0.45s ease-in-out;
}

/* ========== 响应式适配 ========== */
@media (max-width: 900px) {
    .et-history-panel { display: none; }
    .et-input-panel { width: 300px; min-width: 260px; }
}

@media (max-width: 680px) {
    .et-main-content { flex-direction: column; overflow: auto; }
    .et-input-panel { width: 100%; max-width: none; border-right: none; border-bottom: 1px solid #e9d5ff; min-height: 0; max-height: 55vh; }
    .et-result-panel { min-width: 0; min-height: 300px; }
    .et-direction-group { grid-template-columns: 1fr 1fr 1fr; }
}
