/* ========================================
   Benchmarks (benchmarks.html)
   Page-specific styles for the AI Model Benchmarks page
   ======================================== */

/* Filter Bar */
.filter-bar {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem 0;
  position: sticky;
  top: 64px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--text-dark);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.filter-chip:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(101, 113, 255, 0.04);
}

.filter-chip.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}

.filter-chip .chip-count {
  display: inline-block;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  font-size: 0.75rem;
  margin-left: 0.4rem;
  font-weight: 600;
}

.filter-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
}

.search-input {
  border: 1px solid #e5e7eb;
  border-radius: 50px;
  padding: 0.4rem 1rem 0.4rem 2.5rem;
  font-size: 0.875rem;
  width: 260px;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(101, 113, 255, 0.1);
}

/* Category Sections */
.category-section {
  padding: 1rem 0 0.5rem;
}

.category-section:first-child {
  padding-top: 0.5rem;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e5e7eb;
}

.category-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(101, 113, 255, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  flex-shrink: 0;
}

.category-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-dark);
}

.category-header .category-count {
  background: var(--background-light);
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary-color);
}

/* Tables */
.model-table-wrapper {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  background: #fff;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 1100px;
}

.model-table thead th {
  background: var(--background-light);
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.model-table thead th:hover {
  color: var(--primary-color);
}

.model-table thead th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.3;
  font-size: 0.7rem;
}

.model-table thead th.sort-asc .sort-icon,
.model-table thead th.sort-desc .sort-icon {
  opacity: 1;
  color: var(--primary-color);
}

.model-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.model-table tbody tr:last-child {
  border-bottom: none;
}

.model-table tbody tr:hover {
  background: rgba(101, 113, 255, 0.02);
}

.model-table tbody td {
  padding: 0.55rem 0.75rem;
  color: var(--text-dark);
  vertical-align: middle;
}

.model-name {
  font-weight: 600;
  color: var(--text-dark);
}

.provider-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--secondary-color);
  text-transform: capitalize;
}

.score-cell {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.score-good { color: #10b981; }
.score-mid { color: #f59e0b; }
.score-low { color: #ef4444; }
.score-na { color: var(--text-light); font-weight: 400; }

.gpu-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.gpu-0 { background: #f1f5f9; color: #64748b; }
.gpu-low { background: #d1fae5; color: #065f46; }
.gpu-mid { background: #fef3c7; color: #92400e; }
.gpu-high { background: #fee2e2; color: #991b1b; }

.instance-badge {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  color: var(--secondary-color);
}

.no-results {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.no-results i {
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-gradient h1 {
    font-size: 2rem;
  }

  .filter-bar .d-flex {
    flex-wrap: wrap;
  }

  .search-input {
    width: 100%;
  }

  .d-flex.gap-3 .btn {
    width: 100%;
  }

  .d-flex.gap-3 {
    flex-direction: column;
  }

  .category-header {
    flex-wrap: wrap;
  }
}
