/* 智能体页面样式 - agents.css */

/* 主要内容区域 */
.main-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  height: 100vh;
}

/* 顶部搜索栏 */
.top-header {
  height: 77px;
  min-height: 77px;
  max-height: 77px;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.search-container {
  margin-left: auto;
  width: 190px;
  transition: width 0.3s ease;
}

.search-input:focus + .search-container,
.search-container:focus-within {
  width: 266px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #999;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 44px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #4a70ff;
}

/* 分类导航栏 */
.category-nav {
  height: 66px;
  min-height: 66px;
  max-height: 66px;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #f0f0f0;
  overflow-x: auto;
  box-sizing: border-box;
  flex-shrink: 0;
}

.category-tabs {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.category-tab {
  padding: 8px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: white;
  color: #666;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.category-tab:hover {
  border-color: #20C57D;
  color: #20C57D;
  text-decoration: none;
}

.category-tab.active {
  background: #00c9761a;
  border-color: #20C57D;
  color: #20C57D;
  text-decoration: none;
}

/* 智能体网格 */
.agents-grid {
  flex: 1;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: #fafafa;
  align-content: start;
  overflow-y: auto;
}

/* 智能体卡片 */
.agent-card {
  display: flex;
  background: white;
  border-radius: 12px;
  padding: 16px;
  gap: 12px;
  height: 122px;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.agent-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.agent-avatar {
  width: 60px;
  height: 60px;
  border-radius: 30px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.avatar-text {
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  padding: 4px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.agent-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agent-title {
  color: #333;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.agent-description {
  color: #666;
  font-size: 13px;
  line-height: 1.4;
  margin: 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.agent-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.agent-author {
  color: #999;
  font-size: 12px;
}

.agent-stats {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #999;
  font-size: 12px;
}

.stat-icon {
  width: 14px;
  height: 14px;
}

/* 聊天状态指示器 */
.chat-status {
  position: absolute;
  top: 12px;
  right: 12px;
}

.chat-indicator {
  width: 8px;
  height: 8px;
  background: #00d67e;
  border-radius: 50%;
  display: block;
}

/* 立即体验按钮 */
.instant-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  background: #00d67e;
  color: white;
  font-size: 11px;
  border-radius: 12px;
  font-weight: 500;
}

.instant-btn.blue {
  background: #4a70ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .agents-grid {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  
  .agent-card {
    height: auto;
    min-height: 90px;
  }
  
  .agent-avatar {
    width: 50px;
    height: 50px;
    border-radius: 25px;
  }
  
  .avatar-text {
    font-size: 9px;
  }
  
  .agent-title {
    font-size: 15px;
  }
  
  .agent-description {
    font-size: 12px;
  }
}