/* 分组说明区域 - 与热门模型风格统一 */
.models-section {
  margin: 0 auto;
  padding: clamp(30px, 4vw, 50px) 5vw !important;
  width: 100%;
  max-width: 80%;
  box-sizing: border-box;
  background: transparent !important;
}

.models-section .container {
  max-width: 100% !important;
  padding: 0 !important;
  width: 100%;
}

/* 分组说明标题区 */
.models-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: clamp(16px, 2vw, 28px);
}

.models-title-area {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.5vw, 8px);
}

.models-title {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  color: #18181b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.models-title .title-arrow {
  color: #a1a1aa;
  font-weight: 400;
}

.models-subtitle {
  font-size: clamp(12px, 1vw, 15px);
  color: #71717a;
  margin: 0;
}

.model-filter-system {
  margin-bottom: clamp(16px, 2vw, 28px);
}

/* 筛选器包装容器 */
.filter-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin-bottom: clamp(16px, 2vw, 24px);
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
}

.filter-container {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.5vw, 20px);
  flex: 1;
  margin: 0;
}

.filter-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(6px, 0.8vw, 10px);
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  border: none;
  min-width: auto;
}

.filter-section-title {
  font-weight: 600;
  color: #18181b;
  font-size: clamp(12px, 1vw, 14px);
  white-space: nowrap;
  margin-bottom: 0;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 0.5vw, 8px);
}

.filter-btn {
  padding: clamp(4px, 0.5vw, 6px) clamp(10px, 1vw, 14px);
  background: transparent;
  border: 1px solid transparent;
  border-radius: clamp(6px, 0.6vw, 8px);
  cursor: pointer;
  font-weight: 500;
  font-size: clamp(11px, 0.9vw, 13px);
  color: #71717a;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: #e4e4e7;
  border-color: #d4d4d8;
  color: #18181b;
}

.filter-btn.active {
  background: #18181b;
  color: #fff;
  border-color: #18181b;
}

.model-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.5vw, 24px);
}

.model-card {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: clamp(10px, 1vw, 16px);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.model-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border-color: #d4d4d8;
}

/* 模型卡片标题 - 简洁风格 */
.model-card-header {
  background: #f4f4f5;
  color: #18181b;
  padding: clamp(14px, 1.5vw, 20px);
  font-weight: 600;
  font-size: clamp(14px, 1.2vw, 18px);
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.8vw, 12px);
  border-bottom: 1px solid #e4e4e7;
}

