:root {
  --bg: #101214;
  --panel: #181c20;
  --panel-2: #20262c;
  --text: #eef2f2;
  --muted: #91a0a4;
  --line: #2f383f;
  --accent: #7bd88f;
  --accent-2: #f2c14e;
  --danger: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(123, 216, 143, 0.14), transparent 30rem),
    linear-gradient(135deg, #101214, #15191c 45%, #0d0f10);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.notice-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(123, 216, 143, 0.26);
  border-radius: 8px;
  background: rgba(24, 28, 32, 0.72);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.2);
}

.banner-marquee {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  border-inline: 1px solid rgba(123, 216, 143, 0.16);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.banner-track {
  display: flex;
  width: max-content;
  gap: 26px;
  animation: banner-scroll 22s linear infinite;
}

.banner-marquee:hover .banner-track {
  animation-play-state: paused;
}

.banner-track a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: #f6d982;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}

.banner-track a::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 14px rgba(242, 193, 78, 0.8);
  content: "";
}

@keyframes banner-scroll {
  to {
    transform: translateX(-50%);
  }
}

.group-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.group-link:hover {
  color: #9be6ab;
}

.bookmark-button {
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(242, 193, 78, 0.35);
  background: rgba(242, 193, 78, 0.08);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
}

.bookmark-button:hover {
  border-color: var(--accent-2);
  background: rgba(242, 193, 78, 0.14);
}

.search-panel,
.result-head,
.goods {
  border: 1px solid var(--line);
  background: rgba(24, 28, 32, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.search-panel {
  padding: 24px;
  border-radius: 8px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 20px;
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 28px rgba(123, 216, 143, 0.28);
}

h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

p {
  margin: 4px 0 0;
  color: var(--muted);
}

.query-row {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
}

.keyword-input-shell {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111518;
  cursor: text;
}

.keyword-input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 216, 143, 0.12);
}

.keyword-input-shell #keyword {
  flex: 1 0 150px;
  width: auto;
  min-width: 120px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
}

.keyword-match-control {
  position: relative;
  flex: 0 0 190px;
  width: 190px;
  margin-left: auto;
}

.keyword-match-control #keywordMatchMode {
  width: 100%;
  height: 30px;
  padding: 0 28px 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background-color: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.keyword-match-control #keywordMatchMode:focus-visible {
  color: var(--text);
}

.keyword-match-control.is-ready #keywordMatchMode {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.keyword-match-trigger {
  display: flex;
  width: 100%;
  height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 9px 0 10px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.keyword-match-trigger[hidden],
.keyword-match-list[hidden] {
  display: none;
}

.keyword-match-trigger:hover,
.keyword-match-trigger:focus-visible,
.keyword-match-control.is-open .keyword-match-trigger {
  background: rgba(123, 216, 143, 0.08);
  color: var(--text);
}

