/* 模型列表展示区域整体优化 - 压缩高度 */
.model-lists-display {
  /* 减小整体区域的外边距 */
  margin: 0 auto; /* 从8px调整为0，让顶部对齐更准确 */
  max-width: 1400px; /* 添加最大宽度，与slider-section的container保持一致 */
  padding: 0 20px; /* 统一为0顶部padding，只保留左右padding */
}

/* 模型列表容器 */
.model-lists-container {
  display: grid;
  grid-template-columns: 6fr 4fr; /* 从6.5fr 3.5fr调整为6fr 4fr，让右侧列稍微宽一些 */
  gap: 16px; /* 从24px减少到16px，减少左右列间距 */
  margin-top: 12px; /* 从20px减少到12px */
  /* 移除原有的居中设置，因为已在父容器处理 */
  /* max-width: 1400px; */
  /* margin-left: auto; */
  /* margin-right: auto; */
  /* padding: 0 20px; */
}

/* 右侧信息列 */
.right-info-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 在右侧信息列中的pricing-hero调整 */
.right-info-column .pricing-hero {
  margin-bottom: 0; /* 移除底部边距，因为gap已经处理间距 */
  background: linear-gradient(135deg, #f0f4ff, #e6f0ff, #f8f9ff); /* 增强渐变效果 */
  border-radius: 12px;
  padding: 12px; /* 从10px增加到12px，利用更宽的空间 */
  border: 1px solid rgba(58, 109, 240, 0.1); /* 添加淡边框 */
  box-shadow: 0 2px 8px rgba(58, 109, 240, 0.08); /* 添加轻微阴影 */
}

.right-info-column .pricing-hero-content {
  display: flex;
  justify-content: center;
}

.right-info-column .pricing-hero-stats {
  display: flex;
  flex-direction: row; /* 改回水平布局，因为现在空间更宽 */
  gap: 12px; /* 从10px增加到12px */
  padding: 0 8px; /* 保持8px */
  width: 100%;
  justify-content: space-between;
}

.right-info-column .hero-stat {
  padding: 8px 10px; /* 保持当前内边距 */
  min-width: auto; /* 保持无最小宽度限制 */
  flex: 1; /* 平均分配宽度 */
  text-align: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9); /* 半透明白色背景 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.right-info-column .stat-value {
  font-size: 17px; /* 从16px增加到17px，利用更大的空间 */
  font-weight: bold;
  color: #3a6df0;
  margin-bottom: 2px;
}

.right-info-column .stat-label {
  font-size: 11px; /* 保持11px */
  color: #555;
  margin-top: 0;
}

/* 列表区块 */
.model-list-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.model-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.model-list-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-list-title .icon {
  font-size: 22px;
}

.model-list-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: #999;
  margin-left: 4px;
}

/* 推荐模型筛选按钮 */
.recommended-filter-buttons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.recommended-filter-btn {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-weight: 500;
}

.recommended-filter-btn:hover {
  background: #e8f4fd;
  border-color: #b3d9f2;
  color: #2196F3;
}

