:root {
  --model-primary: #6c56f6;
  --model-primary-dark: #5140d8;
  --model-ink: #171b2d;
  --model-muted: #747b91;
  --model-line: rgba(86, 78, 137, 0.12);
  --model-surface: rgba(255, 255, 255, 0.86);
}

body.model-plaza-page {
  background: #f8f9fd;
  color: var(--model-ink);
}

.model-hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 82px 24px 54px;
  background:
    radial-gradient(circle at 16% 24%, rgba(88, 188, 255, 0.24), transparent 25%),
    radial-gradient(circle at 84% 24%, rgba(152, 100, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #f0faff 0%, #f5f1ff 54%, #f9fbff 100%);
}

.model-hero::before,
.model-hero::after {
  content: "";
  position: absolute;
  width: 760px;
  height: 180px;
  border: 1px solid rgba(119, 101, 246, 0.14);
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}

.model-hero::before { left: -180px; top: 170px; }
.model-hero::after { right: -210px; top: 105px; transform: rotate(9deg); }

.model-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  text-align: center;
}

.model-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(108, 86, 246, 0.16);
  border-radius: 999px;
  color: #5c4be4;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 700;
}

.model-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -2px;
  color: #6551ec;
}

.model-hero-subtitle {
  margin: 16px auto 26px;
  color: #596078;
  font-size: 15px;
}

.hero-search {
  display: flex;
  width: min(660px, 100%);
  margin: 0 auto;
  padding: 5px;
  border: 1px solid rgba(104, 86, 222, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 42px rgba(70, 56, 145, 0.12);
}

.hero-search span {
  display: grid;
  place-items: center;
  width: 40px;
  color: #8a90a4;
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 4px;
  color: var(--model-ink);
  background: transparent;
  font-size: 14px;
}

.hero-search button {
  min-width: 88px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(135deg, #7b62ff, #6250e7);
  font-weight: 700;
  cursor: pointer;
}

.hero-hot {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  color: #8990a4;
  font-size: 12px;
}

.hero-hot button {
  border: 1px solid rgba(95, 83, 174, 0.12);
  border-radius: 6px;
  padding: 5px 9px;
  color: #626980;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.hero-float {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 32px rgba(72, 62, 133, 0.12);
  font-size: 23px;
  animation: modelFloat 5s ease-in-out infinite;
}

.hero-float.one { left: 12%; top: 95px; }
.hero-float.two { right: 12%; top: 118px; animation-delay: -1.7s; }
.hero-float.three { left: 20%; bottom: 72px; animation-delay: -3.2s; }

@keyframes modelFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.model-page {
  max-width: 1220px;
  margin: -44px auto 0;
  padding: 0 24px 64px;
  position: relative;
  z-index: 2;
}

.model-filter-panel,
.business-chain-panel {
  border: 1px solid var(--model-line);
  border-radius: 18px;
  background: var(--model-surface);
  box-shadow: 0 18px 54px rgba(45, 40, 89, 0.08);
  backdrop-filter: blur(14px);
}

.model-filter-panel { padding: 22px 24px; }

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.filter-row + .filter-row { margin-top: 14px; }

.filter-label {
  flex: 0 0 72px;
  padding-top: 7px;
  color: #32384d;
  font-size: 13px;
  font-weight: 700;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 11px;
  color: #62697d;
  background: #f8f8fc;
  font-size: 12px;
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  border-color: rgba(108, 86, 246, 0.2);
  color: #604ce9;
  background: #f0edff;
}

.model-filter-panel .category-item {
  display: inline-flex;
  width: auto;
  margin: 0;
  justify-content: center;
  text-align: center;
}

.business-chain-panel {
  margin-top: 16px;
  padding: 18px 22px;
}

.chain-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.chain-head strong { font-size: 14px; }
.chain-head span { color: #83899b; font-size: 12px; }

.chain-flow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
}

.chain-step {
  position: relative;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #eceaf7;
  border-radius: 10px;
  background: #fbfaff;
}

.chain-step:not(:last-child)::after {
  content: "›";
  position: absolute;
  right: -8px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  color: #9b91e4;
  font-weight: 800;
}

.chain-step b {
  display: block;
  margin-bottom: 3px;
  color: #5141c9;
  font-size: 12px;
}

.chain-step span {
  display: block;
  overflow: hidden;
  color: #777d90;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 38px 0 18px;
}

.catalog-head h2 {
  margin: 0 0 5px;
  font-size: 22px;
  color: var(--model-ink);
}

.catalog-head p {
  margin: 0;
  color: #868c9e;
  font-size: 13px;
}

.catalog-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #868c9e;
  font-size: 12px;
}

.catalog-sort select {
  border: 1px solid #e7e6ef;
  border-radius: 8px;
  padding: 8px 10px;
  color: #50566b;
  background: #fff;
}

.model-grid-v2 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.model-card-v2 {
  display: flex;
  min-height: 228px;
  flex-direction: column;
  padding: 19px;
  border: 1px solid #eae9f1;
  border-radius: 13px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.model-card-v2:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 86, 246, .35);
  box-shadow: 0 14px 36px rgba(58, 49, 113, .1);
}

