:root {
  --bg: #07080c;
  --surface: #10131b;
  --surface-2: #161b25;
  --surface-3: #1d2430;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f9ff;
  --muted: #9da8ba;
  --muted-2: #707b8d;
  --gold: #f7c948;
  --gold-2: #f59e0b;
  --cyan: #22d3ee;
  --green: #7ddc64;
  --red: #ff4d5f;
  --ink: #08090d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 28px),
    linear-gradient(180deg, #07080c 0%, #0d1117 48%, #090a0e 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.04), transparent 24%, transparent 76%, rgba(247, 201, 72, 0.04)),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 34px 35px);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

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

.site-shell {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 8, 12, 0.86);
  backdrop-filter: blur(18px);
}

.nav-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(247, 201, 72, 0.26));
}

.brand-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.brand strong {
  font-size: 1.08rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand small {
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  justify-self: center;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.nav-actions {
  justify-self: end;
}

.nav-link,
.nav-link-btn {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link-btn:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

.nav-link:hover,
.nav-link-btn:hover {
  transform: translateY(-1px);
}

.primary-btn,
.ghost-btn,
.card-btn,
.icon-btn,
.category-btn {
  border: 0;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn,
.ghost-btn,
.card-btn,
.category-btn {
  min-height: 44px;
  padding: 0 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
}

.primary-btn {
  color: #121212;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.2);
}

.ghost-btn,
.card-btn,
.category-btn {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.primary-btn:hover,
.ghost-btn:hover,
.card-btn:hover,
.category-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn:hover,
.card-btn:hover,
.category-btn:hover,
.icon-btn:hover {
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
}

.nav-actions .sell-btn,
.hero-sell-btn {
  width: auto;
  height: auto;
  min-height: 44px;
  margin: 0;
  color: #09100d;
  border: 1px solid rgba(125, 220, 100, 0.5);
  background: linear-gradient(135deg, #9ef06d, var(--green));
  box-shadow: 0 14px 30px rgba(125, 220, 100, 0.14);
}

.nav-login-btn {
  min-width: 92px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  font-size: 1.25rem;
}

.eyebrow {
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(247, 201, 72, 0.25);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--gold);
  background: rgba(247, 201, 72, 0.1);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

.market-hero__media,
.market-hero__overlay {
  position: absolute;
  inset: 0;
}

.market-hero__media {
  z-index: -3;
}

.market-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.08) contrast(1.08) brightness(0.52);
}

.market-hero__overlay {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 8, 12, 0.94), rgba(7, 8, 12, 0.62) 48%, rgba(7, 8, 12, 0.82)),
    linear-gradient(180deg, rgba(7, 8, 12, 0.22), #07080c 100%),
    repeating-linear-gradient(90deg, transparent 0 60px, rgba(255, 255, 255, 0.035) 60px 61px);
}

.market-hero__content {
  min-height: 360px;
  padding: 52px 0 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: 42px;
}

.market-hero__copy {
  max-width: 760px;
  display: grid;
  gap: 18px;
}

.market-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 950;
  text-transform: uppercase;
}

.market-hero p {
  max-width: 620px;
  margin: 0;
  color: #d8deea;
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.market-stats {
  display: grid;
  gap: 12px;
}

.stat-tile {
  min-height: 94px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 8px;
  align-content: center;
  background: rgba(15, 18, 25, 0.72);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.stat-tile span {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 950;
}

.stat-tile strong {
  font-size: 1.08rem;
}

.topup-section {
  padding: 30px 0 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0)),
    #07080c;
}

.section-heading {
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.05;
  font-weight: 950;
}

.section-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-weight: 700;
}

.topup-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.86fr) minmax(0, 1.5fr);
  gap: 16px;
  align-items: stretch;
}

.topup-feature {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: var(--text);
  background: #11151d;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.topup-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 8, 12, 0.02), rgba(7, 8, 12, 0.86)),
    linear-gradient(90deg, rgba(247, 201, 72, 0.16), transparent 58%);
}

.topup-feature img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
  transition: transform 0.24s ease;
}

.topup-feature:hover img {
  transform: scale(1.035);
}

.topup-feature__content {
  width: 100%;
  padding: 24px;
  display: grid;
  gap: 8px;
}

