.marketplace-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.marketplace-sidebar {
  position: sticky;
  top: 104px;
  display: flex;
  max-height: calc(100vh - 136px);
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.marketplace-content {
  min-width: 0;
}

.marketplace-content-header {
  display: block;
  margin-bottom: 22px;
}

.marketplace-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.marketplace-search {
  width: 100%;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #f7f7f8;
  padding: 0 16px;
  color: #09090b;
  font-size: 14px;
  outline: none;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.marketplace-search:focus {
  border-color: #d4d4d8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 24, 27, .05);
}

.marketplace-view-toggle {
  display: inline-flex;
  justify-self: end;
  gap: 5px;
  border-radius: 14px;
  background: #f5f5f6;
  padding: 4px;
}

.marketplace-view-button,
.marketplace-filter-button,
.marketplace-reset-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.marketplace-view-button {
  min-width: 66px;
  border-radius: 10px;
  background: transparent;
  padding: 8px 12px;
  color: #71717a;
  font-size: 13px;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.marketplace-view-button[aria-pressed="true"] {
  background: #fff;
  color: #09090b;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.marketplace-filter-panel {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 2px;
}

.marketplace-filter-group {
  min-width: 0;
  padding: 15px 0;
}

.marketplace-filter-group:first-child {
  padding-top: 0;
}

.marketplace-filter-group + .marketplace-filter-group {
  border-top: 1px solid #f0f0f2;
}

.marketplace-filter-title {
  margin-bottom: 10px;
  color: #8a8a93;
  font-size: 12px;
  font-weight: 760;
}

.marketplace-filter-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.marketplace-filter-button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  border-radius: 12px;
  background: transparent;
  padding: 7px 9px;
  color: #52525b;
  text-align: left;
  transition: background .18s ease, color .18s ease;
}

.marketplace-filter-button:hover {
  background: #f6f6f7;
  color: #18181b;
}

.marketplace-filter-button[aria-pressed="true"] {
  background: #f4f4f5;
  color: #18181b;
}

.marketplace-filter-check {
  display: inline-flex;
  width: 16px;
  height: 16px;
  justify-self: center;
  border: 1px solid #d4d4d8;
  border-radius: 5px;
  background: #fff;
}

.marketplace-filter-button[aria-pressed="true"] .marketplace-filter-check {
  border-color: #d4d4d8;
  background: #18181b;
  box-shadow: inset 0 0 0 4px #f4f4f5;
}

.marketplace-filter-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
}

.marketplace-filter-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.marketplace-filter-icon svg path:not([fill]) {
  fill: currentColor;
}

.marketplace-filter-label {
  overflow: hidden;
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-filter-count {
  color: currentColor;
  font-size: 11px;
  font-weight: 720;
  opacity: .48;
}

.marketplace-reset-button {
  flex: 0 0 auto;
  margin-top: 14px;
  border-top: 1px solid #f0f0f2;
  background: transparent;
  padding: 14px 2px 2px;
  color: #71717a;
  font-size: 12px;
  font-weight: 750;
  text-align: left;
  transition: color .18s ease;
}

.marketplace-reset-button:hover {
  color: #09090b;
}

.marketplace-card-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.marketplace-model-group {
  min-width: 0;
}

.marketplace-group-header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  background: transparent;
  color: #18181b;
}

.marketplace-group-header .provider-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.marketplace-group-header .provider-avatar svg {
  width: 22px;
  height: 22px;
}

.marketplace-group-name {
  color: #18181b;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
}

.marketplace-group-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 18px;
}

.marketplace-model-card {
  position: relative;
  display: flex;
  min-height: 354px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #f0f0f2;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  padding: 22px;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.marketplace-model-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 0%, rgba(248, 248, 249, .82), transparent 34%),
    linear-gradient(180deg, rgba(252, 252, 253, .62), rgba(255, 255, 255, 0) 46%);
}

.marketplace-model-card > * {
  position: relative;
  z-index: 1;
}

.marketplace-model-card:hover {
  border-color: #e4e4e7;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .055);
}

