/* ==================== 语义搜索增强样式 ==================== */

/* 零件类型标签 */
.part-type-tag {
    display: inline-block;
    padding: 2px 10px;
    margin-right: 8px;
    margin-bottom: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 结果描述 */
.result-description {
    color: #888;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 匹配高亮 */
.result-highlights {
    color: #aaa;
    font-size: 11px;
    margin-top: 4px;
}

/* LLM解释 */
.llm-explanation {
    background: linear-gradient(135deg, #2a2a3a 0%, #1a1a2a 100%);
    border-left: 3px solid #667eea;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    color: #ccc;
    line-height: 1.5;
    max-width: 350px;
}

/* 相关零件 */
.related-parts {
    color: #777;
    font-size: 10px;
    margin-top: 6px;
    font-style: italic;
}

/* 模型名称 */
.model-name {
    font-weight: 600;
    color: #eee;
    font-size: 13px;
    margin-bottom: 4px;
}

/* 缩略图占位符 */
.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #2a2a2a;
    border-radius: 8px;
}

/* 查询理解面板 */
.query-understanding {
    background: linear-gradient(135deg, #1e1e2e 0%, #2a2a3a 100%);
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
}

.query-understanding .understanding-item {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 13px;
    color: #ccc;
}

.query-understanding .label {
    color: #667eea;
    font-weight: 500;
    margin-right: 8px;
    min-width: 80px;
}

/* 语义搜索状态指示 */
.semantic-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 16px;
    font-size: 11px;
    color: #667eea;
}

.semantic-status.active {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.semantic-status .status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* 信息消息样式 */
.message-info {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(102, 126, 234, 0.3);
    color: #a5b4fc;
}

/* 文本搜索增强 */
.text-search-area {
    background: #1a1a2a;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #2a2a3a;
}

.text-input {
    width: 100%;
    min-height: 100px;
    padding: 12px 16px;
    background: #0a0a1a;
    border: 2px solid #2a2a3a;
    border-radius: 8px;
    font-size: 14px;
    color: #eee;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.text-input::placeholder {
    color: #666;
}

.text-input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #ccc;
    font-size: 14px;
}

/* 示例标签增强 */
.example-tag {
    display: inline-block;
    padding: 6px 14px;
    margin: 4px;
    background: #2a2a3a;
    border: 1px solid #3a3a4a;
    border-radius: 20px;
    font-size: 12px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.example-tag:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
}

/* 搜索按钮状态 */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary .spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 结果表格增强 */
.results-table .model-name-cell {
    max-width: 400px;
}

/* LLM标识 */
.llm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 8px;
}

.llm-badge::before {
    content: '🤖';
    font-size: 10px;
}

/* 对话模式切换 */
.chat-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    background: #1a1a2a;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-mode-toggle:hover {
    background: #2a2a3a;
}

.chat-mode-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.chat-mode-toggle label {
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .llm-explanation {
        max-width: 100%;
    }
    
    .result-description {
        max-width: 100%;
        white-space: normal;
    }
    
    .query-understanding .understanding-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .query-understanding .label {
        margin-bottom: 4px;
    }
}