.topup-feature__content span {
  width: fit-content;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topup-feature__content strong {
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  line-height: 1;
  font-weight: 950;
  text-transform: uppercase;
}

.topup-feature__content p {
  max-width: 360px;
  margin: 0;
  color: #d8deea;
  line-height: 1.5;
}

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

.topup-game-card {
  position: relative;
  min-width: 0;
  min-height: 205px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    #10131b;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.topup-game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), transparent 42%, rgba(247, 201, 72, 0.09));
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.topup-game-card:hover {
  transform: translateY(-3px);
  border-color: rgba(247, 201, 72, 0.34);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.38);
}

.topup-game-card:hover::before {
  opacity: 1;
}

.topup-game-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #ff4d5f, #d71933);
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.06em;
}

.topup-game-badge--new {
  color: #071013;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.topup-game-media {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(247, 201, 72, 0.08)),
    #181d27;
}

.topup-game-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.topup-game-card:hover .topup-game-media img {
  transform: scale(1.04);
}

.topup-game-body {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.topup-game-body h3 {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 950;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.topup-game-body span {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  color: #111;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  white-space: nowrap;
}

.payment-strip {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
  font-weight: 850;
}

.payment-strip img {
  width: auto;
  height: 28px;
  border-radius: 7px;
}

.browse-section {
  padding: 28px 0 46px;
}

.market-terminal-actions {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.terminal-seller-btn,
.terminal-message-link,
.terminal-reset-btn {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.terminal-seller-btn {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 9px;
  color: #0d0e0f;
  background: linear-gradient(135deg, #ffd84d, #f7c948);
  box-shadow: 0 10px 24px rgba(247, 201, 72, 0.16);
  font-size: 1rem;
}

.terminal-seller-btn svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terminal-seller-btn:hover,
.terminal-message-link:hover,
.terminal-reset-btn:hover {
  transform: translateY(-1px);
}

.terminal-message-link {
  min-height: 44px;
  color: #b8cdf0;
  font-size: 1rem;
}

.terminal-message-link:hover,
.terminal-reset-btn:hover {
  color: var(--text);
}

.terminal-reset-row {
  margin: 36px 0 18px;
}

.terminal-reset-btn {
  min-height: 38px;
  padding: 0;
  color: #b8cdf0;
  background: transparent;
  font-size: 0.98rem;
}

.toolbar-card,
.status-card,
.market-card,
.detail-modal__content,
.composer-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    var(--surface);
  box-shadow: var(--shadow);
}

.toolbar-card,
.status-card {
  border-radius: 9px;
  padding: 18px;
}

.toolbar-heading,
.feedback-row,
.detail-modal__head,
.detail-modal__actions,
.composer-head,
.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.toolbar-title-wrap {
  display: grid;
  gap: 8px;
}

.toolbar-title-wrap h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.05;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bcoin-balance {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid rgba(247, 201, 72, 0.25);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(247, 201, 72, 0.1);
}

.bcoin-balance__icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  object-fit: contain;
}

.bcoin-balance__label,
.bcoin-balance__amount {
  line-height: 1;
  white-space: nowrap;
}

.bcoin-balance__label {
  color: #d9c27b;
  font-size: 0.86rem;
  font-weight: 800;
}

.bcoin-balance__amount {
  color: var(--gold);
  font-size: 0.98rem;
  font-weight: 950;
}

.filters-grid {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(300px, 2.4fr) repeat(2, minmax(170px, 1fr));
  gap: 14px;
  align-items: end;
}

.field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.field span,
.form-feedback,
.detail-grid dt,
.detail-notes p,
.footer-brand p,
.footer-links a,
.footer-contact a,
.status-card,
.market-card__meta,
.market-card__price-label {
  color: var(--muted);
}

.field span {
  color: #b8cdf0;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid rgba(61, 77, 98, 0.7);
  border-radius: 9px;
  color: var(--text);
  background: #070c14;
  outline: none;
  font-weight: 850;
}

.field select,
select {
  color: var(--text);
  background-color: #070c14;
  border-color: rgba(61, 77, 98, 0.7) !important;
}

select option {
  color: #111827;
  background: #ffffff;
}

.field textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(34, 211, 238, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.field-reset .reset-btn {
  width: fit-content;
  min-width: 76px;
  color: #ffffff;
  border-color: rgba(255, 77, 95, 0.42);
  background: linear-gradient(135deg, #ff4d5f, #d71933);
  box-shadow: 0 10px 22px rgba(215, 25, 51, 0.16);
}

.field-reset .reset-btn:hover {
  border-color: rgba(255, 120, 133, 0.65);
  background: linear-gradient(135deg, #ff6575, #e11d3c);
}

.feedback-row {
  margin: 0 0 28px;
}

.category-switch {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-btn {
  min-width: 0;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 9px;
  color: #b8cdf0;
  border-color: transparent;
  background: transparent;
  font-size: 1rem;
}

.category-btn.is-active {
  color: #101010;
  border-color: rgba(247, 201, 72, 0.45);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.status-card {
  display: none;
  margin-bottom: 14px;
}

.status-card.is-visible {
  display: block;
}

.status-card.is-error {
  color: #ffd7dc;
  border-color: rgba(255, 77, 95, 0.5);
  background: rgba(255, 77, 95, 0.08);
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.market-card {
  min-width: 0;
  border-radius: var(--radius-lg);
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.market-card:not(.market-card--compact) {
  padding: 18px;
}

.market-card--compact {
  position: relative;
  padding: 10px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.market-card--compact::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.09), transparent 34%, rgba(247, 201, 72, 0.08));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.market-card--compact:hover {
  transform: translateY(-3px);
  border-color: rgba(247, 201, 72, 0.32);
  box-shadow: 0 28px 76px rgba(0, 0, 0, 0.5);
}

.market-card--compact:hover::after {
  opacity: 1;
}

.market-card__media {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent),
    #11151d;
}

.market-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s ease, filter 0.18s ease;
}

.market-card--compact:hover .market-card__media img {
  transform: scale(1.035);
}

.market-card__media.is-sold img,
.market-card.is-sold .market-card__media img {
  filter: brightness(0.42) grayscale(0.25);
}

.market-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.market-pill {
  max-width: 62%;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 8, 12, 0.72);
  backdrop-filter: blur(10px);
  font-size: 0.68rem;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.market-pill--type {
  flex: 0 0 auto;
  max-width: 44%;
  color: #111;
  border-color: rgba(247, 201, 72, 0.5);
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
}

.sold-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.24);
  font-size: 1.2rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}

.market-card__content {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.market-card__meta {
  min-height: 16px;
  overflow: hidden;
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-card__title {
  min-height: 42px;
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.28;
  font-weight: 950;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-card__seller-line {
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.market-card__seller-line .nameplate {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.market-card__seller-line .nameplate-body,
.market-card__seller-line .nameplate-title-row,
.market-card__seller-line .nameplate-title {
  min-width: 0;
}

.market-card__seller-line .nameplate-title-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.market-card__seller-line .nameplate-title {
  flex: 1 1 auto;
  min-width: 0;
}

.market-card__seller-line .nameplate-subtitle,
.market-card__seller-name {
  display: none !important;
}

.market-card__price-row {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.market-card__price-label {
  font-size: 0.72rem;
  font-weight: 800;
}

.market-card__price {
  color: var(--gold);
  font-size: 1.22rem;
  line-height: 1;
  font-weight: 950;
  text-shadow: 0 0 16px rgba(247, 201, 72, 0.22);
}

.verified-badge {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  background: #2296ff;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 18px;
}

.user-menu {
  position: relative;
}

.user-chip {
  min-height: 42px;
  padding: 0 13px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.055);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #071013;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 950;
  font-size: 0.74rem;
}

.user-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 196px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  flex-direction: column;
  background: rgba(13, 16, 22, 0.98);
  box-shadow: var(--shadow);
}

.user-dropdown a,
.user-dropdown button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-weight: 800;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: rgba(255, 255, 255, 0.065);
}

.detail-modal,
.composer-modal {
  width: min(920px, calc(100% - 20px));
  border: 0;
  padding: 0;
  background: transparent;
}

.detail-modal::backdrop,
.composer-modal::backdrop {
  background: rgba(3, 4, 7, 0.76);
  backdrop-filter: blur(8px);
}

.detail-modal__content,
.composer-card {
  border-radius: 26px;
  padding: 22px;
}

.detail-modal__head h3,
.composer-head h3 {
  margin: 7px 0 0;
  font-size: 1.35rem;
}

.detail-modal__body {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
}

.detail-media-wrap {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.055);
}

.detail-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-grid div,
.detail-notes {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.detail-grid div {
  padding: 12px;
  border-radius: 14px;
}

.detail-grid dt,
.detail-grid dd {
  margin: 0;
}

.detail-grid dd {
  margin-top: 5px;
  font-weight: 850;
}

.detail-notes {
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
}

.detail-notes h4 {
  margin: 0 0 8px;
}

.composer-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-wide {
  grid-column: 1 / -1;
}

.site-footer {
  margin-top: 18px;
  border-top: 1px solid rgba(247, 201, 72, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #07080c;
}

.footer-wrap {
  padding: 30px 0 34px;
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(140px, 0.8fr) minmax(140px, 0.8fr) minmax(180px, 1fr);
  gap: 22px;
  align-items: start;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(247, 201, 72, 0.22));
}

.footer-logo span {
  display: grid;
  gap: 3px;
}

.footer-logo strong,
.footer-links strong,
.footer-contact strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
}

.footer-logo small {
  color: var(--gold);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-brand p {
  max-width: 420px;
  margin: 12px 0 0;
  line-height: 1.6;
}

.footer-links,
.footer-contact {
  display: grid;
  gap: 11px;
}

.footer-links a,
.footer-contact a {
  width: fit-content;
  color: var(--muted);
  font-weight: 750;
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--gold);
}

.footer-payments {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-payments img {
  height: 28px;
  width: auto;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1120px) {
  .listings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topup-layout {
    grid-template-columns: 1fr;
  }

  .topup-feature {
    min-height: 300px;
  }

  .filters-grid {
    grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(130px, 1fr));
  }
}

@media (max-width: 920px) {
  .nav-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 0;
  }

  .nav-links,
  .nav-actions {
    justify-self: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-links {
    width: fit-content;
  }

  .market-hero__content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

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

  .stat-tile {
    min-height: 82px;
  }

  .detail-modal__body,
  .composer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(var(--container), calc(100% - 20px));
  }

  .site-header {
    position: static;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .brand strong {
    font-size: 0.98rem;
  }

  .brand small {
    font-size: 0.6rem;
  }

  .nav-links {
    width: 100%;
    padding: 5px;
    gap: 5px;
  }

  .nav-link,
  .nav-link-btn {
    flex: 1 1 auto;
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .nav-actions .ghost-btn,
  .user-chip {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .user-name {
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .market-hero {
    min-height: auto;
  }

  .market-hero__content {
    min-height: 0;
    padding: 36px 0 24px;
  }

  .market-hero h1 {
    font-size: clamp(2.1rem, 13vw, 3.5rem);
  }

  .market-hero p {
    font-size: 0.95rem;
  }

  .hero-actions .primary-btn,
  .hero-actions .ghost-btn {
    width: 100%;
  }

  .market-stats {
    grid-template-columns: 1fr;
  }

  .topup-section {
    padding: 20px 0 18px;
  }

  .section-heading {
    gap: 10px;
  }

  .section-heading p {
    font-size: 0.9rem;
  }

  .topup-feature {
    min-height: 220px;
    border-radius: 18px;
  }

  .topup-feature__content {
    padding: 16px;
  }

  .topup-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
  }

  .topup-game-card {
    min-height: 0;
    padding: 8px;
    border-radius: 15px;
    gap: 8px;
  }

  .topup-game-media {
    border-radius: 11px;
  }

  .topup-game-badge {
    top: 9px;
    right: 9px;
    min-height: 22px;
    padding: 0 7px;
    font-size: 0.56rem;
  }

  .topup-game-body {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .topup-game-body h3 {
    min-height: 34px;
    font-size: 0.74rem;
    text-align: center;
  }

  .topup-game-body span {
    min-height: 30px;
    justify-content: center;
    padding: 0 8px;
    font-size: 0.62rem;
  }

  .browse-section {
    padding-top: 16px;
  }

  .market-terminal-actions {
    margin-bottom: 20px;
    gap: 16px;
  }

  .terminal-seller-btn {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 0.86rem;
  }

  .terminal-message-link,
  .terminal-reset-btn {
    font-size: 0.86rem;
  }

  .terminal-reset-row {
    margin: 20px 0 14px;
  }

  .toolbar-card,
  .status-card,
  .detail-modal__content,
  .composer-card {
    padding: 14px;
    border-radius: 9px;
  }

  .toolbar-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions,
  .bcoin-balance {
    width: 100%;
  }

  .bcoin-balance {
    justify-content: center;
  }

  .filters-grid {
    grid-template-columns: minmax(150px, 1.7fr) repeat(2, minmax(96px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .field-search {
    grid-column: auto;
  }

  .field span {
    font-size: 0.66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .field input,
  .field select {
    min-height: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 0.78rem;
  }

  .field-reset .reset-btn {
    width: auto;
    min-width: 70px;
    min-height: 40px;
    padding: 0 11px;
    font-size: 0.76rem;
  }

  .field textarea {
    min-height: 100px;
    padding: 10px;
  }

  .category-switch {
    width: 100%;
    gap: 8px;
  }

  .category-btn {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 0.8rem;
  }

  .listings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .market-card--compact {
    padding: 6px;
    border-radius: 13px;
    gap: 7px;
  }

  .market-card__media {
    border-radius: 10px;
  }

  .market-card__badges {
    top: 5px;
    left: 5px;
    right: 5px;
    gap: 4px;
  }

  .market-pill {
    min-height: 20px;
    padding: 0 5px;
    font-size: 0.5rem;
  }

  .market-card__meta {
    display: none;
  }

  .market-card__title {
    min-height: 30px;
    font-size: 0.66rem;
    line-height: 1.15;
  }

  .market-card__price {
    font-size: 0.78rem;
  }

  .market-card__price-row {
    padding-top: 5px;
  }

  .market-card__price-label {
    display: none;
  }

  .market-card__seller-line .nameplate {
    --avatar-size: 22px;
    --plate-radius: 10px;
    --plate-pad-left: calc(var(--avatar-size) + 7px);
    --plate-pad-right: 5px;
    --plate-height: auto;
    min-height: 32px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .market-card__seller-line .nameplate-avatar {
    width: 22px;
    height: 22px;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 2px;
  }

  .market-card__seller-line .nameplate-body {
    justify-content: center;
    gap: 1px;
  }

  .market-card__seller-line .nameplate-title {
    font-size: 0.56rem;
    line-height: 1.04;
    letter-spacing: 0;
    white-space: normal !important;
    overflow: hidden;
    text-overflow: unset;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .market-card__seller-line .nameplate-verified {
    width: 10px;
    height: 10px;
    flex-basis: 10px;
    font-size: 0.42rem;
    margin-top: 1px;
  }

  .detail-modal__actions,
  .composer-actions,
  .detail-modal__head,
  .composer-head {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn {
    width: 100%;
  }

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

  .footer-wrap {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .container {
    width: min(var(--container), calc(100% - 14px));
  }

  .nav-actions {
    width: 100%;
  }

  .nav-actions .sell-btn,
  .nav-login-btn,
  .user-menu,
  .user-chip {
    width: 100%;
  }

  .user-chip {
    justify-content: flex-start;
  }

  .filters-grid {
    grid-template-columns: minmax(132px, 1.6fr) repeat(2, minmax(84px, 1fr));
    gap: 7px;
  }

  .footer-wrap {
    grid-template-columns: 1fr;
  }

  .listings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .market-card__seller-line .nameplate {
    --avatar-size: 20px;
    --plate-pad-left: calc(var(--avatar-size) + 6px);
    --plate-pad-right: 4px;
    min-height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 12px;
  }

  .market-card__seller-line .nameplate-avatar {
    width: 20px;
    height: 20px;
    left: 4px;
  }

  .market-card__seller-line .nameplate-title {
    font-size: 0.52rem;
  }
}

/* Responsive layout polish */
.footer-wrap > *,
.footer-links,
.footer-contact {
  min-width: 0;
}

.footer-contact a,
.footer-links a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 920px) {
  .footer-wrap {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  }

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .filters-grid {
    grid-template-columns: 1fr 1fr;
    overflow-x: visible;
  }

  .field-search,
  .field-reset {
    grid-column: 1 / -1;
  }

  .field-reset .reset-btn {
    width: 100%;
  }

  .listings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .listings-grid,
  .topup-grid {
    grid-template-columns: 1fr;
  }

  .market-card__title {
    min-height: auto;
  }
}
