/* ========== 组词工具容器 ========== */
.wf-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 600px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.wf-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.wf-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    flex-shrink: 0;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    min-height: 28px;
}

.toolbar-btn {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    transition: all 0.2s;
    white-space: nowrap;
}

.toolbar-btn:hover:not(:disabled) {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.toolbar-btn:active:not(:disabled) { transform: translateY(0); }

.toolbar-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.toolbar-btn-primary {
    background: #ffffff;
    color: #4f46e5;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.toolbar-btn-primary:hover:not(:disabled) {
    background: #eef2ff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.toolbar-btn-danger {
    background: #fff5f5;
    color: #ef4444;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.toolbar-btn-danger:hover:not(:disabled) {
    background: #fde8e8;
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

/* ========== 主内容区三栏布局 ========== */
.wf-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f8fafc;
}

/* ========== 左侧历史面板 ========== */
.wf-history-panel {
    width: 190px;
    background: white;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.history-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.history-clear-btn {
    background: #fff0f0;
    border: none;
    color: #ef4444;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.2s;
}

.history-clear-btn:hover { background: #fde8e8; }

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: #a5b4fc #e0e7ff;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: #e0e7ff; }
.history-list::-webkit-scrollbar-thumb { background: #a5b4fc; border-radius: 2px; }
.history-list::-webkit-scrollbar-thumb:hover { background: #818cf8; }

.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px 12px;
    color: #94a3b8;
    font-size: 12px;
    text-align: center;
}

.history-empty span:first-child { font-size: 22px; }

.history-item {
    display: flex;
    flex-direction: column;
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    animation: wfFadeIn 0.2s ease;
}

@keyframes wfFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.history-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.history-item.active {
    background: #eef2ff;
    border-color: #6366f1;
    border-left: 3px solid #6366f1;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.2);
}

.history-item-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #fde8e8;
    color: #ef4444;
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
}

.history-item:hover .history-item-delete { opacity: 1; }
.history-item-delete:hover { background: #ef4444; color: white; }

.history-item-char {
    font-size: 16px;
    font-weight: 700;
    color: #4f46e5;
    margin-bottom: 3px;
    padding-right: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 2px;
}

.history-item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.history-item-time {
    color: #b0bec5;
    font-size: 11px;
}

.history-item-count {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: #e0e7ff;
    color: #4338ca;
}

.history-item-tag {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 500;
}

.history-item-style {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    background: #faf5ff;
    color: #6d28d9;
    font-weight: 500;
}

/* ========== 中间输入面板 ========== */
.wf-input-panel {
    width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    border-right: 1px solid #e2e8f0;
}

.input-panel-header {
    padding: 14px 16px 10px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.input-panel-header h3 {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.input-panel-subtitle {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

.input-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: #a5b4fc #e0e7ff;
}

.input-panel-body::-webkit-scrollbar { width: 4px; }
.input-panel-body::-webkit-scrollbar-track { background: #e0e7ff; }
.input-panel-body::-webkit-scrollbar-thumb { background: #a5b4fc; border-radius: 2px; }
.input-panel-body::-webkit-scrollbar-thumb:hover { background: #818cf8; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.required { color: #ef4444; font-size: 14px; }

.form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #fafafa;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.form-input:focus {
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.is-error {
    border-color: #ef4444;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
    animation: wfShake 0.38s ease;
}

@keyframes wfShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(4px); }
    60%       { transform: translateX(-3px); }
    80%       { transform: translateX(3px); }
}

/* 大号汉字输入框 */
.char-input-large {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 6px;
    padding: 12px;
    color: #4f46e5;
}

.char-input-large::placeholder {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    color: #cbd5e1;
}

.input-hint-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
}

.input-tip {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.4;
    flex: 1;
}

.input-error-hint {
    font-size: 11px;
    color: #ef4444;
    font-weight: 500;
    margin-top: 2px;
    animation: wfFadeIn 0.2s ease;
}

.char-count {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    transition: color 0.2s;
}

.char-count.warn {
    color: #f59e0b;
    font-weight: 600;
}

/* 词语长度偏好标签 */
.pref-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pref-tab {
    padding: 5px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.pref-tab:hover { background: #e2e8f0; color: #475569; }
.pref-tab:active { transform: scale(0.94); transition: transform 0.1s; }

.pref-tab.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
    font-weight: 500;
}

/* 语体风格标签 */
.style-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.style-tab {
    padding: 5px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.style-tab:hover { background: #e2e8f0; color: #475569; }
.style-tab:active { transform: scale(0.94); transition: transform 0.1s; }

.style-tab.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
    font-weight: 500;
}

/* 查询按钮 */
.query-btn-wrap { margin-top: 4px; }

.query-main-btn {
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    letter-spacing: 0.5px;
}

.query-main-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
    filter: brightness(1.05);
}

.query-main-btn:active:not(:disabled) { transform: translateY(0); }

.query-main-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ========== 右侧结果面板 ========== */
.wf-result-panel {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    border-left: 4px solid #6366f1;
}

.result-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.result-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.result-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e0e7ff;
    color: #4338ca;
}

.result-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #a5b4fc #e0e7ff;
}

.result-content::-webkit-scrollbar { width: 4px; }
.result-content::-webkit-scrollbar-track { background: #e0e7ff; }
.result-content::-webkit-scrollbar-thumb { background: #a5b4fc; border-radius: 2px; }
.result-content::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* 空状态 */
.wf-empty-hint {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
    padding: 40px 20px;
}

@keyframes wfBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.wf-empty-hint .empty-icon { font-size: 44px; opacity: 0.7; animation: wfBounce 2.8s ease-in-out infinite; }
.wf-empty-sub { font-size: 12px; color: #cbd5e1; }

/* Loading 状态 */
.wf-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 20px;
    min-height: 300px;
}

.wf-loading-spin {
    width: 40px;
    height: 40px;
    border: 3px solid #e0e7ff;
    border-top-color: #6366f1;
    border-right-color: #818cf8;
    border-radius: 50%;
    animation: wfSpin 0.9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes wfSpin { to { transform: rotate(360deg); } }

.wf-loading-text { font-size: 14px; color: #64748b; }

.wf-loading-hint {
    font-size: 11px;
    color: #b0bec5;
    letter-spacing: 0.3px;
    margin-top: -4px;
}

/* 错误提示 */
.wf-error-area {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-left: 4px solid #ef4444;
    border-radius: 6px;
    padding: 14px 16px;
    color: #c53030;
    font-size: 13px;
    line-height: 1.6;
}

.wf-error-icon { margin-right: 6px; font-style: normal; }
.wf-error-msg { color: #c53030; font-size: 13px; line-height: 1.6; }

.wf-retry-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 12px;
    background: white;
    border: 1px solid #ef4444;
    color: #ef4444;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.wf-retry-btn:hover { background: #ef4444; color: white; }

/* ========== 查询结果渲染区 ========== */
.wf-result {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: wfFadeIn 0.3s ease;
}

/* 汉字头部信息卡 */
.char-header-card {
    padding: 16px 18px;
    background: linear-gradient(135deg, #eef2ff 0%, #ddd6fe 100%);
    border: 1px solid #c7d2fe;
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.char-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.char-display {
    font-size: 36px;
    font-weight: 800;
    color: #3730a3;
    line-height: 1.1;
    letter-spacing: 4px;
    text-shadow: 0 2px 8px rgba(55, 48, 163, 0.18);
}

.char-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.char-pinyin {
    font-size: 14px;
    color: #6366f1;
    font-weight: 500;
    letter-spacing: 1px;
}

.char-meta-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.char-base-meaning {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    border-left: 2px solid #818cf8;
}

/* 词语分组容器 */
.word-groups-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* 单个词语组 */
.word-group {
    border: 1px solid #e2e8f0;
    border-left: 3px solid #6366f1;
    border-radius: 8px;
    overflow: hidden;
    animation: wfFadeIn 0.25s ease;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.group-header:hover { background: linear-gradient(to bottom, #f1f5f9, #e2e8f0); }

.group-toggle { font-size: 12px; color: #94a3b8; transition: transform 0.2s; }
.group-toggle.collapsed { transform: rotate(-90deg); }

.group-icon { font-size: 14px; }

.group-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    flex: 1;
}

.group-count {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 8px;
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 500;
}

.group-body {
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    background: white;
}

/* 词语卡片 */
.word-card {
    padding: 12px 14px 12px 11px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid transparent;
    border-radius: 6px;
    background: #fafafa;
    transition: all 0.2s;
    cursor: default;
}

.word-card:hover {
    border-left-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.word-card-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.word-text {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 2px;
}

.word-pinyin {
    font-size: 11px;
    color: #64748b;
}

.word-style-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
}

.style-general    { background: #f1f5f9; color: #475569; }
.style-formal     { background: #ede9fe; color: #7c3aed; }
.style-colloquial { background: #fef9c3; color: #92400e; }
.style-literary   { background: #fce7f3; color: #9d174d; }
.style-idiom      { background: #dcfce7; color: #166534; }

.word-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.word-pos {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-weight: 500;
    white-space: nowrap;
}

/* 使用频率指示器 */
.freq-bar {
    display: flex;
    align-items: center;
    gap: 5px;
}

.freq-dots {
    display: flex;
    gap: 3px;
}

.freq-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e2e8f0;
    transition: background 0.2s;
}

.freq-dot.filled         { background: #818cf8; }
.freq-dot.filled.freq-medium { background: #a5b4fc; }
.freq-dot.filled.freq-low    { background: #c7d2fe; }
.freq-dot.filled.freq-high   { background: #4f46e5; }

.freq-label {
    font-size: 10px;
    color: #94a3b8;
}

/* 词义 */
.word-meaning {
    font-size: 12px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 5px;
    padding: 4px 8px;
    background: rgba(99, 102, 241, 0.05);
    border-left: 2px solid #c7d2fe;
    border-radius: 0 4px 4px 0;
}

/* 例句 */
.word-example {
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
    font-style: italic;
}

.word-example::before { content: '"'; color: #6366f1; font-style: normal; font-weight: bold; }
.word-example::after  { content: '"'; color: #6366f1; font-style: normal; font-weight: bold; }

/* 词语点击复制 */
.wf-copy-word {
    cursor: pointer;
    transition: color 0.15s, text-decoration 0.15s;
    user-select: none;
}

.wf-copy-word:hover {
    color: #4f46e5;
    text-decoration: underline dotted #4f46e5;
}

.wf-copy-word::after {
    content: ' 📋';
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.15s;
}

.wf-copy-word:hover::after { opacity: 0.7; }

/* ========== 谚语俗语区 ========== */
.proverbs-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.proverbs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.proverb-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: white;
    border: 1px solid #fde68a;
    border-radius: 6px;
    transition: all 0.2s;
}

.proverb-item:hover {
    background: #fefce8;
    border-color: #fcd34d;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.1);
}

.proverb-text-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.proverb-type-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.proverb-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
    flex: 1;
}

.proverb-meaning {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    padding-left: 4px;
    font-style: italic;
}

/* ========== 使用建议卡 ========== */
.usage-tips-card {
    padding: 14px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tips-icon { font-size: 18px; flex-shrink: 0; }

.tips-text {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    flex: 1;
}

/* ========== 模态框 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}

.modal.show { display: flex; }

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: wfModalIn 0.2s ease-out;
}

@keyframes wfModalIn {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    flex-shrink: 0;
}

.modal-header h3 { margin: 0; font-size: 15px; font-weight: 600; }

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.35); }

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: #a5b4fc #e0e7ff;
}

.modal-body::-webkit-scrollbar { width: 4px; }
.modal-body::-webkit-scrollbar-track { background: #e0e7ff; }
.modal-body::-webkit-scrollbar-thumb { background: #a5b4fc; border-radius: 2px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* 示例网格 */
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.example-card {
    padding: 16px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.example-card:hover {
    border-color: #6366f1;
    background: #eef2ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.example-card-char {
    font-size: 32px;
    font-weight: 800;
    color: #4f46e5;
    letter-spacing: 4px;
    line-height: 1.2;
}

.example-card-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.example-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.example-tag {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 500;
}

/* ========== 复制 Toast ========== */
.copy-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(30, 41, 59, 0.9);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    white-space: nowrap;
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