.recommended-filter-btn.active {
  background: #2196F3;
  border-color: #2196F3;
  color: white;
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.recommended-filter-btn.active:hover {
  background: #1976D2;
  border-color: #1976D2;
}

/* 推荐模型列表样式 - 重构版本 */
.recommended-models-container {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

/* 推荐模型网格布局 */
.recommended-models-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 简单卡片容器 */
.simple-cards-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.simple-cards-row .model-recommendation-card {
  flex: 1;
  margin-bottom: 0;
}

/* 推荐模型卡片 */
.model-recommendation-card {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* 复杂卡片布局 - 独占一行 */
.model-recommendation-card.complex-layout {
  width: 100%;
  margin-bottom: 12px;
}

/* 简单卡片布局 - 为并排做准备 */
.model-recommendation-card.simple-layout {
  width: 100%;
  margin-bottom: 12px;
}

.model-recommendation-card:hover {
  border-color: #4CAF50;
  box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
  transform: translateY(-2px);
}

.model-recommendation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #4CAF50, #81C784);
}

/* 模型标题部分 */
.model-title-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.model-title-content {
  flex: 1;
  min-width: 0; /* 允许flex子项收缩 */
}

.model-main-name {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px 0;
  line-height: 1.3;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.model-description {
  font-size: 13px;
  color: #666;
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

/* 简单布局的标题调整 */
.model-recommendation-card.simple-layout .model-main-name {
  font-size: 15px;
}

.model-recommendation-card.simple-layout .model-description {
  font-size: 12px;
}

/* 文档链接 */
.model-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1976d2;
  text-decoration: none;
  border-radius: 18px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid #e3f2fd;
  transition: all 0.3s ease;
  flex-shrink: 0;
  white-space: nowrap;
  height: fit-content;
}

.model-doc-link:hover {
  background: linear-gradient(135deg, #1976d2, #1565c0);
  color: white;
  border-color: #1976d2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.doc-icon {
  font-size: 12px;
}

/* 价格分组区域 */
.model-pricing-section {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.pricing-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pricing-icon {
  font-size: 14px;
}

/* 复杂布局的价格网格 */
.pricing-groups-grid {
  display: grid;
  gap: 8px;
}

.model-recommendation-card.complex-layout .pricing-groups-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* 简单布局的价格网格 */
.model-recommendation-card.simple-layout .pricing-groups-grid {
  grid-template-columns: 1fr;
}

.pricing-group-item {
  background: #ffffff;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  min-height: 38px;
  box-sizing: border-box;
}

.pricing-group-item:hover {
  border-color: #4CAF50;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

.group-name-label {
  color: #555;
  font-weight: 500;
  font-size: 12px;
  flex: 0 0 45%;
  margin-right: 6px;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
  display: flex;
  align-items: center;
}

.group-price-value {
  color: #f57c00;
  font-weight: 700;
  font-size: 13px;
  text-align: right;
  flex: 1;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* 简单布局的价格调整 */
.model-recommendation-card.simple-layout .group-name-label {
  font-size: 11px;
}

.model-recommendation-card.simple-layout .group-price-value {
  font-size: 12px;
}

/* Token价格容器 */
.token-pricing-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  align-items: stretch;
}

.token-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 18px;
}

.token-type {
  color: #666;
  font-weight: 500;
  font-size: 11px;
  min-width: 28px;
  flex: 0 0 auto;
  text-align: right;
  margin-right: 6px;
}

.token-price {
  color: #f57c00;
  font-weight: 700;
  font-size: 12px;
  text-align: right;
  flex: 1;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
}

/* 当有token价格时，调整容器的对齐方式 */
.pricing-group-item.has-token-pricing {
  flex-direction: row;
  align-items: flex-start;
  padding: 10px;
}

.pricing-group-item.has-token-pricing .group-name-label {
  flex: 0 0 40%;
  align-items: flex-start;
  padding-top: 3px;
}

/* 简单布局的token价格调整 */
.model-recommendation-card.simple-layout .token-type {
  font-size: 11px;
}

.model-recommendation-card.simple-layout .token-price {
  font-size: 12px;
}

/* 特殊标记 */
.price-highlight {
  position: relative;
}

.price-highlight::after {
  content: '推荐';
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff5722;
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 500;
}

/* 热门模型列表样式 */
.popular-models-container {
  max-height: 380px; /* 从460px减少到380px，为pricing-hero留出空间 */
  overflow-y: auto;
}

/* 右侧信息列中的热门模型列表特殊调整 */
.right-info-column .popular-models-container {
  max-height: 320px; /* 进一步减少高度，适应右侧列的空间分配 */
}

.popular-model-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease;
  position: relative;
}

.popular-model-item:hover {
  background: #f8f9fa;
}

.popular-model-item:last-child {
  border-bottom: none;
}

.model-rank {
  width: 36px;
  height: 36px;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  margin-right: 12px;
  flex-shrink: 0;
}

/* 前三名特殊样式 */
.popular-model-item:nth-child(1) .model-rank {
  background: #ffd700;
  color: #333;
}

.popular-model-item:nth-child(2) .model-rank {
  background: #c0c0c0;
  color: #333;
}

.popular-model-item:nth-child(3) .model-rank {
  background: #cd7f32;
  color: #fff;
}

.model-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-width: 0;
}

.popular-model-item .model-name {
  font-size: 15px;
  color: #333;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-usage {
  font-size: 14px;
  color: #666;
  background: #f0f0f0;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 12px;
}

/* 为前三名添加特殊的占比样式 */
.popular-model-item:nth-child(1) .model-usage {
  background: #fff3cd;
  color: #856404;
}

.popular-model-item:nth-child(2) .model-usage {
  background: #e2e3e5;
  color: #383d41;
}

.popular-model-item:nth-child(3) .model-usage {
  background: #f8d7da;
  color: #721c24;
}

/* 添加进度条效果 */
.model-usage-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #1976d2, #42a5f5);
  transition: width 0.3s ease;
}

.popular-model-item:nth-child(1) .model-usage-bar {
  background: linear-gradient(90deg, #ffd700, #ffeb3b);
}

.popular-model-item:nth-child(2) .model-usage-bar {
  background: linear-gradient(90deg, #c0c0c0, #e0e0e0);
}

.popular-model-item:nth-child(3) .model-usage-bar {
  background: linear-gradient(90deg, #cd7f32, #ff9800);
}

/* 分页控件 */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

.pagination-btn {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
  background: #f0f0f0;
  border-color: #999;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-info {
  font-size: 14px;
  color: #666;
  min-width: 60px;
  text-align: center;
}

/* 错误信息样式 */
.error-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.error-message p {
  margin: 8px 0;
}

.error-hint {
  font-size: 14px;
  color: #999;
}

/* 加载状态 */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f0f0f0;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* 响应式设计 */
@media (max-width: 1024px) {
  .model-lists-display {
    padding: 0 16px; /* 统一为0顶部padding */
  }
  
  .model-lists-container {
    grid-template-columns: 1fr;
    gap: 16px; /* 保持与桌面版一致 */
    /* 移除原有的padding设置 */
  }
  
  /* 在平板设备上，右侧信息列改为水平布局 */
  .right-info-column {
    flex-direction: row;
    gap: 16px; /* 从20px减少到16px */
  }
  
  .right-info-column .pricing-hero {
    flex: 1;
  }
  
  .right-info-column .model-list-section {
    flex: 1;
  }
  
  /* 平板设备上pricing-hero恢复垂直布局 */
  .right-info-column .pricing-hero-stats {
    flex-direction: column;
    gap: 8px;
  }
  
  .right-info-column .hero-stat {
    width: 100%;
  }
  
  .pricing-groups-grid {
    grid-template-columns: 1fr;
  }
  
  .model-recommendation-card.complex-layout .pricing-groups-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .model-lists-display {
    padding: 0 12px; /* 统一为0顶部padding */
  }
  
  .model-lists-container {
    /* 移除原有的padding设置 */
  }
  
  .model-list-section {
    padding: 16px;
  }
  
  .model-list-title {
    font-size: 18px;
  }

  .model-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .recommended-filter-buttons {
    gap: 4px;
    width: 100%;
  }

  .recommended-filter-btn {
    flex: 1;
    font-size: 12px;
    padding: 5px 8px;
    text-align: center;
  }
  
  /* 移动端右侧信息列恢复垂直布局 */
  .right-info-column {
    flex-direction: column;
    gap: 16px;
  }
  
  /* 移动端pricing-hero样式调整 */
  .right-info-column .pricing-hero-stats {
    flex-direction: column;
    gap: 10px; /* 从12px减少到10px */
  }
  
  .right-info-column .hero-stat {
    min-width: auto;
    width: 100%;
    text-align: center;
  }
  
  .right-info-column .stat-value {
    font-size: 16px; /* 移动端减小字体 */
  }
  
  /* 移动端简单卡片堆叠显示 */
  .simple-cards-row {
    flex-direction: column;
    gap: 12px;
  }
  
  /* 推荐模型卡片移动端适配 */
  .model-recommendation-card {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .model-title-section {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .model-main-name {
    font-size: 16px;
  }
  
  .model-description {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .model-doc-link {
    align-self: flex-start;
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .model-pricing-section {
    padding: 12px;
    margin-top: 12px;
  }
  
  .pricing-section-title {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .pricing-groups-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .pricing-group-item {
    padding: 10px 12px;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-height: auto;
  }
  
  .group-name-label {
    font-size: 12px;
    margin-right: 8px;
    flex: 0 0 45%;
  }
  
  .group-price-value {
    font-size: 13px;
    text-align: right;
    flex: 1;
  }
  
  /* Token价格移动端适配 */
  .token-pricing-container {
    gap: 2px;
  }
  
  .token-price-row {
    min-height: 18px;
  }
  
  .token-type {
    font-size: 11px;
    min-width: 25px;
    text-align: right;
    margin-right: 6px;
  }
  
  .token-price {
    font-size: 12px;
  }

  .model-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* 模型状态标签样式 */
  .model-status-badge {
    font-size: 11px;
    padding: 2px 6px;
    margin-left: 6px;
  }
}

/* 模型状态标签样式 */
.model-status-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  vertical-align: middle;
}

/* 历史数据状态标签（非实时数据） */
.model-status-badge.historical {
  background: #f5f5f5;
  color: #757575;
}

/* 加载中状态 */
.model-status-badge.loading {
  background: #e3f2fd;
  color: #1976d2;
}

/* 无数据状态 */
.model-status-badge.no-data {
  background: #fafafa;
  color: #9e9e9e;
} 