.keyword-match-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.keyword-match-chevron {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.keyword-match-control.is-open .keyword-match-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.keyword-match-list {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  display: grid;
  width: max-content;
  min-width: 100%;
  max-width: min(280px, calc(100vw - 32px));
  gap: 2px;
  padding: 4px;
  border: 1px solid #3a464e;
  border-radius: 8px;
  background: #181d21;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.46);
}

.keyword-match-option {
  display: flex;
  width: 100%;
  height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.keyword-match-option:hover,
.keyword-match-option:focus-visible {
  outline: 0;
  background: rgba(145, 160, 164, 0.12);
}

.keyword-match-option[aria-selected="true"] {
  background: rgba(123, 216, 143, 0.12);
  color: #a7ecb6;
}

.keyword-match-check {
  opacity: 0;
  color: var(--accent);
  font-size: 15px;
}

.keyword-match-option[aria-selected="true"] .keyword-match-check {
  opacity: 1;
}

.keyword-tags {
  display: contents;
}

.keyword-tag {
  display: inline-flex;
  max-width: 100%;
  height: 28px;
  align-items: center;
  gap: 4px;
  padding: 0 5px 0 9px;
  border: 1px solid rgba(123, 216, 143, 0.36);
  border-radius: 6px;
  background: rgba(123, 216, 143, 0.12);
  color: #dff7e4;
  font-size: 13px;
}

.keyword-tag > span {
  overflow: hidden;
  max-width: 240px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.keyword-tag-remove {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 20px;
}

.keyword-tag-remove:hover,
.keyword-tag-remove:focus-visible {
  background: rgba(255, 107, 107, 0.14);
  color: var(--danger);
}

input,
select,
button {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111518;
  color: var(--text);
  font: inherit;
}

input,
select {
  padding: 0 12px;
}

button {
  cursor: pointer;
  border-color: transparent;
  background: var(--accent);
  color: #071009;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.tg-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  min-width: 138px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(123, 216, 143, 0.38);
  background: rgba(123, 216, 143, 0.12);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.tg-login[hidden] {
  display: none;
}

.paper-plane {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: currentColor;
}

.paper-plane svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.tg-login:hover {
  border-color: var(--accent);
  background: rgba(123, 216, 143, 0.18);
}

.auth-user {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 32px;
  margin-right: 8px;
  padding: 0 12px;
  border: 1px solid rgba(242, 193, 78, 0.34);
  border-radius: 8px;
  background: rgba(242, 193, 78, 0.1);
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.admin-link[hidden] {
  display: none;
}

#searchButton.loading {
  position: relative;
  padding-left: 30px;
  background: #9be6ab;
}

#searchButton.loading::before {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid rgba(7, 16, 9, 0.25);
  border-top-color: #071009;
  border-radius: 50%;
  content: "";
  animation: spin 0.75s linear infinite;
}

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

.filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.source-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(123, 216, 143, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(123, 216, 143, 0.1), rgba(242, 193, 78, 0.05)),
    rgba(17, 21, 24, 0.72);
}

.advanced-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(242, 193, 78, 0.16);
  border-radius: 8px;
  background: rgba(17, 21, 24, 0.58);
}

.advanced-search strong {
  display: block;
  margin-bottom: 3px;
  color: var(--accent-2);
  font-size: 14px;
}

.advanced-search > div > span {
  color: var(--muted);
  font-size: 13px;
}

.search-field-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.field-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 21, 24, 0.9);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.field-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.field-check span {
  margin: 0;
  color: inherit;
  font-size: inherit;
}

.field-check:has(input:checked) {
  border-color: rgba(123, 216, 143, 0.4);
  background: rgba(123, 216, 143, 0.12);
  color: var(--accent);
}

.source-submit-bar strong {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 14px;
}

.source-submit-bar span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.source-submit-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 118px;
  border: 1px solid rgba(123, 216, 143, 0.4);
  background: rgba(123, 216, 143, 0.14);
  color: var(--accent);
  font-weight: 800;
}

.source-submit-button:hover {
  border-color: var(--accent);
  background: rgba(123, 216, 143, 0.2);
}

.source-submit-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.source-secondary-button {
  width: auto;
  min-width: 132px;
  border: 1px solid rgba(242, 193, 78, 0.35);
  background: rgba(242, 193, 78, 0.1);
  color: var(--accent-2);
  font-weight: 800;
}

