:root {
  --bg: #09111d;
  --bg-soft: #101a29;
  --panel: rgba(159, 203, 255, 0.055);
  --line: rgba(159, 203, 255, 0.12);
  --line-strong: rgba(53, 226, 192, 0.42);
  --text: #edf5ff;
  --muted: #7f94b4;
  --muted-strong: #bfd0ea;
  --green: #35e2c0;
  --green-soft: rgba(53, 226, 192, 0.18);
  --blue: #5d84ff;
  --gold: #e3c25f;
  --gold-soft: rgba(216, 180, 72, 0.2);
  --red: #ff6b7a;
  --shell-width: 1200px;
  --input-width: 500px;
  --side-width: 66px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(circle at 50% -8%, rgba(116, 183, 255, 0.2), transparent 34%),
    radial-gradient(circle at 12% 8%, rgba(53, 226, 192, 0.08), transparent 24%),
    radial-gradient(circle at 88% 12%, rgba(93, 132, 255, 0.1), transparent 28%),
    var(--bg);
  color: var(--text);
  font-family:
    "Segoe UI Variable Display",
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  font-size: 14.4px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.app-shell {
  width: min(calc(100% - 32px), var(--shell-width));
  margin: 0 auto;
  padding: 0 0 40px;
}

.app-shell.is-idle {
  min-height: 100svh;
}

.hero {
  width: 100%;
  padding-top: 132px;
}

.app-shell.is-idle .hero {
  padding-top: 132px;
}

.brand-shell {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  transform: translateY(-50px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
}

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  filter: drop-shadow(0 10px 28px rgba(61, 120, 255, 0.18));
}

.brand-copy {
  min-width: 0;
}

.brand-kicker {
  display: block;
  color: #8eb8ff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-name {
  margin: 3px 0 0;
  color: #f4f8ff;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
}

.brand-tagline {
  margin: 5px 0 0;
  max-width: 430px;
  color: var(--muted);
  font-size: 10.4px;
  line-height: 15px;
}

.command-form {
  display: grid;
  gap: 0;
}

.chain-switch {
  display: inline-flex;
  justify-content: center;
  gap: 10px;
}

.chain-chip {
  min-width: 50px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-10px);
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.chain-chip[data-chain="bsc"] {
  color: #d6bb63;
  border-color: rgba(227, 194, 95, 0.22);
  background: rgba(227, 194, 95, 0.06);
}

.chain-chip[data-chain="sol"] {
  color: #bdaeff;
  border-color: rgba(124, 92, 255, 0.24);
  background: rgba(124, 92, 255, 0.06);
}

.chain-chip.is-active[data-chain="bsc"] {
  color: #f0d57b;
  border-color: rgba(227, 194, 95, 0.42);
  background: rgba(227, 194, 95, 0.18);
  box-shadow: 0 0 0 1px rgba(227, 194, 95, 0.08);
}

.chain-chip.is-active[data-chain="sol"] {
  color: #d7cbff;
  border-color: rgba(124, 92, 255, 0.44);
  background: rgba(124, 92, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(124, 92, 255, 0.08);
}

.search-line {
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, var(--input-width)) var(--side-width);
  align-items: start;
  column-gap: 4px;
  justify-content: center;
}

.search-side {
  width: var(--side-width);
}

.search-side-left {
  visibility: hidden;
}

.search-input-wrap {
  display: grid;
  row-gap: 5px;
  width: min(100%, var(--input-width));
}

.search-side-right {
  align-self: start;
}

#address-input {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(159, 203, 255, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(8, 16, 29, 0.78);
  color: var(--text);
  outline: none;
  font-size: 10.4px;
  line-height: 1;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

#address-input::placeholder {
  color: var(--muted);
}

#address-input:focus {
  border-color: rgba(116, 183, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(93, 132, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    rgba(8, 16, 29, 0.86);
}

.query-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 28px;
  padding: 0 7px;
  border-radius: 9px;
  background: linear-gradient(135deg, #668dff, #4d63ff 58%, #3bb7ff);
  color: #fff;
  cursor: pointer;
  font-size: 10.4px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(72, 104, 255, 0.22);
  transition: transform 140ms ease, opacity 140ms ease, box-shadow 140ms ease;
}

.query-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(72, 104, 255, 0.28);
}

.query-button:disabled {
  opacity: 0.78;
  cursor: progress;
}

