:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface2: #eef0f5;
  --border: #e2e5ec;
  --border2: #c4c9d4;
  --text: #1a1d23;
  --muted: #6b7280;
  --muted2: #4b5563;
  --accent: #6d28d9;
  --accent2: #7c3aed;
  --green: #059669;
  --blue: #2563eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--surface2);
}

::-webkit-scrollbar-thumb {
  background: #cbd1dc;
  border-radius: 999px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  max-width: 1400px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 12px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 148px;
  height: auto;
  object-fit: contain;
}

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

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 12px;
}

.live-dot::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.live-dot.syncing {
  color: #f59e0b;
}

.gas-pill {
  color: var(--muted2);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.wallet-balance {
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.wallet-button,
.lang-toggle {
  min-width: 44px;
  padding: 5px 10px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted2);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wallet-button {
  min-width: 82px;
  color: var(--text);
  text-align: center;
}

.wallet-control {
  position: relative;
}

.wallet-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  width: 240px;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  padding: 6px;
}

.wallet-menu-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  padding: 8px 8px 10px;
}

.wallet-menu-head span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.wallet-menu-head strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1;
}

.wallet-menu-section {
  padding-top: 6px;
}

.wallet-menu-title {
  padding: 4px 8px 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.hidden-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.hidden-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 8px;
  padding: 7px 8px;
}

.hidden-item span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden-item button {
  flex: 0 0 auto;
  border: 1px solid rgba(5, 150, 105, 0.26);
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.08);
  color: var(--green);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 7px;
}

.wallet-button.connected {
  border-color: rgba(5, 150, 105, 0.4);
  background: rgba(5, 150, 105, 0.08);
  color: var(--green);
}

.wallet-button:hover,
.lang-toggle:hover {
  border-color: var(--accent2);
  color: var(--text);
}

.x-link {
  color: rgba(0, 0, 0, 0.55);
  font-size: 13px;
  font-weight: 700;
}

.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 22px 24px;
}