.source-secondary-button:hover {
  border-color: var(--accent-2);
  background: rgba(242, 193, 78, 0.16);
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.hotwords {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
}

.hotword-title {
  color: var(--muted);
  line-height: 30px;
}

.hotword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hotword {
  width: auto;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 54px;
  margin: 18px 0 12px;
  padding: 0 18px;
  border-radius: 8px;
}

#resultMeta,
.status-text {
  color: var(--muted);
  font-size: 14px;
}

.results {
  display: grid;
  gap: 10px;
}

.hot-sales-home {
  display: grid;
  gap: 14px;
}

.hot-sales-home[hidden] {
  display: none;
}

.hot-sales-hero,
.hot-trend-card,
.hot-tags-card,
.hot-goods-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(24, 28, 32, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.hot-sales-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: 18px;
  background:
    radial-gradient(circle at 4% 12%, rgba(255, 143, 61, 0.2), transparent 18rem),
    linear-gradient(135deg, rgba(123, 216, 143, 0.11), rgba(242, 193, 78, 0.07)),
    rgba(24, 28, 32, 0.96);
}

.hot-sales-title {
  display: flex;
  gap: 13px;
  align-items: center;
}

.hot-sales-title h2 {
  margin: 0 0 4px;
  font-size: 24px;
  letter-spacing: 0;
}

.hot-sales-title p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.hot-sales-fire {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffdf70, #ff8f3d);
  color: #231606;
  font-size: 24px;
  box-shadow: 0 0 30px rgba(255, 143, 61, 0.24);
}

.hot-sales-refresh,
.hot-sales-muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.hot-sales-tabs,
.hot-sales-tags,
.hot-goods-tags,
.hot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hot-sales-tab,
.hot-sales-tag,
.hot-mini-tag {
  width: auto;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(17, 21, 24, 0.86);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hot-sales-tab.active,
.hot-sales-tag {
  border-color: rgba(123, 216, 143, 0.34);
  background: rgba(123, 216, 143, 0.1);
  color: var(--accent);
}

.hot-sales-tag.gold {
  border-color: rgba(242, 193, 78, 0.38);
  background: rgba(242, 193, 78, 0.1);
  color: var(--accent-2);
}

.hot-mini-tag {
  height: 24px;
  padding: 0 8px;
  background: rgba(32, 38, 44, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.hot-sales-tab:hover,
.hot-sales-tag:hover,
.hot-mini-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hot-sales-insights {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.hot-trend-card,
.hot-tags-card {
  padding: 14px;
  background: rgba(17, 21, 24, 0.9);
}

.hot-trend-card {
  position: relative;
  overflow: visible;
}

.hot-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.hot-card-head strong {
  font-size: 15px;
}

.hot-card-head span {
  color: var(--muted);
  font-size: 13px;
}

.hot-sales-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: -1px 0 8px;
}

.hot-sales-keyword {
  position: relative;
  flex: 0 1 286px;
  min-width: 210px;
}

.hot-sales-keyword span {
  position: absolute;
  z-index: 1;
  left: 10px;
  top: 50%;
  padding-right: 8px;
  border-right: 1px solid rgba(123, 216, 143, 0.16);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-50%);
}

.hot-sales-keyword input {
  height: 30px;
  min-height: 30px;
  padding: 0 10px 0 66px;
  border-radius: 999px;
  border-color: rgba(123, 216, 143, 0.22);
  background: rgba(9, 13, 15, 0.78);
  font-size: 13px;
}

.hot-sales-scope-button,
.hot-sales-scope-link {
  width: auto;
  height: 30px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
}

.hot-sales-scope-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.hot-sales-scope-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hot-sales-trend {
  display: flex;
  align-items: end;
  gap: 5px;
  height: 132px;
  padding: 8px 2px 0;
  border-bottom: 1px solid var(--line);
  overflow: visible;
}

.hot-sales-loading {
  width: 100%;
  align-self: center;
  color: var(--muted);
  text-align: center;
}

.hot-trend-bar {
  position: relative;
  flex: 1;
  min-width: 5px;
  height: 8%;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: none;
  opacity: 0.82;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    filter 0.18s ease;
}

.hot-trend-bar.peak {
  opacity: 1;
  filter: drop-shadow(0 0 12px rgba(242, 193, 78, 0.38));
}

.hot-trend-bar:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.hot-trend-bar:hover .hot-trend-popup,
.hot-trend-bar:focus-visible .hot-trend-popup {
  opacity: 1;
  transform: translate(-50%, -5px);
}

.hot-trend-popup {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 9px);
  left: 50%;
  display: grid;
  min-width: 138px;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 9px;
  background: rgba(9, 12, 14, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  color: var(--text);
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 0);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}

.hot-trend-popup::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(242, 193, 78, 0.28);
  border-bottom: 1px solid rgba(242, 193, 78, 0.28);
  background: rgba(9, 12, 14, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.hot-trend-popup strong {
  color: var(--accent-2);
  font-size: 13px;
  line-height: 1.2;
}

.hot-trend-popup em,
.hot-trend-popup small {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.hot-trend-popup b {
  color: var(--accent);
  font-size: 17px;
  line-height: 1.2;
}

.hot-sales-axis {
  position: relative;
  height: 20px;
  margin-top: 7px;
  color: #68777c;
  font-size: 12px;
}

.hot-axis-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}

.hot-axis-tick:first-child {
  transform: translateX(0);
}

.hot-axis-tick:last-child {
  transform: translateX(-100%);
}

.hot-sales-list {
  display: grid;
  gap: 10px;
}

.hot-goods-card {
  display: grid;
  grid-template-columns: 34px 68px minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: center;
  padding: 14px;
}

.hot-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(242, 193, 78, 0.14);
  color: var(--accent-2);
  font-size: 15px;
  font-weight: 900;
}

.hot-goods-image-wrap {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(123, 216, 143, 0.16);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 45%, rgba(123, 216, 143, 0.18), transparent 42%),
    #111518;
  overflow: hidden;
}

.hot-goods-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-goods-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 7px;
}

.hot-platform-chip {
  flex: 0 0 auto;
}

