/* ========== 成语填空工具容器 ========== */
.ic-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;
}

.ic-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========== 顶部工具栏 ========== */
.ic-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);
}

/* ========== 主内容区三栏布局 ========== */
.ic-main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f8fafc;
}

/* ========== 左侧历史面板 ========== */
.ic-history-panel {
    width: 195px;
    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;
    border-left2: 4px solid #f472b6;
    flex-shrink: 0;
}

.history-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-title {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.wsr-history-count-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    background: #4f46e5;
    color: white;
    min-width: 20px;
    text-align: center;
    line-height: 1.6;
}

.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 #eef2ff;
}

.history-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track { background: #eef2ff; }
.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: icFadeIn 0.2s ease;
}

@keyframes icFadeIn {
    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 #10b981;
    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-text {
    font-size: 12px;
    font-weight: 600;
    color: #4f46e5;
    margin-bottom: 3px;
    padding-right: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.4;
}

.history-item-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.history-item-time { color: #94a3b8; font-size: 11px; }

.history-item-count {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 4px;
    background: #eef2ff;
    color: #4f46e5;
}

.history-item-mode {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    background: #fce7f3;
    color: #be185d;
    font-weight: 500;
}

.history-item-style {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 500;
}

/* ========== 中间输入面板 ========== */
.ic-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;
    border-left2: 4px solid #fb923c;
    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 #eef2ff;
}

.input-panel-body::-webkit-scrollbar { width: 4px; }
.input-panel-body::-webkit-scrollbar-track { background: #eef2ff; }
.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; }

/* 模式选择标签 */
.mode-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mode-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.mode-tab:hover {
    background: #f1f5f9;
    border-color: #c7d2fe;
}

.mode-tab.active {
    background: #eef2ff;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.mode-tab-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.mode-tab-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.mode-tab-main {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.mode-tab.active .mode-tab-main {
    color: #4f46e5;
}

.mode-tab-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.3;
}

.mode-tab.active .mode-tab-desc {
    color: #818cf8;
}

/* 文本输入框 */
.form-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fafafa;
    resize: vertical;
    min-height: 90px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: inherit;
    line-height: 1.6;
    box-sizing: border-box;
}

.form-textarea:focus {
    border-color: #6366f1;
    background: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-textarea.is-error {
    border-color: #ef4444;
    background: #fff5f5;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.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;
}

.char-count {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
    transition: color 0.2s;
}

.char-count.warn {
    color: #f59e0b;
    font-weight: 600;
}

/* 选项标签（难度/语体） */
.ic-option-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ic-option-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;
}

.ic-option-tab:hover { background: #e2e8f0; color: #475569; }

.ic-option-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;
}

/* ========== 右侧结果面板 ========== */
.ic-result-panel {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
}

.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;
    border-left2: 4px solid #6366f1;
    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: #eef2ff;
    color: #4f46e5;
}

.result-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #a5b4fc #eef2ff;
}