.marketplace-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.marketplace-provider {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.provider-avatar {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #111827;
}

.provider-avatar svg {
  display: block;
  width: 23px;
  height: 23px;
}

.provider-avatar svg path:not([fill]) {
  fill: currentColor;
}

.provider-avatar[data-provider="openai"] {
  color: #111827;
}

.provider-avatar[data-provider="anthropic"] {
  color: #D97A57;
}

.provider-avatar[data-provider="gemini"] {
  color: #3186ff;
}

.provider-avatar[data-provider="qwen"],
.provider-avatar[data-provider="alibaba"] {
  color: #615ced;
}

.provider-avatar[data-provider="other"] {
  color: #71717a;
}

.marketplace-provider-name {
  overflow: hidden;
  color: #18181b;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-type-badge {
  flex: 0 0 auto;
  max-width: none;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  padding: 0;
  color: #71717a;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.marketplace-model-title-row {
  display: flex;
  min-height: 76px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 0;
}

.marketplace-model-name {
  min-width: 0;
  margin: 0;
  color: #09090b;
  font-size: clamp(23px, 1.85vw, 32px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.marketplace-model-copy-btn {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .76);
  color: #111827;
  cursor: pointer;
  opacity: .78;
  transition: border-color .18s ease, background .18s ease, color .18s ease, opacity .18s ease, transform .18s ease;
}

.marketplace-model-copy-btn svg {
  width: 16px;
  height: 16px;
}

.marketplace-model-copy-btn:hover,
.marketplace-model-copy-btn:focus-visible {
  border-color: rgba(15, 23, 42, .28);
  background: #fff;
  opacity: 1;
  outline: none;
  transform: translateY(-1px);
}

.marketplace-model-copy-btn.is-copied {
  border-color: rgba(16, 185, 129, .42);
  background: rgba(236, 253, 245, .94);
  color: #047857;
  opacity: 1;
}

.marketplace-price-panel {
  margin-top: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.marketplace-detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  margin: 20px auto 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0;
  transition: color .18s ease, transform .18s ease;
}

.marketplace-detail-button span {
  font-size: 20px;
  line-height: 1;
  transition: transform .18s ease;
}

.marketplace-detail-button:hover,
.marketplace-detail-button:focus-visible {
  color: #09090b;
  outline: none;
  transform: translateX(2px);
}

.marketplace-detail-button:hover span,
.marketplace-detail-button:focus-visible span {
  transform: translateX(2px);
}

.marketplace-price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 0;
  overflow: visible;
}

.marketplace-price-cell {
  min-width: 0;
}

.marketplace-price-cell dt {
  color: #8a8a93;
  font-size: 11px;
  font-weight: 700;
}

.marketplace-price-cell dd {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: max-content;
  margin: 4px 0 0;
  color: #18181b;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.marketplace-entry-cny-price {
  display: inline-flex;
  margin-left: 8px;
  color: #166534;
  font-size: inherit;
  font-weight: inherit;
  white-space: nowrap;
}

.marketplace-price-cell .marketplace-entry-cny-price {
  display: inline-flex;
  margin: 0 0 0 6px;
}

.marketplace-tier-summary {
  display: block;
  margin-top: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.marketplace-tier-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.marketplace-tier-summary-line strong {
  flex: 0 0 auto;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.marketplace-tier-summary-labels {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-table-wrap {
  display: none;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.marketplace-table {
  width: 100%;
  min-width: 1460px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  text-align: left;
  font-size: 14px;
}

.marketplace-table th,
.marketplace-table td {
  border-bottom: 1px solid #e8edf4;
  padding: 17px 16px;
  vertical-align: middle;
}

.marketplace-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.marketplace-table th:nth-child(1),
.marketplace-table td:nth-child(1) {
  width: 54px;
}

.marketplace-table th:nth-child(2),
.marketplace-table td:nth-child(2) {
  width: 290px;
}

.marketplace-table th:nth-child(3),
.marketplace-table td:nth-child(3) {
  width: 210px;
}

.marketplace-table th:nth-child(4),
.marketplace-table td:nth-child(4) {
  width: 150px;
}

.marketplace-table th:nth-child(5),
.marketplace-table td:nth-child(5) {
  width: 150px;
}

.marketplace-table th:nth-child(6),
.marketplace-table td:nth-child(6) {
  width: 320px;
}

.marketplace-table th:nth-child(7),
.marketplace-table td:nth-child(7) {
  width: 300px;
}

.marketplace-table td {
  color: #18181b;
  background: #fff;
}

.marketplace-table tbody tr:nth-child(even) td {
  background: #f7f9fc;
}

.marketplace-table tbody tr:hover td {
  background: #f2f6fb;
}

.marketplace-table-check-cell {
  width: 54px;
  text-align: center;
}

.marketplace-table-checkbox {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border: 1.5px solid #9fb0c8;
  border-radius: 5px;
  background: #fff;
}

.marketplace-table-pill,
.marketplace-table-tag,
.marketplace-table-billing,
.marketplace-endpoint-badge {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}

.marketplace-table-pill {
  border: 1px solid #d9dee7;
  background: rgba(255, 255, 255, .86);
  padding: 5px 10px;
  color: #1f2937;
}

.marketplace-table-pill svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.marketplace-table-model-pill span,
.marketplace-table-provider-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.marketplace-table-model-pill {
  max-width: 260px;
}

.marketplace-table-provider-pill {
  max-width: 180px;
}

.marketplace-table-tag {
  background: transparent;
  padding: 0;
  color: #71717a;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.marketplace-table-billing {
  background: #ede9fe;
  padding: 6px 12px;
  color: #5b21b6;
}

.marketplace-endpoint-list {
  display: flex;
  width: max-content;
  max-width: none;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: visible;
  padding-bottom: 0;
}

.marketplace-endpoint-badge {
  flex: 0 0 auto;
  background: #dbeafe;
  padding: 6px 12px;
  color: #1f5f99;
}

.marketplace-endpoint-badge[data-endpoint*="anthropic"] {
  background: #ffedd5;
  color: #9a521f;
}

.marketplace-endpoint-badge[data-endpoint*="response"] {
  background: #fef3c7;
  color: #8a5c16;
}

.marketplace-endpoint-badge[data-endpoint*="gemini"] {
  background: #dbeafe;
  color: #1d4ed8;
}

.marketplace-table-price-column {
  position: static;
  min-width: 320px;
  width: 320px;
  box-shadow: none;
}

.marketplace-table-price-lines {
  display: grid;
  gap: 5px;
}

.marketplace-table-price-line {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #111827;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  white-space: nowrap;
}

.marketplace-table-price-line.marketplace-table-cny-input {
  color: #166534;
  font-size: 13px;
  font-weight: 780;
}

.marketplace-detail-layer {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

.marketplace-detail-mask {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, .28);
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s ease;
}

.marketplace-detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(640px, calc(100vw - 24px));
  height: 100%;
  flex-direction: column;
  overflow-y: auto;
  background: #eef3f9;
  box-shadow: -26px 0 80px rgba(15, 23, 42, .18);
  color: #0f172a;
  transform: translateX(104%);
  transition: transform .22s cubic-bezier(.22, 1, .36, 1);
}

.marketplace-detail-layer.is-open {
  pointer-events: auto;
}

.marketplace-detail-layer.is-open .marketplace-detail-mask {
  opacity: 1;
}

.marketplace-detail-layer.is-open .marketplace-detail-drawer {
  transform: translateX(0);
}

.marketplace-detail-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 36px 30px 28px;
}

.marketplace-detail-head .provider-avatar {
  width: 54px;
  height: 54px;
  flex-basis: 54px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.marketplace-detail-head .provider-avatar svg {
  width: 35px;
  height: 35px;
}

.marketplace-detail-title-wrap {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
}

.marketplace-detail-title {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #0f172a;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
}

.marketplace-detail-close {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #334155;
  cursor: pointer;
  font-size: 38px;
  line-height: 1;
}

.marketplace-detail-section {
  border-top: 1px solid #dce4ef;
  padding: 28px 30px;
}

.marketplace-detail-section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.marketplace-detail-section-title h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.marketplace-detail-section-title p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
}

.marketplace-detail-icon {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  border-radius: 12px;
  font-size: 17px;
  font-style: normal;
  font-weight: 850;
}

.marketplace-detail-icon-info {
  background: #e7f0ff;
  color: #2563eb;
}

.marketplace-detail-icon-link {
  background: #f6edff;
  color: #9333ea;
}

.marketplace-detail-icon-price {
  background: #e9fbf0;
  color: #059669;
}

.marketplace-detail-basic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.marketplace-detail-endpoints {
  display: grid;
  gap: 12px;
}

.marketplace-detail-endpoint-card {
  border: 1px solid #d9e2ee;
  border-radius: 10px;
  background: rgba(255, 255, 255, .55);
  padding: 16px;
}

.marketplace-detail-endpoint-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.marketplace-detail-endpoint-top span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 12px;
  border-radius: 999px;
  background: #22c55e;
  vertical-align: middle;
}

.marketplace-detail-endpoint-top em {
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  padding: 6px 10px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.marketplace-detail-endpoint-card code {
  display: block;
  border: 1px solid #d9e2ee;
  border-radius: 7px;
  background: rgba(255, 255, 255, .72);
  padding: 10px 12px;
  color: #475569;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  white-space: nowrap;
  overflow-x: auto;
}

.marketplace-detail-price-wrap {
  overflow-x: auto;
}

.marketplace-detail-price-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, .62);
}

.marketplace-detail-price-table th,
.marketplace-detail-price-table td {
  border-bottom: 1px solid #d9e2ee;
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

.marketplace-detail-price-table th {
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.marketplace-detail-price-table strong {
  display: inline;
  color: #0f172a;
  font-size: 17px;
  font-weight: 820;
  white-space: nowrap;
}

.marketplace-detail-price-table td > span:not(.marketplace-table-pill):not(.marketplace-table-billing) {
  display: inline;
  margin-left: 5px;
  color: #94a3b8;
  font-size: 13px;
  white-space: nowrap;
}

.marketplace-detail-cny-input {
  display: inline-flex !important;
  align-items: baseline;
  gap: 4px;
  margin: 0 0 0 8px !important;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #166534 !important;
  font-size: 17px !important;
  font-weight: 820;
  white-space: nowrap;
}

.marketplace-detail-cny-input em,
.marketplace-detail-cny-input small {
  color: rgba(21, 128, 61, .76);
  font-style: normal;
  font-size: 12px;
  font-weight: 720;
}

.marketplace-detail-cny-input strong {
  display: inline !important;
  color: #14532d !important;
  font-size: inherit !important;
  font-weight: inherit;
}

.marketplace-detail-tier-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.marketplace-detail-tier-chip {
  display: inline-flex;
  min-width: 96px;
  align-items: baseline;
  justify-content: flex-start;
  gap: 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 4px 0;
  white-space: nowrap;
}

.marketplace-detail-tier-chip em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 820;
}

.marketplace-detail-tier-chip strong {
  display: inline;
  font-size: 15px;
}

.marketplace-detail-tier-chip span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 650;
}

.marketplace-detail-tier-chip .marketplace-entry-cny-price {
  margin-left: 0;
  color: #166534;
  font-size: 12px;
}

.marketplace-detail-tier-matrix {
  display: grid;
  gap: 10px;
  min-width: 700px;
}

.marketplace-detail-tier-head,
.marketplace-detail-tier-row {
  display: grid;
  grid-template-columns: minmax(92px, .9fr) repeat(var(--marketplace-tier-columns, 4), minmax(112px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.marketplace-detail-tier-head {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.marketplace-detail-tier-row > strong {
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
}

.marketplace-detail-tier-value {
  display: block;
  align-content: center;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
}

.marketplace-detail-tier-empty {
  display: grid;
  align-content: center;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0;
}

.marketplace-detail-tier-empty {
  color: #94a3b8;
  font-weight: 760;
  text-align: center;
}

.marketplace-detail-tier-value em {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-detail-tier-value strong {
  display: inline;
  margin-top: 4px;
  color: #111827;
  font-size: 15px;
  font-weight: 850;
  white-space: nowrap;
}

.marketplace-detail-tier-value small {
  display: inline;
  margin-left: 4px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.marketplace-detail-tier-value .marketplace-entry-cny-price {
  display: inline-flex;
  margin: 0 0 0 6px;
  color: #166534;
  font-size: 12px;
}

.marketplace-empty {
  display: none;
  border: 1px solid #ececf0;
  border-radius: 20px;
  background: #fff;
  padding: 54px 18px;
  text-align: center;
}

.marketplace-empty-title {
  color: #18181b;
  font-size: 18px;
  font-weight: 760;
}

.marketplace-empty-copy {
  margin-top: 8px;
  color: #71717a;
  font-size: 13px;
}

[data-model-marketplace][data-view="table"] .marketplace-card-grid {
  display: none;
}

[data-model-marketplace][data-view="table"] .marketplace-table-wrap {
  display: block;
}

[data-model-marketplace][data-empty="true"] .marketplace-empty {
  display: block;
}

[data-model-marketplace][data-empty="true"] .marketplace-card-grid,
[data-model-marketplace][data-empty="true"] .marketplace-table-wrap {
  display: none;
}

html.dark .marketplace-provider-name,
html.dark .marketplace-group-name,
html.dark .marketplace-model-name,
html.dark .marketplace-detail-title,
html.dark .marketplace-detail-section-title h3,
html.dark .marketplace-detail-endpoint-top,
html.dark .marketplace-detail-price-table strong,
html.dark .marketplace-price-cell dd,
html.dark .marketplace-table td,
html.dark .marketplace-empty-title {
  color: #f8fafc;
}

html.dark .marketplace-filter-title,
html.dark .marketplace-detail-section-title p,
html.dark .marketplace-empty-copy {
  color: #a1a1aa;
}

html.dark .marketplace-sidebar,
html.dark .marketplace-model-card,
html.dark .marketplace-table-wrap,
html.dark .marketplace-empty {
  border-color: rgba(255, 255, 255, .11);
  background: #111113;
}

html.dark .marketplace-sidebar {
  border-color: transparent;
  background: transparent;
}

html.dark .marketplace-model-card::before {
  background:
    radial-gradient(circle at 15% 0%, rgba(39, 39, 42, .9), transparent 34%),
    linear-gradient(180deg, rgba(39, 39, 42, .66), rgba(17, 17, 19, 0) 45%);
}

html.dark .marketplace-search,
html.dark .marketplace-view-toggle,
html.dark .marketplace-filter-button:hover {
  background: #18181b;
  color: #ededed;
}

html.dark .marketplace-type-badge {
  background: transparent;
  color: #a1a1aa;
}

html.dark .marketplace-price-panel {
  background: transparent;
}

html.dark .marketplace-tier-summary-line,
html.dark .marketplace-detail-tier-head,
html.dark .marketplace-detail-tier-value em,
html.dark .marketplace-detail-tier-value small {
  color: #a1a1aa;
}

html.dark .marketplace-tier-summary-line strong,
html.dark .marketplace-tier-summary-labels,
html.dark .marketplace-detail-tier-row > strong,
html.dark .marketplace-detail-tier-value strong {
  color: #f8fafc;
}

html.dark .marketplace-detail-cny-input {
  background: transparent;
  color: #86efac !important;
}

html.dark .marketplace-detail-cny-input em,
html.dark .marketplace-detail-cny-input small {
  color: rgba(187, 247, 208, .74);
}

html.dark .marketplace-detail-cny-input strong,
html.dark .marketplace-table-price-line.marketplace-table-cny-input,
html.dark .marketplace-entry-cny-price {
  color: #86efac !important;
}

html.dark .marketplace-detail-drawer {
  background: #111113;
  color: #f8fafc;
  box-shadow: -26px 0 80px rgba(0, 0, 0, .5);
}

html.dark .marketplace-detail-section {
  border-top-color: rgba(255, 255, 255, .09);
}

html.dark .marketplace-detail-head .provider-avatar,
html.dark .marketplace-detail-endpoint-card,
html.dark .marketplace-detail-endpoint-card code,
html.dark .marketplace-detail-price-table {
  border-color: rgba(255, 255, 255, .11);
  background: rgba(255, 255, 255, .04);
}

html.dark .marketplace-detail-head .provider-avatar {
  background: transparent;
}

html.dark .marketplace-table th {
  background: #18181b;
  color: #a1a1aa;
}

html.dark .marketplace-table td {
  background: #09090b;
}

html.dark .marketplace-table tbody tr:nth-child(even) td {
  background: #111113;
}

html.dark .marketplace-table tbody tr:hover td {
  background: #18181b;
}

html.dark .marketplace-table-pill {
  border-color: rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: #f8fafc;
}

html.dark .marketplace-table-checkbox {
  border-color: rgba(203, 213, 225, .72);
  background: transparent;
}

html.dark .marketplace-table-price-column {
  box-shadow: none;
}

html.dark .marketplace-detail-close,
html.dark .marketplace-table-price-line,
html.dark .marketplace-detail-endpoint-card code {
  color: #cbd5e1;
}

html.dark .marketplace-search {
  border-color: transparent;
}

html.dark .marketplace-search:focus,
html.dark .marketplace-view-button[aria-pressed="true"] {
  background: rgba(250, 250, 250, .1);
  box-shadow: none;
}

html.dark .marketplace-view-button {
  color: #a1a1aa;
}

html.dark .marketplace-view-button[aria-pressed="true"] {
  color: #fff;
}

html.dark .marketplace-filter-group + .marketplace-filter-group,
html.dark .marketplace-reset-button {
  border-color: rgba(255, 255, 255, .09);
}

html.dark .marketplace-filter-button {
  color: #cbd5e1;
}

html.dark .marketplace-filter-button[aria-pressed="true"] {
  background: rgba(250, 250, 250, .075);
  color: #f8fafc;
}

html.dark .marketplace-filter-check {
  border-color: rgba(255, 255, 255, .13);
  background: rgba(250, 250, 250, .06);
}

html.dark .provider-avatar {
  border-color: transparent;
  background: transparent;
}

html.dark .marketplace-group-header .provider-avatar {
  border-color: transparent;
  background: transparent;
}

html.dark .marketplace-model-copy-btn {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #f4f4f5;
}

html.dark .marketplace-model-copy-btn:hover,
html.dark .marketplace-model-copy-btn:focus-visible {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .1);
}

html.dark .marketplace-model-copy-btn.is-copied {
  border-color: rgba(52, 211, 153, .36);
  background: rgba(6, 78, 59, .34);
  color: #6ee7b7;
}

html.dark .marketplace-filter-button[aria-pressed="true"] .marketplace-filter-check {
  border-color: rgba(250, 250, 250, .8);
  background: #f8fafc;
  box-shadow: inset 0 0 0 4px rgba(24, 24, 27, .95);
}

html.dark .provider-avatar[data-provider="openai"],
html.dark .provider-avatar[data-provider="other"],
html.dark .provider-avatar {
  color: #f8fafc;
}

html.dark .provider-avatar[data-provider="anthropic"] {
  color: #D97A57;
}

html.dark .marketplace-table th,
html.dark .marketplace-table td {
  border-bottom-color: rgba(255, 255, 255, .09);
}

@media (max-width: 1180px) {
  .marketplace-shell {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 22px;
  }

  .marketplace-content-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .marketplace-shell {
    grid-template-columns: 1fr;
  }

  .marketplace-sidebar {
    position: static;
    max-height: none;
  }

  .marketplace-filter-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
  }

  .marketplace-filter-group,
  .marketplace-filter-group:first-child {
    border-top: 0;
    padding: 0;
  }

  .marketplace-reset-button {
    text-align: center;
  }
}

@media (max-width: 640px) {
  .marketplace-content-header,
  .marketplace-search-row,
  .marketplace-filter-panel {
    grid-template-columns: 1fr;
  }

  .marketplace-card-grid {
    grid-template-columns: 1fr;
  }

  .marketplace-model-card {
    min-height: 320px;
    padding: 18px;
  }

  .marketplace-model-name {
    font-size: 25px;
  }

  .marketplace-model-title-row {
    min-height: auto;
  }

  .marketplace-view-toggle {
    width: 100%;
  }

  .marketplace-view-button {
    flex: 1 1 0;
  }
}