.hot-goods-name {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.hot-goods-name:hover {
  color: var(--accent);
}

.hot-goods-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hot-goods-tags {
  margin-top: 7px;
}

.hot-goods-side {
  display: grid;
  gap: 5px;
  justify-items: end;
  text-align: right;
}

.hot-price {
  color: var(--accent-2);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.15;
}

.hot-sold {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.hot-sold span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.hot-spark {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 3px;
  min-height: 28px;
}

.hot-spark i {
  display: block;
  width: 5px;
  border-radius: 4px 4px 0 0;
  background: var(--accent);
}

.hot-primary-action,
.hot-secondary-action,
.hot-source-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(123, 216, 143, 0.34);
  background: rgba(123, 216, 143, 0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.hot-secondary-action,
.hot-source-action {
  border-color: rgba(242, 193, 78, 0.34);
  background: rgba(242, 193, 78, 0.1);
  color: var(--accent-2);
}

.hot-source-action:hover {
  border-color: var(--accent-2);
  background: rgba(242, 193, 78, 0.18);
  color: var(--accent-2);
}

.load-more-sentinel {
  height: 1px;
}

.load-more-status {
  min-height: 32px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.goods {
  position: relative;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 88px 290px;
  gap: 16px;
  min-height: 112px;
  padding: 14px 16px;
  border-radius: 8px;
}

.heat-ribbon {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  padding: 4px 9px;
  border-bottom-right-radius: 8px;
  background: linear-gradient(135deg, #ffdf70, #ff8f3d);
  color: #231606;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(255, 143, 61, 0.22);
}

.heat-ribbon[hidden] {
  display: none;
}

.goods-image {
  width: 72px;
  height: 72px;
  align-self: center;
  border: 1px solid rgba(123, 216, 143, 0.16);
  border-radius: 10px;
  background: #111518;
  object-fit: cover;
}

.goods-image[hidden] {
  display: none;
}

.goods.no-image {
  grid-template-columns: minmax(0, 1fr) 88px 290px;
}

.goods.pinned-promo {
  position: relative;
  border-color: rgba(242, 193, 78, 0.72);
  background:
    linear-gradient(135deg, rgba(242, 193, 78, 0.13), rgba(123, 216, 143, 0.05)),
    rgba(24, 28, 32, 0.96);
  box-shadow:
    0 0 0 1px rgba(242, 193, 78, 0.16) inset,
    0 22px 70px rgba(242, 193, 78, 0.15);
}

.goods.pinned-promo .platform-chip {
  border-color: rgba(242, 193, 78, 0.42);
  background: rgba(242, 193, 78, 0.12);
  color: var(--accent-2);
}

.goods.pinned-promo .badge {
  position: absolute;
  right: 14px;
  bottom: 8px;
  padding: 0;
  background: transparent;
  color: #6f7b80;
  font-size: 12px;
  font-weight: 500;
}

.goods-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
  min-width: 0;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  width: fit-content;
  padding: 3px 7px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 21, 24, 0.8);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.platform-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 4px;
}

.goods-name {
  display: -webkit-box;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.goods-name:hover {
  color: var(--accent);
}

.badge {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(123, 216, 143, 0.14);
  color: var(--accent);
  font-size: 12px;
}

.badge.offline {
  background: rgba(255, 107, 107, 0.14);
  color: var(--danger);
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.stock-trend {
  margin-top: 6px;
  color: #b9c7ca;
  font-size: 12px;
  line-height: 1.45;
}

.goods-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  border-right: 1px solid var(--line);
  padding-right: 16px;
}

.detail-button,
.heat-button {
  width: auto;
  height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(242, 193, 78, 0.32);
  background: rgba(242, 193, 78, 0.1);
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 700;
}

.detail-button:hover {
  border-color: var(--accent-2);
  background: rgba(242, 193, 78, 0.16);
}

.heat-button {
  border-color: rgba(123, 216, 143, 0.32);
  background: rgba(123, 216, 143, 0.1);
  color: var(--accent);
}

.heat-button:hover {
  border-color: var(--accent);
  background: rgba(123, 216, 143, 0.16);
}

.heat-button:disabled {
  color: var(--muted);
}

.goods-side {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 6px 14px;
  align-content: center;
  padding-left: 0;
}

.goods-side .price {
  grid-row: span 3;
}

.price {
  font-size: 25px;
  font-weight: 800;
  color: var(--accent-2);
  line-height: 1.15;
}

.stock,
.shop,
.contact {
  display: block;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
}

.shop-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
}

.shop {
  overflow: hidden;
  color: var(--accent);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-source-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(242, 193, 78, 0.38);
  border-radius: 999px;
  background: rgba(242, 193, 78, 0.1);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.admin-source-link:hover {
  border-color: var(--accent-2);
  background: rgba(242, 193, 78, 0.18);
  color: var(--accent-2);
}

.empty {
  padding: 40px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.login-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 16px;
  align-items: center;
  margin-top: 12px;
  padding: 18px;
  border: 1px solid rgba(242, 193, 78, 0.32);
  border-radius: 8px;
  background: rgba(242, 193, 78, 0.08);
}

.login-gate[hidden] {
  display: none;
}

.login-gate strong {
  color: var(--accent-2);
  font-size: 17px;
}

.login-gate span {
  grid-column: 1;
  color: var(--muted);
  font-size: 14px;
}

.login-gate .tg-login {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 140;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(242, 193, 78, 0.35);
  border-radius: 8px;
  background: #171b1f;
  color: var(--text);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.44);
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 104px;
  z-index: 45;
  width: auto;
  min-width: 74px;
  height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(123, 216, 143, 0.28);
  border-radius: 999px;
  background: rgba(17, 21, 24, 0.9);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

.back-to-top:hover {
  border-color: var(--accent);
  background: rgba(123, 216, 143, 0.12);
  transform: translateY(-1px);
}

.back-to-top[hidden] {
  display: none;
}

.realtime-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  display: grid;
  gap: 4px;
  min-width: 132px;
  padding: 10px 12px;
  border: 1px solid rgba(123, 216, 143, 0.24);
  border-radius: 8px;
  background: rgba(17, 21, 24, 0.88);
  box-shadow: 0 14px 46px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.realtime-widget div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.realtime-widget span {
  color: var(--muted);
  font-size: 12px;
}

.realtime-widget strong {
  color: var(--accent);
  font-size: 15px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#detailModal {
  z-index: 110;
}

#heatModal {
  z-index: 120;
}

.modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 8, 0.74);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(84vh, 820px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #15191c;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
}

.modal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
  letter-spacing: 0;
}

.modal-platform {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.modal-platform img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.modal-meta,
.modal-contact {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: #111518;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

.modal-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 292px;
}

.modal-head-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111518;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.modal-head-actions a:hover {
  border-color: var(--accent);
  background: rgba(123, 216, 143, 0.08);
}

.modal-close:hover {
  color: var(--text);
  border-color: var(--accent);
}

.modal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 20px 0;
}

.modal-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111518;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}