.model-card-header [data-lang-key="models.standard.header"],
.model-card-header [data-lang-key="models.lowercase.header"],
.model-card-header [data-lang-key="models.uppercase.header"] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.model-card-header [data-lang-key="models.rSuffix.header"],
.model-card-header [data-lang-key="models.allSuffix.header"],
.model-card-header [data-lang-key="models.cursorPrefix.header"] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.model-card-header [data-lang-key="models.standard.header"]::before,
.model-card-header [data-lang-key="models.lowercase.header"]::before,
.model-card-header [data-lang-key="models.uppercase.header"]::before,
.model-card-header [data-lang-key="models.rSuffix.header"]::before,
.model-card-header [data-lang-key="models.allSuffix.header"]::before,
.model-card-header [data-lang-key="models.cursorPrefix.header"]::before {
  content: '';
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.model-card-header [data-lang-key="models.standard.header"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 2.75c4.556 0 8.25 3.694 8.25 8.25S16.556 19.25 12 19.25 3.75 15.556 3.75 11 7.444 2.75 12 2.75Z' stroke='%2318181b' stroke-width='1.8'/%3E%3Cpath d='M12 6.5v9' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M14.75 9.25c0-1.1-1.12-2-2.5-2s-2.5.9-2.5 2 1.12 2 2.5 2 2.5.9 2.5 2-1.12 2-2.5 2-2.5-.9-2.5-2' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.model-card-header [data-lang-key="models.lowercase.header"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3.5c4.694 0 8.5 3.806 8.5 8.5s-3.806 8.5-8.5 8.5-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5Z' stroke='%2318181b' stroke-width='1.8'/%3E%3Cpath d='M12 12l3.8-2.2' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M12 7.5v4.5' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Ccircle cx='12' cy='12' r='1' fill='%2318181b'/%3E%3C/svg%3E");
}

.model-card-header [data-lang-key="models.uppercase.header"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M7.5 12a4.5 4.5 0 0 1 7.67-3.18' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M16.5 12a4.5 4.5 0 0 1-7.67 3.18' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M14.2 5.8l1.9 3.2 3.4-.8' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M9.8 18.2l-1.9-3.2-3.4.8' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.model-card-header [data-lang-key="models.rSuffix.header"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M8.5 4.75h7c1.795 0 3.25 1.455 3.25 3.25v12.25H8.5c-1.795 0-3.25-1.455-3.25-3.25V8c0-1.795 1.455-3.25 3.25-3.25Z' stroke='%2318181b' stroke-width='1.8'/%3E%3Cpath d='M8.5 8.5h7.5' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M8.5 12h7.5' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M8.5 15.5h5.5' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.model-card-header [data-lang-key="models.allSuffix.header"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 3.5c4.694 0 8.5 3.806 8.5 8.5s-3.806 8.5-8.5 8.5-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5Z' stroke='%2318181b' stroke-width='1.8'/%3E%3Cpath d='M3.75 12h16.5' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M12 3.75c2.3 2.3 3.75 5.6 3.75 8.25S14.3 17.95 12 20.25C9.7 17.95 8.25 14.65 8.25 12S9.7 6.05 12 3.75Z' stroke='%2318181b' stroke-width='1.8'/%3E%3C/svg%3E");
}

.model-card-header [data-lang-key="models.cursorPrefix.header"]::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4.75 6.5A2.75 2.75 0 0 1 7.5 3.75h9A2.75 2.75 0 0 1 19.25 6.5v7A2.75 2.75 0 0 1 16.5 16.25h-9A2.75 2.75 0 0 1 4.75 13.5v-7Z' stroke='%2318181b' stroke-width='1.8'/%3E%3Cpath d='M8 20.25h8' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M12 16.25v4' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M8.5 7.75h7' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3Cpath d='M8.5 11h4.5' stroke='%2318181b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* 徽章样式 */
.model-card-badge {
  margin-left: auto;
  background: transparent;
  color: #a1a1aa;
  padding: 0;
  border-radius: 0;
  font-size: clamp(10px, 0.8vw, 12px);
  font-weight: 500;
  border: none;
}

.model-card-body {
  padding: clamp(14px, 1.5vw, 20px);
  flex-grow: 1;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.model-card-examples {
  margin-bottom: clamp(12px, 1.2vw, 16px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 0.5vw, 8px);
}

/* 模型示例样式 */
.model-example {
  display: inline-block;
  background: #f4f4f5;
  padding: clamp(4px, 0.4vw, 6px) clamp(8px, 0.8vw, 12px);
  border-radius: clamp(4px, 0.4vw, 6px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(11px, 0.9vw, 13px);
  border: none;
  color: #18181b;
}

.model-card-description {
  margin-bottom: clamp(12px, 1.2vw, 16px);
  color: #71717a;
  font-size: clamp(12px, 1vw, 14px);
  line-height: 1.5;
}

.model-features {
  list-style: none;
  padding: 0;
  margin: 0 0 clamp(12px, 1.2vw, 16px) 0;
}

.model-features li {
  padding: clamp(4px, 0.4vw, 6px) 0;
  display: flex;
  align-items: center;
  font-size: clamp(12px, 1vw, 14px);
  color: #52525b;
}

.model-features li:before {
  content: '✓';
  color: #22c55e;
  font-weight: 600;
  margin-right: clamp(8px, 0.8vw, 12px);
  font-size: clamp(11px, 0.9vw, 13px);
}

.model-features li.no-check:before {
  content: '';
}

.model-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 0.5vw, 8px);
  margin-top: auto;
  border-top: 1px solid #e4e4e7;
  padding-top: clamp(12px, 1.2vw, 16px);
}

/* 标签样式 */
.model-tag {
  display: inline-block;
  padding: clamp(3px, 0.3vw, 5px) clamp(8px, 0.8vw, 12px);
  background: #f4f4f5;
  border-radius: clamp(4px, 0.4vw, 6px);
  font-size: clamp(10px, 0.85vw, 12px);
  color: #71717a;
  border: none;
}

/* 特殊标签样式 */
.model-tag.price {
  background: #eff6ff;
  color: #3b82f6;
  border-color: #dbeafe;
}

.model-tag.speed {
  background: #fef9c3;
  color: #a16207;
  border-color: #fef08a;
}

.model-tag.stability {
  background: #dcfce7;
  color: #16a34a;
  border-color: #bbf7d0;
}

.no-result {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--primary-border);
}

.selection-guide {
  margin-top: 40px;
  padding: 20px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--primary-border);
}

.selection-guide h3 {
  color: var(--primary-color);
  margin-top: 0;
}

.guide-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.guide-badge {
  padding: 8px 15px;
  background: var(--primary-color);
  color: var(--text-white);
  border-radius: 30px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

/* 模型比较表格样式 */
.model-comparison-table-container {
  overflow-x: auto;
  margin-bottom: 30px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--primary-border);
}

.model-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 auto;
  font-size: 0.9rem;
  border: 1px solid var(--primary-border);
}

