/* =============================================
   英语单词记忆 - english_word_memory.css
   三栏布局：历史 | 输入 | 结果
   蓝色/深蓝色主题，突出英语学习氛围
   ============================================= */

/* ========== 主容器 ========== */
.ew-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f0f6fc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
}

/* 全屏模式 */
.ew-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
    min-height: unset;
}

/* ========== 顶部工具栏 ========== */
.ew-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 12px;
    min-height: 36px;
    background: linear-gradient(135deg, #1a3a5c 0%, #2471a3 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.35);
    flex-shrink: 0;
}

.ew-toolbar .toolbar-group {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

.ew-toolbar .toolbar-btn {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.90);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #1a3a5c;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.4;
}

.ew-toolbar .toolbar-btn:hover:not(:disabled) {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.ew-toolbar .toolbar-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ew-toolbar .toolbar-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

/* 主操作按钮（查询） */
.ew-toolbar .toolbar-btn-primary {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.45);
}

.ew-toolbar .toolbar-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.55);
}

/* 查询按钮 loading shimmer 流光动画 */
.ew-toolbar .toolbar-btn-primary.ew-btn-loading {
    background: linear-gradient(90deg, #27ae60 0%, #82e0aa 35%, #27ae60 65%, #1e8449 100%);
    background-size: 200% 100%;
    animation: ewBtnShimmer 1.4s ease-in-out infinite;
    cursor: not-allowed;
    box-shadow: 0 2px 10px rgba(39, 174, 96, 0.5);
}

@keyframes ewBtnShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 工具栏标题 */
.ew-toolbar .toolbar-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 0.5px;
    margin-right: 4px;
}

/* ========== 主内容：三栏 ========== */
.ew-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f0f6fc;
}

/* ========== 左栏：历史记录 ========== */
.ew-history-panel {
    width: 200px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #d4e6f1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ew-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(to bottom, #f0f8ff 0%, #e8f4fc 100%);
    border-bottom: 1px solid #d4e6f1;
    flex-shrink: 0;
}

.ew-history-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
}

.ew-history-count {
    font-size: 11px;
    color: #5d9ec9;
    font-weight: 400;
}

.ew-history-clear-btn {
    background: #e8f4fc;
    border: none;
    color: #2471a3;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
    white-space: nowrap;
}

