/* agents.css 智能体资源库页面样式 - Tab版本 */

section.agents-main {
  display: flex;
  justify-content: center;
  background: #f8fafc;
  min-height: 900px;
  padding: 40px 0 80px 0;
  margin-top: 0;
}

.agents-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Tab导航容器 */
.agents-tabs {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Tab导航栏 */
.tab-nav {
  display: flex;
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
  flex: 1;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border-right: 1px solid #e2e8f0;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn:hover {
  color: #1d3fa6;
  background: transparent;
}

.tab-btn.active {
  color: white;
  background: #1d3fa6;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #1d3fa6;
}

/* Tab内容区 */
.tab-content {
  min-height: 800px;
}

.tab-pane {
  display: none;
  padding: 50px 40px;
  min-height: 750px;
  max-height: 85vh;
  overflow-y: auto;
}

.tab-pane.active {
  display: block;
}

/* 自定义滚动条 */
.tab-pane::-webkit-scrollbar {
  width: 8px;
}

.tab-pane::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.tab-pane::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.tab-pane::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Tab标题区域 */
.tab-header {
  text-align: center;
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 2px solid #f1f5f9;
}

.tab-header h2 {
  font-size: 2rem;
  color: #1d3fa6;
  margin-bottom: 12px;
  font-weight: 700;
}

.tab-header p {
  font-size: 1.1rem;
  color: #64748b;
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

/* 卡片网格布局 */
.agents-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 0;
}

/* 卡片样式保持不变 */
.agent-card {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 24px 20px 20px 20px;
  margin-bottom: 0;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  min-height: 160px;
}

/* 卡片动画和效果 */
.agent-card-animate {
  cursor: pointer;
}

.agent-card-animate:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #2986cc, #2471a3);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.agent-card-animate:hover:before {
  transform: scaleX(1);
}

.card-inner {
  width: 100%;
  position: relative;
  z-index: 1;
}

.card-tech-dots {
  display: flex;
  gap: 6px;
  position: absolute;
  right: 16px;
  bottom: 16px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2;
}

.card-tech-dots span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #1d3fa6;
}

.card-tech-dots span:nth-child(1) {
  animation: pulse 1.5s infinite;
}

.card-tech-dots span:nth-child(2) {
  animation: pulse 1.5s infinite 0.2s;
}

.card-tech-dots span:nth-child(3) {
  animation: pulse 1.5s infinite 0.4s;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 0.7; }
}

.agent-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.agent-card:hover .card-tech-dots,
.agent-card.active-card .card-tech-dots {
  opacity: 1;
}

.agent-card h3 {
  font-size: 1.1rem;
  color: #1d3fa6;
  margin: 0 0 12px 0;
  font-weight: 600;
  position: relative;
  padding-left: 0;
  transition: padding-left 0.3s ease;
  line-height: 1.4;
}

.agent-card:hover h3 {
  padding-left: 8px;
}

.agent-card h3:before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  width: 8px;
  height: 2px;
  background: #2986cc;
  transition: transform 0.3s ease, left 0.3s ease;
  transform-origin: right;
}

.agent-card:hover h3:before {
  transform: translateY(-50%) scaleX(1);
  left: -2px;
}

.agent-card p {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
  line-height: 1.6;
  transition: transform 0.3s ease;
}

.agent-card.active-card {
  border: 1px solid #1d3fa6;
  box-shadow: 0 8px 25px rgba(29,63,166,0.15);
}

.agent-card.active-card:before {
  transform: scaleX(1);
}

.agent-card.active-card h3:before {
  transform: translateY(-50%) scaleX(1);
  left: -2px;
}

.agent-card.active-card h3 {
  padding-left: 8px;
}

.card-tech-dots.has-link {
  border-bottom: 2px solid #1d3fa6;
  padding-bottom: 6px;
}

/* 有链接的卡片标题加下划线 */
.agent-card:has(.card-tech-dots.has-link) h3,
.agent-card:has(a[href^="http"]) h3 {
  text-decoration: underline;
  text-decoration-color: #1d3fa6;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* 顶部区域 */
.page-header.agents-header {
  padding: 56px 0 40px 0;
  background: linear-gradient(135deg, #1d3fa6, #19337a);
  position: relative;
  overflow: hidden;
}

.page-header.agents-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='20' height='20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h20v20H0z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.2;
}

.page-header.agents-header::after {
  content: '';
  position: absolute;
  top: 20%;
  right: -150px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  animation: pulse-glow 8s infinite alternate ease-in-out;
}

@keyframes pulse-glow {
  0% { transform: scale(0.8); opacity: 0.1; }
  50% { transform: scale(1.1); opacity: 0.2; }
  100% { transform: scale(0.9); opacity: 0.15; }
}

.agents-header h1 {
  color: #fff;
  font-size: 2.4rem;
  font-weight: bold;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: relative;
  display: inline-block;
}

.agents-header h1::after {
  display: none;
}

.agents-header p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  margin: 0;
  max-width: 700px;
  margin: 0 auto;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .agents-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .agents-cards {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
  }
  
  .tab-pane {
    padding: 30px 20px;
  }
  
  .tab-header h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .agents-container {
    padding: 0 16px;
  }
  
  .tab-nav {
    flex-direction: column;
  }
  
  .tab-btn {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .tab-btn:last-child {
    border-bottom: none;
  }
  
  .tab-btn.active::after {
    height: 3px;
    bottom: auto;
    top: 0;
  }
  
  .agents-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .tab-pane {
    padding: 24px 16px;
    max-height: 70vh;
  }
  
  .tab-header {
    margin-bottom: 30px;
  }
  
  .tab-header h2 {
    font-size: 1.4rem;
  }
  
  .tab-header p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .tab-btn {
    padding: 16px 20px;
    font-size: 1rem;
  }
  
  .agent-card {
    padding: 20px 16px 16px 16px;
  }
  
  .tab-pane {
    max-height: 65vh;
  }
} 