.trace-panel {
  width: 100%;
  margin: 0;
  padding-top: 5px;
}

.trace-panel.is-hidden {
  display: none;
}

.trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trace-head,
.query-feedback {
  display: none;
}

.trace-head strong {
  font-size: 12px;
  font-weight: 600;
}

.trace-progress {
  color: var(--muted);
  font-size: 11.2px;
}

.query-feedback {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.query-feedback:empty {
  display: none;
}

.query-feedback.is-loading {
  color: #95b6ff;
}

.query-feedback.is-success {
  color: var(--green);
}

.query-feedback.is-error {
  color: var(--red);
}

.trace-list {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: 0;
  overflow: hidden;
}

.trace-item {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  color: var(--muted);
  min-width: 0;
  width: auto;
  flex: 0 0 auto;
}

.trace-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
  flex: 0 0 auto;
}

.trace-copy strong {
  display: block;
  font-size: 10.4px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trace-item.is-done,
.trace-item.is-done .trace-marker {
  color: var(--green);
  border-color: rgba(0, 192, 135, 0.22);
}

.trace-item.is-active,
.trace-item.is-active .trace-marker {
  color: #8eb8ff;
  border-color: rgba(92, 96, 245, 0.28);
}

.trace-item.is-error,
.trace-item.is-error .trace-marker {
  color: var(--red);
  border-color: rgba(255, 107, 122, 0.24);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.97fr);
  gap: 32px;
  padding-left: calc((100% - (var(--input-width) + var(--side-width) * 2)) / 2 + var(--side-width));
  padding-top: 28px;
}

.workspace.is-hidden {
  display: none;
}

.workspace.is-empty-results {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.is-empty-results .results-list {
  border-top: 0;
}

.workspace.is-empty-results .detail-column {
  display: none;
}

.result-column,
.detail-column {
  min-width: 0;
}

.column-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 24px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.8px;
  line-height: 16px;
}

.results-list {
  display: block;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 20px 0 8px;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 13px;
}

.candidate-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 14px 10px 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.candidate-card:hover {
  background: rgba(159, 203, 255, 0.04);
}

.candidate-card.is-selected {
  background:
    linear-gradient(180deg, rgba(159, 203, 255, 0.05), rgba(159, 203, 255, 0.03)),
    rgba(255, 255, 255, 0.01);
  box-shadow: inset 2px 0 0 var(--green);
}

.candidate-time {
  padding-top: 2px;
  color: var(--muted);
  font-size: 10.8px;
  line-height: 16px;
  white-space: nowrap;
}

.candidate-main {
  min-width: 0;
}

.candidate-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.candidate-pill-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.chain-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d7e4ff;
  font-size: 9.4px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid rgba(159, 203, 255, 0.16);
}

.chain-badge.is-bsc {
  background: rgba(227, 194, 95, 0.15);
  border-color: rgba(227, 194, 95, 0.28);
  color: #f1cc62;
}

.chain-badge.is-sol {
  background: rgba(153, 119, 255, 0.14);
  border-color: rgba(153, 119, 255, 0.28);
  color: #c8b6ff;
}

.candidate-score {
  margin-left: auto;
  padding-top: 1px;
  color: var(--green);
  font-size: 10.8px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
}

.candidate-address {
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 11.8px;
  font-weight: 600;
  line-height: 17px;
  word-break: break-all;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d8dde6;
  font-size: 9.4px;
  font-weight: 600;
  line-height: 1;
}

.tag-transfer {
  background: rgba(96, 165, 250, 0.13);
  border-color: rgba(96, 165, 250, 0.3);
  color: #9fcbff;
}

.tag-high {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.3);
  color: #ffd27a;
}

.tag-sink {
  background: rgba(167, 139, 250, 0.13);
  border-color: rgba(167, 139, 250, 0.28);
  color: #cdb9ff;
}

.tag-binance {
  background: rgba(245, 199, 87, 0.14);
  border-color: rgba(245, 199, 87, 0.28);
  color: #f2cf72;
}

.tag-gate {
  background: rgba(45, 212, 191, 0.14);
  border-color: rgba(45, 212, 191, 0.28);
  color: #8ef0e0;
}

.tag-okx {
  background: rgba(129, 140, 248, 0.14);
  border-color: rgba(129, 140, 248, 0.28);
  color: #bbc2ff;
}