.modal-stats span:first-child {
  color: var(--accent-2);
  font-weight: 800;
}

.modal-contact {
  padding: 0 20px;
}

.modal-description {
  max-height: calc(84vh - 238px);
  overflow: auto;
  margin: 14px 20px 20px;
  padding: 14px;
  border: 1px solid rgba(242, 193, 78, 0.28);
  border-radius: 8px;
  background: #f7f3e8;
  color: #15191c;
  line-height: 1.7;
}

.modal-description a {
  color: #0b6b3a;
}

.modal-description img {
  max-width: 100%;
  height: auto;
}

.source-modal-panel {
  width: min(760px, 100%);
}

.source-modal-head {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.source-modal-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: start;
}

.source-format-card {
  padding: 10px 12px;
  border: 1px solid rgba(123, 216, 143, 0.18);
  border-radius: 8px;
  background: rgba(17, 21, 24, 0.72);
}

.source-format-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.source-format-card code {
  display: block;
  overflow: hidden;
  color: #dbe3e3;
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-submit-form {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.source-submit-form button {
  width: auto;
  justify-self: end;
  min-width: 132px;
}

.source-submit-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.source-submit-status.success {
  color: var(--accent);
}

.source-submit-status.error {
  color: var(--danger);
}

.source-points-help {
  margin-top: -6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.source-points-help a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(123, 216, 143, 0.36);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  background: rgba(123, 216, 143, 0.08);
}

.source-points-help a:hover {
  border-color: var(--accent);
  background: rgba(123, 216, 143, 0.16);
}

.my-sources-panel {
  width: min(860px, 100%);
}

.my-sources-panel .modal-head {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.my-sources-panel .modal-head-actions {
  min-width: 0;
}

.my-sources-status {
  padding: 14px 20px 0;
  color: var(--muted);
  font-size: 14px;
}

.my-sources-list {
  display: grid;
  gap: 10px;
  max-height: calc(84vh - 148px);
  overflow: auto;
  padding: 14px 20px 20px;
}

.heat-modal-panel {
  width: min(460px, 100%);
}

.heat-modal-panel .modal-head {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.heat-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 20px;
}

.heat-modal-body label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.heat-modal-body select {
  width: 100%;
  height: 42px;
  border-color: rgba(123, 216, 143, 0.28);
  color: var(--accent);
  font-weight: 800;
}

.heat-cost-text,
.heat-modal-status {
  min-height: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.heat-cost-text {
  color: var(--accent-2);
}

.heat-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.heat-modal-actions button {
  width: auto;
  min-width: 96px;
  height: 38px;
  padding: 0 14px;
}

.heat-modal-actions button:first-child {
  border-color: var(--line);
  background: #111518;
  color: var(--muted);
}

.my-source-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 21, 24, 0.78);
}

.my-source-card a {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-source-card a:hover {
  color: var(--accent);
}

.my-source-meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.my-source-time {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

body.modal-locked {
  overflow: hidden;
}

@media (max-width: 860px) {
  .filters {
    grid-template-columns: repeat(2, 1fr);
  }

  .hot-sales-hero {
    flex-direction: column;
  }

  .hot-sales-insights {
    grid-template-columns: 1fr;
  }

  .hot-sales-keyword {
    flex: 1 1 220px;
  }

  .hot-goods-card {
    grid-template-columns: 34px 64px minmax(0, 1fr);
  }

  .hot-goods-side {
    grid-column: 3;
    justify-items: start;
    text-align: left;
  }

  .goods {
    grid-template-columns: 72px minmax(0, 1fr);
    min-height: 0;
  }

  .goods.no-image {
    grid-template-columns: 1fr;
  }

  .goods-actions {
    grid-column: 1 / -1;
    align-items: flex-start;
    justify-content: flex-start;
    border-right: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
  }

  .goods-side {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
  }

  .goods-side .price {
    grid-row: auto;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-submit-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-submit-actions {
    flex-wrap: wrap;
  }

  .advanced-search {
    grid-template-columns: 1fr;
  }

  .search-field-options {
    justify-content: flex-start;
  }

  .auth-user {
    text-align: left;
  }

  .notice-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .banner-marquee {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .query-row {
    grid-template-columns: 1fr;
  }

  .keyword-input-shell #keyword {
    flex-basis: 100px;
    min-width: 80px;
  }

  .keyword-match-control {
    flex-basis: 160px;
    width: 160px;
  }

  .keyword-match-control.is-open {
    flex-basis: 100%;
    width: 100%;
    margin-bottom: 95px;
  }

  .keyword-match-trigger {
    padding-left: 8px;
    font-size: 12px;
  }

  .keyword-tag > span {
    max-width: min(210px, 60vw);
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .result-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
  }

  .login-gate {
    grid-template-columns: 1fr;
  }

  .login-gate span,
  .login-gate .tg-login {
    grid-column: 1;
    grid-row: auto;
  }

  .goods {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .hot-sales-title {
    align-items: flex-start;
  }

  .hot-sales-fire {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 20px;
  }

  .hot-sales-title h2 {
    font-size: 21px;
  }

  .hot-sales-trend {
    gap: 3px;
    height: 112px;
  }

  .hot-sales-keyword {
    flex: 1 1 100%;
    min-width: 0;
  }

  .hot-sales-scope-button,
  .hot-sales-scope-link {
    width: auto;
  }

  .hot-trend-popup {
    min-width: 120px;
    padding: 7px 8px;
  }

  .hot-goods-card {
    grid-template-columns: 30px 56px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .hot-goods-image-wrap {
    width: 56px;
    height: 56px;
  }

  .hot-goods-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hot-goods-name {
    white-space: normal;
  }

  .goods-image {
    width: 64px;
    height: 64px;
  }

  .goods-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .goods-side {
    grid-template-columns: 1fr;
  }

  .modal {
    padding: 10px;
  }

  .modal-panel {
    max-height: calc(100vh - 20px);
  }

  .modal-head {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .source-modal-head {
    grid-template-columns: 1fr;
  }

  .source-modal-side {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .modal-stats,
  .modal-head-actions {
    padding-left: 14px;
    padding-right: 14px;
  }

  .modal-head-actions {
    justify-content: flex-start;
    min-width: 0;
    padding: 0;
  }

  .modal-contact {
    padding: 0 14px;
  }

  .modal-description {
    max-height: calc(100vh - 260px);
    margin: 12px 14px 14px;
  }

  .realtime-widget {
    right: 10px;
    bottom: 10px;
    min-width: 118px;
    padding: 8px 10px;
  }
}