.model-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.model-logo {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 11px;
  font-size: 21px;
}

.model-logo.orange { background: #fff0e9; }
.model-logo.green { background: #eaf9ef; }
.model-logo.blue { background: #eaf3ff; }
.model-logo.teal { background: #e7fbf8; }
.model-logo.purple { background: #f0edff; }

.model-title-wrap { min-width: 0; flex: 1; }

.model-provider {
  margin-bottom: 3px;
  color: #9297a7;
  font-size: 10px;
}

.model-title {
  overflow: hidden;
  margin: 0;
  color: #23273a;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-badge {
  flex: 0 0 auto;
  border-radius: 6px;
  padding: 4px 7px;
  color: #5745d7;
  background: #efecff;
  font-size: 10px;
}

.model-code {
  overflow: hidden;
  margin: 11px 0 12px;
  color: #9297a7;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-tags-v2 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}

.model-tags-v2 span {
  border-radius: 5px;
  padding: 4px 7px;
  color: #6855dc;
  background: #f3f0ff;
  font-size: 10px;
}

.model-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid #f0eff5;
}

.model-price {
  color: #7d8395;
  font-size: 11px;
}

.model-price strong {
  display: block;
  margin-top: 3px;
  color: #2c3145;
  font-size: 12px;
}

.model-actions {
  display: flex;
  gap: 7px;
}

.model-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e7e5f1;
  border-radius: 7px;
  padding: 6px 9px;
  color: #5d6479;
  font-size: 11px;
  text-decoration: none;
}

.model-actions .use {
  border-color: #6c56f6;
  color: #fff;
  background: #6c56f6;
}

.model-empty-v2 {
  display: none;
  grid-column: 1 / -1;
  padding: 70px 20px;
  border: 1px dashed #dcd9ea;
  border-radius: 14px;
  color: #8b90a1;
  background: #fff;
  text-align: center;
}

.catalog-status {
  margin-top: 16px;
  color: #9398a8;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 980px) {
  .model-grid-v2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain-flow { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .model-hero { min-height: 380px; padding-top: 58px; }
  .model-hero h1 { letter-spacing: -1px; }
  .hero-float { display: none; }
  .model-page { padding: 0 14px 42px; }
  .model-filter-panel { padding: 17px 15px; }
  .filter-row { display: block; }
  .filter-label { margin-bottom: 8px; padding: 0; }
  .chain-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .chain-flow { grid-template-columns: repeat(2, 1fr); }
  .catalog-head { align-items: flex-start; flex-direction: column; }
  .model-grid-v2 { grid-template-columns: 1fr; }
}