.ew-history-clear-btn:hover { background: #d4e6f1; }

.ew-history-search {
    padding: 7px;
    border-bottom: 1px solid #d4e6f1;
    flex-shrink: 0;
}

.ew-history-search input {
    width: 100%;
    padding: 5px 9px;
    border: 1px solid #aed6f1;
    border-radius: 4px;
    font-size: 12px;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    color: #1a3a5c;
    background: #f8fbff;
}

.ew-history-search input:focus {
    border-color: #2471a3;
    box-shadow: 0 0 0 2px rgba(36, 113, 163, 0.12);
}

.ew-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.ew-history-list::-webkit-scrollbar { width: 4px; }
.ew-history-list::-webkit-scrollbar-track { background: transparent; }
.ew-history-list::-webkit-scrollbar-thumb { background: #aed6f1; border-radius: 2px; }
.ew-history-list::-webkit-scrollbar-thumb:hover { background: #f97316; }

.ew-history-item {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s;
    margin-bottom: 3px;
    border: 1px solid transparent;
}

.ew-history-item-main {
    flex: 1;
    min-width: 0;
}

.ew-history-item:hover {
    background: #e8f4fc;
    border-color: #aed6f1;
}

.ew-history-item.active {
    background: #d4e6f1;
    border-color: #85c1e9;
}

.ew-history-item-word {
    font-size: 14px;
    font-weight: 700;
    color: #1a3a5c;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Georgia", "Times New Roman", serif;
    font-style: italic;
}

.ew-history-item-meta {
    font-size: 10px;
    color: #5d9ec9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ew-history-item-mode {
    background: #e8f4fc;
    color: #2471a3;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
}

/* 深度模式标签回显橙色 */
.ew-history-item-mode.deep {
    background: #fdebd0;
    color: #d35400;
}

.ew-history-item-del {
    background: none;
    border: none;
    color: #85c1e9;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.15s;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0;
}

.ew-history-item:hover .ew-history-item-del { opacity: 1; }

.ew-history-item:hover .ew-history-item-del:hover {
    color: #1a3a5c;
    background: #d4e6f1;
}

.ew-history-empty {
    text-align: center;
    color: #85c1e9;
    font-size: 12px;
    padding: 24px 8px;
    line-height: 1.7;
}

/* ========== 中栏：查询输入 ========== */
.ew-input-panel {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #d4e6f1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ew-panel-header {
    padding: 12px 14px 10px;
    border-bottom: 1px solid #d4e6f1;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #f0f8ff 0%, #e8f4fc 100%);
}

.ew-panel-header h3 {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
}

.ew-panel-tip {
    font-size: 11px;
    color: #5d9ec9;
    display: block;
}

.ew-input-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
}

.ew-input-body::-webkit-scrollbar { width: 4px; }
.ew-input-body::-webkit-scrollbar-track { background: transparent; }
.ew-input-body::-webkit-scrollbar-thumb { background: #aed6f1; border-radius: 2px; }
.ew-input-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

/* 搜索框 */
.ew-search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    align-items: stretch;
}

.ew-search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 2px solid #aed6f1;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    color: #1a3a5c;
    background: #f8fbff;
    outline: none;
    transition: all 0.2s;
    font-family: "Georgia", "Palatino Linotype", serif;
    letter-spacing: 1px;
}

.ew-search-input:focus {
    border-color: #2471a3;
    box-shadow: 0 0 0 3px rgba(36, 113, 163, 0.12);
    background: #fff;
}

.ew-search-input::placeholder {
    font-size: 13px;
    color: #85c1e9;
    letter-spacing: 0;
    font-family: inherit;
    font-weight: 400;
    font-style: italic;
}

/* 内嵌查询按钮 */
.ew-search-btn {
    flex-shrink: 0;
    padding: 8px 14px;
    background: linear-gradient(135deg, #2471a3 0%, #1a3a5c 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(36, 113, 163, 0.35);
    font-family: "Georgia", serif;
    letter-spacing: 1px;
}

.ew-search-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2e86c1 0%, #2471a3 100%);
    box-shadow: 0 4px 12px rgba(36, 113, 163, 0.45);
    transform: translateY(-1px);
}

.ew-search-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 字数统计 */
.ew-char-counter {
    text-align: right;
    font-size: 11px;
    color: #85c1e9;
    margin-top: -8px;
    margin-bottom: 12px;
    transition: color 0.2s;
    line-height: 1;
    user-select: none;
}

.ew-char-counter.warning { color: #e67e22; font-weight: 500; }
.ew-char-counter.limit   { color: #c0392b; font-weight: 600; }

/* 记忆模式切换 */
.ew-mode-group { margin-bottom: 14px; }

.ew-mode-label {
    font-size: 12px;
    color: #2e86c1;
    font-weight: 600;
    margin-bottom: 7px;
    display: block;
}

.ew-mode-options {
    display: flex;
    gap: 6px;
}

.ew-mode-option {
    flex: 1;
    padding: 7px 6px;
    text-align: center;
    border: 1.5px solid #aed6f1;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    color: #2e86c1;
    transition: all 0.18s;
    user-select: none;
    background: #f8fbff;
}

.ew-mode-option:hover {
    border-color: #2471a3;
    color: #1a3a5c;
    background: #e8f4fc;
}

.ew-mode-option.selected {
    border-color: #2471a3;
    background: linear-gradient(135deg, #2471a3 0%, #1a3a5c 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(36, 113, 163, 0.3);
}

/* 深度模式选中状态→橙色系，与 Meta 徽章颜色一致 */
.ew-mode-option[data-mode="deep"].selected {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    border-color: #d35400;
    box-shadow: 0 2px 6px rgba(211, 84, 0, 0.35);
}

.ew-mode-icon {
    font-size: 16px;
    display: block;
    margin-bottom: 2px;
}

/* 模式切换提示 */
.ew-mode-hint {
    font-size: 11px;
    color: #2471a3;
    background: #e8f4fc;
    border: 1px solid #aed6f1;
    border-radius: 4px;
    padding: 4px 10px;
    margin-top: 5px;
    display: block;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

.ew-mode-hint.visible { opacity: 1; transform: translateY(0); }

/* 快捷单词标签 */
.ew-quick-label {
    font-size: 12px;
    color: #2e86c1;
    font-weight: 600;
    margin-bottom: 7px;
    display: block;
}

.ew-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.ew-quick-tag {
    padding: 3px 10px;
    background: #e8f4fc;
    border: 1px solid #aed6f1;
    border-radius: 20px;
    font-size: 12px;
    color: #1a3a5c;
    cursor: pointer;
    transition: all 0.18s;
    font-family: "Georgia", "Palatino Linotype", serif;
    font-style: italic;
}

.ew-quick-tag:hover {
    background: #2471a3;
    border-color: #2471a3;
    color: #fff;
    transform: scale(1.05);
}

/* 使用提示 */
.ew-tips-box {
    background: linear-gradient(135deg, #eaf4fb 0%, #e8f6f3 100%);
    border: 1px solid #aed6f1;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 12px;
    color: #1a5276;
    line-height: 1.7;
}

.ew-tips-box p { margin: 0 0 4px; font-weight: 600; }
.ew-tips-box ul { margin: 0; padding-left: 16px; }
.ew-tips-box li { margin-bottom: 2px; }

/* ========== 右栏：查询结果 ========== */
.ew-result-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8fbff;
    min-width: 0;
}

.ew-result-header {
    padding: 10px 16px;
    border-bottom: 1px solid #d4e6f1;
    flex-shrink: 0;
    background: linear-gradient(to bottom, #f0f8ff 0%, #e8f4fc 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ew-result-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1a3a5c;
}

.ew-result-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #5d9ec9;
}

.ew-result-word {
    font-size: 14px;
    font-weight: 700;
    color: #1a3a5c;
    font-family: "Georgia", "Palatino Linotype", serif;
    font-style: italic;
}

.ew-result-mode-badge {
    background: #d4e6f1;
    color: #1a3a5c;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* 模式徽章颜色区分 */
.ew-badge-basic {
    background: #d4e6f1;
    color: #1a5276;
    border: 1px solid rgba(36, 113, 163, 0.25);
}

.ew-badge-deep {
    background: #fdebd0;
    color: #d35400;
    border: 1px solid rgba(211, 84, 0, 0.25);
}

/* Meta 区元素过渡 */
.ew-result-word,
.ew-result-mode-badge,
.ew-result-time {
    transition: opacity 0.2s ease;
}

.ew-result-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.ew-result-body::-webkit-scrollbar { width: 5px; }
.ew-result-body::-webkit-scrollbar-track { background: transparent; }
.ew-result-body::-webkit-scrollbar-thumb { background: #aed6f1; border-radius: 3px; }
.ew-result-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

/* 占位提示 */
.ew-result-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #85c1e9;
    text-align: center;
    padding: 40px;
    min-height: 180px;
}

.ew-placeholder-icon {
    font-size: 52px;
    margin-bottom: 14px;
    opacity: 0.7;
    animation: ewIconFloat 3s ease-in-out infinite;
}

@keyframes ewIconFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
.ew-placeholder-title { font-size: 16px; font-weight: 600; color: #5d9ec9; margin: 0 0 8px; }
.ew-placeholder-desc { font-size: 13px; color: #85c1e9; margin: 3px 0; line-height: 1.6; }

/* 加载中 */
.ew-result-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 180px;
}

.ew-loading-dots {
    display: flex;
    gap: 8px;
}

.ew-loading-dots span {
    width: 10px;
    height: 10px;
    background: #e67e22;
    border-radius: 50%;
    animation: ewDotBounce 1.2s ease-in-out infinite;
}

.ew-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ew-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ewDotBounce {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1.1); opacity: 1; }
}

.ew-loading-text { font-size: 13px; color: #5d9ec9; margin: 0; }

/* ========== 单词结果内容样式 ========== */
.ew-result-content {
    animation: ewFadeInUp 0.35s ease;
    min-height: 0;
    word-break: break-word;
    border-left: 3px solid #e67e22;
    padding-left: 6px;
}

@keyframes ewFadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* AI 生成的单词条目根容器 */
.ew-result-content .ew-entry {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* 单词头部区域 */
.ew-result-content .ew-head {
    padding: 18px 20px 14px;
    background: linear-gradient(135deg, #1a3a5c 0%, #2471a3 50%, #2e86c1 100%);
    border-bottom: none;
}

.ew-result-content .ew-word-main {
    font-size: 34px;
    font-weight: 900;
    color: #fff;
    font-family: "Georgia", "Palatino Linotype", "Times New Roman", serif;
    font-style: italic;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    line-height: 1;
    display: block;
    margin-bottom: 8px;
}

.ew-result-content .ew-phonetics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.ew-result-content .ew-phonetic {
    font-size: 14px;
    color: rgba(255,255,255,0.88);
    font-family: "Palatino Linotype", "Lucida Sans Unicode", serif;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    padding: 2px 10px;
    border-radius: 4px;
}

.ew-result-content .ew-phonetic em {
    font-style: normal;
    font-weight: 700;
    color: #aed6f1;
    margin-right: 4px;
    font-size: 11px;
}

.ew-result-content .ew-pos-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.ew-result-content .ew-pos-badge {
    font-size: 11px;
    background: rgba(255,255,255,0.22);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.35);
    font-weight: 500;
    font-style: italic;
}

/* 各小节 */
.ew-result-content .ew-section {
    padding: 14px 20px;
    border-bottom: 1px solid #e8f0f7;
    flex-shrink: 0;
    word-break: break-word;
}

.ew-result-content .ew-section:last-child { border-bottom: none; }

.ew-result-content .ew-section h4 {
    margin: 0 0 9px;
    font-size: 13px;
    font-weight: 700;
    color: #1a3a5c;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ew-result-content .ew-section h4::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 14px;
    background: #e67e22;
    border-radius: 2px;
}

/* 词性分组 */
.ew-result-content .ew-pos-group {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #d4e6f1;
}

.ew-result-content .ew-pos-group:last-child { border-bottom: none; margin-bottom: 0; }

.ew-result-content .ew-pos-title {
    font-size: 12px;
    font-weight: 700;
    color: #2471a3;
    background: #e8f4fc;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 7px;
    font-style: italic;
    border: 1px solid #aed6f1;
}

/* 释义列表 */
.ew-result-content .ew-senses {
    margin: 0 0 8px;
    padding-left: 20px;
    color: #1a3a5c;
    font-size: 14px;
    line-height: 1.85;
}

.ew-result-content .ew-senses li { margin-bottom: 4px; }

.ew-result-content .ew-senses li::marker {
    color: #2471a3;
    font-weight: 700;
}

/* 例句列表 */
.ew-result-content .ew-examples {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ew-result-content .ew-examples li {
    font-size: 13px;
    color: #2c3e50;
    background: #f0f8ff;
    border-left: 3px solid #85c1e9;
    padding: 6px 12px;
    margin-bottom: 6px;
    border-radius: 0 4px 4px 0;
    line-height: 1.7;
}

/* 常用搭配列表 */
.ew-result-content .ew-phrases {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ew-result-content .ew-phrases li {
    font-size: 13px;
    color: #2c3e50;
    padding: 5px 0;
    border-bottom: 1px dotted #d4e6f1;
    line-height: 1.65;
}

.ew-result-content .ew-phrases li:last-child { border-bottom: none; }

/* 近/反义词 */
.ew-result-content .ew-related { background: #f8fbff; }

.ew-result-content .ew-related-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.ew-result-content .ew-related-row:last-child { margin-bottom: 0; }

.ew-result-content .ew-related-label {
    font-size: 11px;
    font-weight: 700;
    color: #2471a3;
    background: #d4e6f1;
    padding: 2px 7px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.ew-result-content .ew-related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ew-result-content .ew-related-tag {
    padding: 3px 10px;
    background: #e8f4fc;
    border: 1px solid #aed6f1;
    border-radius: 14px;
    font-size: 12px;
    color: #1a3a5c;
    cursor: pointer;
    transition: all 0.18s;
    font-family: "Georgia", serif;
    font-style: italic;
}

.ew-result-content .ew-related-tag:hover {
    background: #2471a3;
    border-color: #2471a3;
    color: #fff;
}

/* ========== 结果区基础HTML标签样式 ========== */
.ew-result-content .ew-section h2 {
    font-size: 15px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 12px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #d4e6f1;
}

.ew-result-content .ew-section h3 {
    font-size: 13px;
    font-weight: 700;
    color: #2471a3;
    margin: 10px 0 5px;
}

.ew-result-content .ew-section p {
    margin: 0 0 7px;
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.8;
}

.ew-result-content .ew-section ol {
    margin: 0;
    padding-left: 22px;
    font-size: 14px;
    color: #1a3a5c;
    line-height: 1.85;
}

.ew-result-content .ew-section ol li { margin-bottom: 4px; }

.ew-result-content .ew-section ol li::marker {
    color: #C0392B;
    font-weight: 700;
}

.ew-result-content .ew-section ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: #2c3e50;
    line-height: 1.8;
}

.ew-result-content .ew-section ul li { margin-bottom: 4px; }

.ew-result-content .ew-section ul li::marker {
    color: #C0392B;
    font-weight: 600;
}

.ew-result-content .ew-section hr {
    border: none;
    border-top: 1px dashed #d4e6f1;
    margin: 10px 0;
}

.ew-result-content .ew-section blockquote {
    margin: 8px 0;
    padding: 8px 14px;
    border-left: 4px solid #2471a3;
    background: #eaf4fb;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #1a3a5c;
    font-style: italic;
    line-height: 1.75;
}

/* ========== AI 生成结果 table 样式 ========== */
.ew-result-content .ew-section table,
.ew-result-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.ew-result-content .ew-section table th,
.ew-result-content table th {
    background: linear-gradient(135deg, #1a3a5c 0%, #2471a3 100%);
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.ew-result-content .ew-section table td,
.ew-result-content table td {
    padding: 7px 12px;
    color: #1a3a5c;
    border-bottom: 1px solid #d4e6f1;
    line-height: 1.6;
}

.ew-result-content .ew-section table tr:nth-child(even) td,
.ew-result-content table tr:nth-child(even) td {
    background: #f0f8ff;
}

.ew-result-content .ew-section table tr:hover td,
.ew-result-content table tr:hover td {
    background: #d4e6f1;
}

/* ========== 结果区 Meta 时间字段 ========== */
.ew-result-time {
    font-size: 11px;
    color: #85c1e9;
    white-space: nowrap;
}

/* 错误容器 Flex 修复 */
#ewResultError {
    flex-shrink: 0;
}

/* ========== 行内标签强化样式 ========== */
.ew-result-content strong {
    color: #8B1A1A;
    font-weight: 700;
}

.ew-result-content em {
    color: #5D3A2A;
    font-style: italic;
}

.ew-result-content a {
    color: #c0392b;
    text-decoration: underline;
    text-decoration-color: rgba(192, 57, 43, 0.4);
    transition: color 0.15s;
}

.ew-result-content a:hover {
    color: #8b1a1a;
    text-decoration-color: #c0392b;
}

.ew-result-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.ew-result-error .ew-error-icon { font-size: 36px; margin-bottom: 10px; }
.ew-result-error .ew-error-msg { font-size: 14px; color: #c0392b; margin: 0 0 6px; font-weight: 600; }
.ew-result-error .ew-error-tip { font-size: 12px; color: #5d9ec9; margin: 0 0 14px; }

.ew-retry-btn {
    padding: 6px 18px;
    background: linear-gradient(135deg, #2471a3 0%, #1a3a5c 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(36, 113, 163, 0.3);
}

.ew-retry-btn:hover {
    background: linear-gradient(135deg, #2e86c1 0%, #2471a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(36, 113, 163, 0.4);
}

/* Shake 抖动动画 */
@keyframes ewShake {
    0%, 100% { transform: translateX(0); }
    15%, 55%, 85% { transform: translateX(-5px); }
    35%, 70% { transform: translateX(5px); }
}

.ew-search-input.shake {
    animation: ewShake 0.45s ease-in-out;
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
}

/* ========== 示例导入模态框 ========== */
.ew-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    z-index: 10000;
    display: none;
}

.ew-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    width: 560px;
    max-width: 95vw;
    max-height: 90vh;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.ew-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #1a3a5c 0%, #2471a3 100%);
    color: #fff;
    flex-shrink: 0;
}

.ew-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.ew-modal-close {
    background: rgba(255,255,255,0.18);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.ew-modal-close:hover { background: rgba(255,255,255,0.35); }

.ew-modal-body {
    overflow-y: auto;
    padding: 14px;
    flex: 1;
}

.ew-modal-body::-webkit-scrollbar { width: 5px; }
.ew-modal-body::-webkit-scrollbar-track { background: #f0f8ff; border-radius: 3px; }
.ew-modal-body::-webkit-scrollbar-thumb { background: #aed6f1; border-radius: 3px; }
.ew-modal-body::-webkit-scrollbar-thumb:hover { background: #f97316; }

.ew-example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ew-example-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.ew-example-card {
    padding: 10px 12px;
    border: 1.5px solid #aed6f1;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fbff;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.ew-example-card:hover {
    border-color: #2471a3;
    background: #e8f4fc;
    box-shadow: 0 3px 10px rgba(36, 113, 163, 0.12);
    transform: translateY(-1px);
}

.ew-example-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    background: #d4e6f1;
    border-radius: 6px;
    padding: 4px 7px;
}

.ew-example-info { flex: 1; min-width: 0; }

.ew-example-word {
    font-size: 16px;
    font-weight: 800;
    color: #1a3a5c;
    font-family: "Georgia", serif;
    font-style: italic;
    margin-bottom: 2px;
}

.ew-example-desc {
    font-size: 12px;
    color: #2e86c1;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========== 响应式布局 ========== */
@media (max-width: 900px) {
    .ew-history-panel { display: none; }
    .ew-input-panel { width: 240px; }
}

@media (max-width: 640px) {
    .ew-main-content { flex-direction: column; }
    .ew-input-panel {
        width: 100%;
        flex-shrink: 0;
        max-height: 240px;
        border-right: none;
        border-bottom: 1px solid #d4e6f1;
    }
    .ew-result-panel { flex: 1; min-height: 0; }
    .ew-toolbar { padding: 5px 8px; gap: 5px; }
    .ew-toolbar .toolbar-btn { padding: 3px 8px; font-size: 11px; }
    .ew-example-grid { grid-template-columns: 1fr; }
    .ew-example-grid > :last-child:nth-child(odd) { grid-column: auto; }
    .ew-modal { width: 96vw; }
}

/* ========== tips box ul li marker ========== */
.ew-tips-box ul li::marker {
    color: #C0392B;
    font-weight: 600;
}

/* ========== 打印样式 ========== */
@media print {
    .ew-toolbar,
    .ew-history-panel,
    .ew-input-panel { display: none !important; }
    .ew-container { height: auto !important; position: static !important; }
    .ew-result-panel { flex: 1; overflow: visible !important; }
    .ew-result-body { overflow: visible !important; padding: 0; }
    .ew-result-content .ew-entry { box-shadow: none; border: 1px solid #ddd; }
}