.tag-bybit {
  background: rgba(251, 146, 60, 0.14);
  border-color: rgba(251, 146, 60, 0.28);
  color: #ffbf84;
}

.tag-kucoin {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.28);
  color: #8cf0bf;
}

.tag-mexc {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
  color: #89e8a9;
}

.tag-bitget {
  background: rgba(217, 70, 239, 0.14);
  border-color: rgba(217, 70, 239, 0.28);
  color: #eda7ff;
}

.tag-generic {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #d8dde6;
}

.copy-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 0 8px;
  border: 1px solid rgba(53, 226, 192, 0.34);
  border-radius: 999px;
  background: rgba(53, 226, 192, 0.12);
  color: #9af7de;
  font-size: 9.4px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease,
    transform 0.18s ease;
}

.copy-pill:hover {
  background: rgba(53, 226, 192, 0.18);
  border-color: rgba(53, 226, 192, 0.42);
  color: #b8ffe8;
}

.copy-pill.is-copied {
  background: var(--green);
  border-color: var(--green);
  color: #04120d;
  box-shadow: 0 0 0 1px rgba(0, 192, 135, 0.16), 0 0 14px rgba(0, 192, 135, 0.24);
  transform: translateY(-1px);
}

.detail-column {
  align-self: start;
  padding-left: 28px;
  padding-top: 30px;
}

.detail-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.8px;
  line-height: 16px;
  letter-spacing: 0.04em;
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.detail-copy {
  min-width: 0;
}

.detail-copy h2 {
  margin: 0;
  font-size: 12.8px;
  font-weight: 800;
  line-height: 18px;
  word-break: break-all;
}

#detail-relation {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.8px;
  line-height: 16px;
}