.model-comparison-table th,
.model-comparison-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--primary-border);
}

.model-comparison-table th {
  background-color: var(--primary-color);
  color: var(--text-white);
  font-weight: bold;
  position: sticky;
  top: 0;
}

.model-comparison-table tr:hover {
  background-color: var(--primary-bg);
}

.model-comparison-table tr:last-child td {
  border-bottom: none;
}

.naming-format {
  font-weight: bold;
  color: var(--primary-dark);
}

.model-comparison-table code {
  background: var(--primary-bg);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.85rem;
  border: 1px solid var(--primary-border);
}

.model-example-cell {
  font-family: monospace;
  color: var(--code-color);
  word-break: break-all;
}

/* 流程图样式 */
.flowchart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 30px auto;
  max-width: 800px;
}

.flowchart-start {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--text-white);
  font-weight: bold;
  padding: 15px 30px;
  border-radius: 50px;
  text-align: center;
  margin-bottom: 15px;
  box-shadow: var(--shadow-md);
}

.flowchart-arrow {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 5px 0;
}

.flowchart-decision {
  background-color: var(--card-bg);
  border: 2px solid var(--primary-color);
  border-radius: var(--radius-md);
  padding: 15px;
  margin: 10px 0;
  text-align: center;
  width: 90%;
  box-shadow: var(--shadow-sm);
}

.flowchart-decision p {
  font-weight: bold;
  margin: 0 0 15px 0;
  color: var(--primary-color);
}

.flowchart-options {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.flowchart-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 10px;
  min-width: 45%;
}

.flowchart-yes,
.flowchart-no {
  font-weight: bold;
  margin-bottom: 10px;
  background-color: var(--bg-medium);
  padding: 5px 15px;
  border-radius: 20px;
}

.flowchart-yes {
  color: #28a745;
}

.flowchart-no {
  color: #dc3545;
}

.flowchart-result {
  background-color: var(--bg-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-sm);
  padding: 10px 15px;
  text-align: center;
  width: 100%;
}

.flowchart-result p {
  margin: 5px 0;
  font-weight: normal;
  color: var(--text-dark);
}

.flowchart-sub-decision {
  width: 100%;
}

.flowchart-sub-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-top: 10px;
}

.flowchart-sub-option {
  flex: 1 1 30%;
  min-width: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 5px;
}

.flowchart-sub-option span {
  background-color: var(--bg-medium);
  padding: 5px 10px;
  border-radius: 15px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-align: center;
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .models-section {
    max-width: 90%;
  }
}

@media (max-width: 900px) {
  .model-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .models-section {
    max-width: 95%;
    padding: 30px 20px;
  }
}

@media (max-width: 768px) {
  .flowchart-options, .flowchart-sub-options {
    flex-direction: column;
    align-items: center;
  }

  .flowchart-option, .flowchart-sub-option {
    width: 100%;
    margin: 10px 0;
  }

  .flowchart-sub-option {
    margin-bottom: 20px;
  }

  .model-comparison-table th,
  .model-comparison-table td {
    padding: 8px;
    font-size: 0.85rem;
  }

  .filter-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .filter-container {
    flex-direction: column;
    gap: 12px;
  }

  .filter-section {
    flex-wrap: wrap;
  }

  .view-all-models-container {
    margin: 0;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .model-cards {
    grid-template-columns: 1fr;
  }

  .models-section {
    max-width: 100%;
    padding: 24px 16px;
  }
}

/* 查看全部模型按钮容器样式 */
.view-all-models-container {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0 clamp(12px, 1.5vw, 20px);
  margin-top: clamp(6px, 0.6vw, 10px);
}

.view-all-models-link {
  display: inline-flex;
  align-items: center;
  padding: 0;
  background-color: transparent;
  color: #71717a;
  border-radius: 0;
  border: none;
  text-decoration: none;
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.view-all-models-link:hover {
  color: #18181b;
}

.view-models-arrow {
  margin-left: clamp(6px, 0.6vw, 10px);
  transition: transform 0.2s ease;
}

.view-all-models-link:hover .view-models-arrow {
  transform: translateX(2px);
}