.result-content::-webkit-scrollbar { width: 4px; }
.result-content::-webkit-scrollbar-track { background: #eef2ff; }
.result-content::-webkit-scrollbar-thumb { background: #a5b4fc; border-radius: 2px; }
.result-content::-webkit-scrollbar-thumb:hover { background: #818cf8; }

/* 空状态 */
.ic-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;
}

.ic-empty-hint .empty-icon { font-size: 44px; opacity: 0.7; }
.ic-empty-sub { font-size: 12px; color: #cbd5e1; }

/* ========== Loading 骨架屏（shimmer扫光效果） ========== */
.ic-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    overflow: hidden;
}

.ic-shimmer-hint {
    font-size: 12px;
    color: #6366f1;
    font-weight: 500;
    text-align: center;
    padding: 4px 0 6px;
    opacity: 0.8;
}

@keyframes icShimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.ic-skeleton-card {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #c7d2fe;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: white;
}

.ic-skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ic-skeleton-block {
    background: linear-gradient(90deg, #eef2ff 25%, #dde5ff 50%, #eef2ff 75%);
    background-size: 800px 100%;
    animation: icShimmer 1.5s infinite linear;
    border-radius: 4px;
}

.ic-sk-idiom     { height: 24px; width: 88px; }
.ic-sk-badge     { height: 20px; width: 64px; border-radius: 10px; }
.ic-sk-line-full { height: 13px; width: 100%; }
.ic-sk-line-3q   { height: 13px; width: 72%; }
.ic-sk-line-half { height: 13px; width: 48%; }

/* 错误提示 */
.ic-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;
}

.ic-error-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.ic-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;
}

.ic-retry-btn:hover { background: #ef4444; color: white; }

/* ========== 结果区通用 ========== */
.ic-result {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: icFadeIn 0.3s ease;
}

/* 输入句子展示卡 */
.ic-input-card {
    padding: 12px 16px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ic-input-card:hover {
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

.ic-input-card-label {
    font-size: 11px;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ic-input-card-text {
    font-size: 14px;
    color: #1e293b;
    line-height: 1.6;
    font-weight: 500;
}

.ic-input-card-text--large {
    font-size: 18px;
    letter-spacing: 3px;
    font-weight: 700;
    color: #4f46e5;
}

.ic-input-blank {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    color: #4f46e5;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px dashed #a5b4fc;
    min-width: 60px;
    text-align: center;
}

/* ========== 语境填空结果卡 ========== */
.ic-suggestion-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s;
    animation: icFadeIn 0.25s ease;
}

.ic-suggestion-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.ic-suggestion-card.fitness-high {
    border-left: 4px solid #10b981;
}

.ic-suggestion-card.fitness-medium {
    border-left: 4px solid #f59e0b;
}

.ic-suggestion-card.fitness-low {
    border-left: 4px solid #94a3b8;
}

.ic-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 8px;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 8px;
}

.ic-card-idiom-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ic-idiom-word {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 3px;
    cursor: pointer;
    transition: color 0.15s;
}

.ic-idiom-word::after {
    content: ' 📋';
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s;
}

.ic-idiom-word:hover {
    color: #4f46e5;
    text-decoration: underline dotted #6366f1;
}

.ic-idiom-word:hover::after {
    opacity: 0.7;
}

.ic-idiom-pinyin {
    font-size: 12px;
    color: #6366f1;
    letter-spacing: 1px;
}

.ic-card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.fitness-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.fitness-high-badge { background: #dcfce7; color: #16a34a; }
.fitness-medium-badge { background: #fef3c7; color: #92400e; }
.fitness-low-badge { background: #f1f5f9; color: #475569; }

.frequency-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.freq-common { background: #dcfce7; color: #16a34a; }
.freq-semi   { background: #fef3c7; color: #92400e; }
.freq-rare   { background: #f1f5f9; color: #475569; }

.tone-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #ede9fe;
    color: #7c3aed;
    white-space: nowrap;
}

.ic-card-body {
    padding: 10px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ic-meaning-row {
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.ic-source-row {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}

.ic-source-row::before { content: '📚 '; font-style: normal; }

.ic-completed-sentence {
    padding: 8px 12px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 5px;
    font-size: 13px;
    color: #0c4a6e;
    line-height: 1.6;
}

.ic-completed-sentence-label {
    font-size: 11px;
    color: #6366f1;
    font-weight: 600;
    margin-bottom: 4px;
}

.ic-completed-idiom {
    font-weight: 700;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
}

.ic-explanation {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    padding: 6px 10px;
    background: rgba(99, 102, 241, 0.04);
    border-left: 2px solid #c7d2fe;
    border-radius: 0 4px 4px 0;
}

.ic-example-sentence {
    font-size: 12px;
    color: #475569;
    line-height: 1.6;
    font-style: italic;
    padding-top: 4px;
}

.ic-example-sentence::before { content: '📖 '; font-style: normal; }

/* ========== 写作贴士 ========== */
.ic-writing-tips {
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ic-writing-tips:hover {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
}

.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: 720px;
    width: 100%;
    max-height: 82vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    animation: icModalIn 0.2s ease-out;
}

@keyframes icModalIn {
    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;
}

/* 示例模式切换 */
.example-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.example-mode-tab {
    padding: 6px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.example-mode-tab:hover { background: #e2e8f0; }

.example-mode-tab.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

/* 示例网格 */
.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.example-card {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.example-card:hover {
    border-color: #6366f1;
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
    transform: translateY(-2px);
}

.example-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #4f46e5;
    line-height: 1.5;
    word-break: break-all;
}

.example-card-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.example-card-tag {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 8px;
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 500;
}

/* 复制 Toast */
.copy-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(79, 70, 229, 0.95);
    color: white;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========== 响应式 ========== */
@media (max-width: 900px) {
    .ic-history-panel { width: 160px; }
    .ic-input-panel { width: 240px; }
}

@media (max-width: 700px) {
    .ic-history-panel { display: none; }
    .ic-input-panel { width: 260px; }
}

@media (max-width: 520px) {
    .ic-main-content { flex-direction: column; }
    .ic-input-panel { width: 100%; border-right: none; border-bottom: 1px solid #e2e8f0; max-height: 320px; }
    .ic-result-panel { min-width: 0; }
}