.detail-score {
  color: var(--green);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.detail-summary {
  margin: 10px 0 0;
  color: #d9dee6;
  font-size: 11.8px;
  line-height: 17px;
}

.detail-summary:empty {
  display: none;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.8px;
  line-height: 16px;
}

.evidence-list {
  display: block;
}

.evidence-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.evidence-item header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.evidence-item strong {
  font-size: 11.8px;
  font-weight: 700;
  line-height: 17px;
}

.evidence-item span {
  color: var(--green);
  font-size: 10.8px;
  font-weight: 700;
  line-height: 16px;
}

.evidence-item p {
  margin: 5px 0 0;
  color: var(--muted-strong);
  font-size: 10.8px;
  line-height: 16px;
}

@media (max-width: 1100px) {
  :root {
    --input-width: min(540px, calc(100vw - 156px));
    --side-width: 62px;
  }
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-left: 0;
  }

  .detail-column {
    padding-left: 0;
    padding-top: 16px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  :root {
    --side-width: 0px;
  }

  .app-shell {
    width: calc(100% - 44px);
    max-width: 100%;
  }

  .hero {
    padding-top: 122px;
  }

  .app-shell.is-idle .hero {
    padding-top: 122px;
  }

  .brand-shell {
    margin-bottom: 14px;
  }

  .brand-lockup {
    gap: 10px;
    padding: 0;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-kicker {
    font-size: 8.6px;
  }

  .brand-name {
    font-size: 18px;
  }

  .brand-tagline {
    margin-top: 4px;
    font-size: 9.4px;
    line-height: 13px;
  }

  .command-form {
    gap: 6px;
  }

  .chain-switch {
    gap: 8px;
  }

  .search-line {
    grid-template-columns: 1fr;
    row-gap: 8px;
    width: 100%;
  }

  .search-side {
    width: auto;
  }

  .search-side-left {
    display: none;
  }

  .search-input-wrap,
  .search-side-right,
  .query-button {
    width: 100%;
  }

  .search-input-wrap {
    padding-left: 4px;
    padding-right: 4px;
  }

  .trace-panel {
    padding-top: 6px;
  }

  .trace-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    justify-content: flex-start;
    overflow: visible;
  }

  .trace-item {
    flex: 0 0 auto;
    width: auto;
    gap: 5px;
  }

  .trace-marker {
    width: 12px;
    height: 12px;
    font-size: 8px;
  }

  .trace-copy strong {
    font-size: 9.4px;
    line-height: 12px;
  }

  #address-input,
  .query-button {
    min-height: 40px;
  }

  #address-input {
    padding: 0 6px;
    font-size: 13px;
  }

  .query-button {
    font-size: 15px;
  }

  .query-button {
    border-radius: 18px;
  }

  .workspace,
  .result-column,
  .detail-column,
  .results-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .workspace {
    gap: 14px;
    padding-top: 18px;
  }

  .column-head {
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 15px;
  }

  .candidate-card {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 10px 16px;
  }

  .candidate-time {
    padding-top: 0;
    font-size: 10px;
    line-height: 15px;
  }

  .candidate-topline {
    gap: 8px;
  }

  .candidate-pill-row {
    gap: 4px;
  }

  .chain-badge,
  .tag,
  .copy-pill {
    min-height: 15px;
    padding: 0 6px;
    font-size: 8.8px;
  }

  .candidate-score {
    font-size: 10px;
    line-height: 15px;
  }

  .candidate-address {
    margin-top: 4px;
    font-size: 10.8px;
    line-height: 15px;
  }

  .detail-head,
  .trace-head,
  .column-head {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-column {
    padding-top: 14px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .detail-label {
    margin-bottom: 4px;
    font-size: 10px;
    line-height: 15px;
  }

  .detail-copy h2 {
    font-size: 11.6px;
    line-height: 16px;
  }

  #detail-relation {
    font-size: 10px;
    line-height: 15px;
  }

  .detail-score {
    font-size: 20px;
  }

  .detail-summary {
    margin-top: 8px;
    font-size: 10.8px;
    line-height: 15px;
  }

  .detail-stats {
    gap: 8px;
    margin-top: 8px;
    padding-bottom: 8px;
    font-size: 10px;
    line-height: 15px;
  }

  .evidence-item {
    padding: 8px 0;
  }

  .evidence-item strong,
  .evidence-item p,
  .evidence-item span {
    font-size: 10px;
    line-height: 15px;
  }
}

@media (max-width: 480px) {
  .hero,
  .app-shell.is-idle .hero {
    padding-top: 112px;
  }

  .app-shell {
    width: min(calc(100% - 52px), var(--shell-width));
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-tagline {
    max-width: 250px;
  }

  .candidate-card {
    padding: 10px 14px;
  }

  .detail-column {
    padding-top: 12px;
    padding-left: 4px;
    padding-right: 4px;
  }

  #address-input,
  .query-button {
    min-height: 42px;
  }

  #address-input {
    padding: 0 6px;
    font-size: 12.5px;
  }

  .query-button {
    font-size: 14px;
  }
}

.brand-shell {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  transform: translateY(-50px);
}

.brand-grid {
  display: grid;
  grid-template-columns: var(--side-width) minmax(0, var(--input-width)) var(--side-width);
  align-items: start;
  column-gap: 4px;
  width: calc(var(--input-width) + var(--side-width) * 2 + 8px);
}

.brand-spacer {
  width: var(--side-width);
}

.brand-lockup {
  grid-column: 2;
  justify-self: start;
}

.lang-slot {
  grid-column: 3;
  justify-self: end;
  align-self: start;
  padding-right: 14px;
  transform: translateY(-2px);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-top: 0;
}

.lang-chip {
  min-width: 28px;
  min-height: 18px;
  padding: 0 7px;
  border: 1px solid rgba(159, 203, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-size: 9.2px;
  font-weight: 700;
  line-height: 1;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.lang-chip.is-active {
  border-color: rgba(116, 183, 255, 0.34);
  background: rgba(116, 183, 255, 0.12);
  color: #dfeaff;
}

@media (max-width: 720px) {
  .brand-grid {
    position: relative;
    display: block;
    width: 100%;
  }

  .brand-spacer {
    display: none;
  }

  .brand-lockup {
    display: inline-flex;
    max-width: calc(100% - 52px);
    padding-right: 12px;
  }

  .lang-slot {
    position: absolute;
    top: 0;
    right: 0;
    grid-column: auto;
    justify-self: auto;
    align-self: start;
    padding-right: 0;
    transform: none;
  }

  .lang-switch {
    padding-top: 0;
  }

  .lang-chip {
    min-width: 30px;
    min-height: 20px;
    padding: 0 8px;
    font-size: 9.2px;
  }
}

@media (max-width: 480px) {
  .brand-lockup {
    max-width: calc(100% - 46px);
    padding-right: 10px;
  }

  .lang-chip {
    min-width: 28px;
    min-height: 18px;
    padding: 0 7px;
    font-size: 8.8px;
  }
}