.grid {
  display: grid;
  height: calc(100vh - 112px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.panel-head {
  display: flex;
  min-height: 50px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.list {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 12px;
}

.collection-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.collection-card:hover {
  border-color: var(--border2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.collection-card.compact {
  cursor: default;
}

.avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  object-fit: cover;
}

.avatar.small {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.avatar.glyph {
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 19px;
}

.card-main {
  min-width: 0;
  flex: 1;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.title {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.symbol {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.mint-badge {
  margin-left: auto;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}

.meta-row,
.links-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.links-row {
  margin-top: 5px;
}

.links-row a {
  color: var(--muted2);
}

.links-row a:hover {
  color: var(--accent2);
}

.ranked-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}

.rank {
  padding-top: 13px;
  color: #9ca3af;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-align: right;
}

.ranked-body {
  min-width: 0;
}

.window-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.window-tabs button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 2px 6px;
}

.window-tabs button:hover {
  color: var(--muted2);
}

.window-tabs button.active {
  background: rgba(5, 150, 105, 0.12);
  color: var(--green);
}

.runner-header,
.runner-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 66px 52px 72px;
  align-items: center;
  gap: 8px;
}

.runner-header {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  color: #9ca3af;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 10px 12px 6px;
  text-transform: uppercase;
}

.runner-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted2);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  padding: 10px 12px;
}

.runner-name {
  overflow: hidden;
  color: var(--text);
  font-family: Inter, sans-serif;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor,
.runner-source {
  color: var(--blue);
}

.sales {
  color: var(--green);
  font-weight: 700;
  text-align: center;
}

.supply {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #9ca3af;
  font-size: 12px;
}

.mobile-tabs {
  display: none;
}

.mint-flow-enter {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-14px) scale(0.988);
  transform-origin: top center;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition:
    max-height 520ms cubic-bezier(0.2, 0.85, 0.22, 1),
    opacity 240ms ease-out,
    transform 520ms cubic-bezier(0.2, 0.85, 0.22, 1),
    box-shadow 520ms ease-out,
    border-color 520ms ease-out;
  transition-delay: var(--flow-delay, 0ms);
  will-change: max-height, opacity, transform;
}

.mint-flow-enter.is-visible {
  max-height: var(--flow-height, 92px);
  opacity: 1;
  transform: translateY(0) scale(1);
  border-color: rgba(5, 150, 105, 0.32);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.mint-flow-shift {
  transition: transform 520ms cubic-bezier(0.2, 0.85, 0.22, 1);
  will-change: transform;
}

/* Compact detail bar */
.detail-bar {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.detail-content {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(300px, 1.3fr) minmax(285px, 0.85fr) minmax(320px, 1.15fr) minmax(320px, 1.1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.dc-empty {
  display: flex;
  min-height: 54px;
  grid-column: 1 / -1;
  flex-direction: column;
  justify-content: center;
  color: var(--muted);
}

.dc-empty-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.dc-empty-sub {
  margin-top: 3px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.dc-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.detail-content .dc-img {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  object-fit: cover;
  flex-shrink: 0;
}

.detail-content .dc-glyph {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--muted);
  flex-shrink: 0;
}

.dc-titleblock {
  flex: 1 1 auto;
  min-width: 0;
}

.dc-name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.detail-content .dc-name {
  flex: 0 1 auto;
  overflow: hidden;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-content .dc-sym {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
}

.detail-content .dc-contract {
  display: inline-flex;
  position: relative;
  margin-top: 5px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.detail-content .dc-contract code {
  color: var(--muted2);
  font-weight: 600;
}

.source-verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--green);
  font-family: Inter, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.source-check {
  display: inline-grid;
  width: 14px;
  height: 14px;
  place-items: center;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.12);
  color: var(--green);
  font-size: 10px;
  font-weight: 900;
}

.copy-contract {
  display: inline-grid;
  position: relative;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--muted2);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.copy-contract:hover {
  border-color: var(--accent2);
  color: var(--text);
}

.copy-contract svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.dc-icon-link svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.copy-contract.copied {
  border-color: rgba(5, 150, 105, 0.45);
  background: rgba(5, 150, 105, 0.08);
  color: var(--green);
}

.dc-mintbox {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  border-left: 1px solid rgba(15, 23, 42, 0.12);
  padding: 2px 0 2px 12px;
}

.mint-action-row {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.mint-qty-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mint-qty {
  width: 46px;
  height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.mint-qty::-webkit-outer-spin-button,
.mint-qty::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.mint-exec {
  position: relative;
  height: 30px;
  min-width: 68px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  cursor: default;
  font-size: 12px;
  font-weight: 900;
  padding: 0 13px;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.mint-exec span {
  position: relative;
  z-index: 1;
}

.mint-exec.ready {
  border-color: #047857;
  background: #064e3b;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.mint-exec.ready:hover {
  border-color: #065f46;
  background: #047857;
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.18);
  transform: translateY(-1px);
}

.mint-exec.ready:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.22);
}

.mint-exec:disabled {
  opacity: 1;
}

.paid-toggle-label {
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  padding: 0 7px;
  white-space: nowrap;
}

.paid-toggle-label input {
  width: 12px;
  height: 12px;
  accent-color: #047857;
  cursor: pointer;
  margin: 0;
}

.mint-estimate {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mint-estimate.ready {
  border-color: rgba(5, 150, 105, 0.28);
  background: #ecfdf5;
  color: #047857;
}

.dc-stats,
.dc-meta {
  display: grid;
  min-width: 0;
  gap: 0;
}

.dc-stats {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
}

.dc-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-content .dc-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  gap: 2px;
  border-left: 1px solid var(--border);
  padding-left: 11px;
  white-space: nowrap;
}

.detail-content .dc-stat.strong {
  border-left-color: rgba(5, 150, 105, 0.35);
}

.detail-content .dc-stat.supply-meter {
  gap: 6px;
  padding-right: 12px;
}

.supply-meter-head {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 220px;
  max-width: 100%;
}

.supply-meter-value {
  overflow: hidden;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
}

.supply-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(2px, 1fr));
  gap: 2px;
  width: 100%;
  max-width: 220px;
}

.supply-bars span {
  height: 20px;
  border-radius: 3px;
  background: rgba(5, 150, 105, 0.24);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.08);
}

.supply-bars span.lit {
  background: linear-gradient(180deg, rgba(52, 211, 153, 1) 0%, rgba(5, 150, 105, 0.92) 100%);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.16), inset 0 0 0 1px rgba(5, 150, 105, 0.16);
}

.supply-meter.unknown .supply-bars span {
  background: rgba(107, 114, 128, 0.18);
  box-shadow: inset 0 0 0 1px rgba(107, 114, 128, 0.08);
}

.detail-content .dc-stat .dc-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.detail-content .dc-stat .dc-val-row {
  display: inline-flex;
  min-width: 0;
  align-items: baseline;
  gap: 7px;
}

.detail-content .dc-stat .dc-val {
  overflow: hidden;
  color: var(--text);
  font-weight: 750;
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.detail-content .dc-stat .dc-sub {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  line-height: 1.2;
}

.detail-content .dc-stat.deployer .dc-val a {
  color: inherit;
  text-decoration: none;
}

.detail-content .dc-stat.deployer .dc-val a:hover {
  color: var(--accent2);
}

.detail-content .dc-links {
  display: flex;
  flex-direction: row;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 8px;
  margin-left: 3px;
  justify-content: flex-start;
  max-width: none;
}

.dc-icon-link {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: var(--muted2);
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.dc-icon-link:hover {
  color: var(--text);
  opacity: 0.86;
  transform: translateY(-1px);
}

.dc-icon-link.x {
  color: #111827;
}

.dc-icon-link.block:hover {
  color: #dc2626;
}

.dc-icon-link.web:hover {
  color: var(--blue);
}

.dc-icon-link.opensea:hover,
.dc-icon-link.etherscan:hover {
  color: var(--accent2);
}

@media (max-width: 1280px) {
  .detail-content {
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.85fr);
  }

  .dc-stats,
  .dc-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dc-mintbox {
    border-left: 1px solid var(--border);
  }
}

@media (max-width: 1023px) {
  .topbar-inner,
  .page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .grid {
    display: block;
    height: calc(100vh - 150px);
  }

  .view {
    display: none;
    height: 100%;
  }

  .view.active {
    display: flex;
  }

  .mobile-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 4px;
  }

  .tab {
    flex: 1;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 9px;
  }

  .tab.active {
    background: var(--accent);
    color: #ffffff;
  }

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

  .dc-stats,
  .dc-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dc-mintbox {
    flex-wrap: wrap;
    border-left: 0;
    border-top: 1px solid var(--border);
    gap: 8px;
    padding-top: 10px;
    padding-left: 0;
  }

  .mint-estimate {
    max-width: 100%;
  }

  .detail-content .dc-links {
    flex-wrap: wrap;
    flex-direction: row;
  }

  .dc-icon-link {
    width: 28px;
    height: 28px;
  }
}
