/* ============================================================
   Collectible Exchange — Global Stylesheet
   cx.css v1.0
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── CSS Variables ── */
:root {
  /* Backgrounds */
  --bg-base:       #060606;
  --bg-surface:    #0d0d0d;
  --bg-raised:     #141414;
  --bg-hover:      #1a1a1a;
  --bg-active:     #1f1f1f;

  /* Gold */
  --gold:          #C9A84C;
  --gold-light:    #E8C96A;
  --gold-dim:      rgba(201, 168, 76, 0.15);
  --gold-border:   rgba(201, 168, 76, 0.3);

  /* Text */
  --text-primary:  #f2f2f2;
  --text-muted:    rgba(255,255,255,0.4);
  --text-faint:    rgba(255,255,255,0.2);

  /* Borders */
  --border:        rgba(255,255,255,0.07);
  --border-hover:  rgba(255,255,255,0.12);

  /* Status */
  --green:         #4ade80;
  --green-dim:     rgba(74, 222, 128, 0.12);
  --red:           #f87171;
  --red-dim:       rgba(248, 113, 113, 0.12);
  --blue:          #60a5fa;
  --blue-dim:      rgba(96, 165, 250, 0.12);
  --purple:        #a78bfa;
  --purple-dim:    rgba(167, 139, 250, 0.12);
  --orange:        #fb923c;
  --orange-dim:    rgba(251, 146, 60, 0.12);

  /* TCG Colors */
  --tcg-pokemon:    #FFCB05;
  --tcg-mtg:        #a78bfa;
  --tcg-onepiece:   #f87171;
  --tcg-lorcana:    #60a5fa;
  --tcg-sorcery:    #fb923c;
  --tcg-gundam:     #4ade80;
  --tcg-dragonball: #fb923c;
  --tcg-lego:       #facc15;

  /* Sizing */
  --header-height: 64px;
  --topline-height: 2px;
  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.5);
  --shadow:        0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.8);
  --shadow-gold:   0 0 24px rgba(201,168,76,0.25);
  --shadow-green:  0 0 20px rgba(74,222,128,0.2);
  --shadow-red:    0 0 20px rgba(248,113,113,0.25);

  /* Transitions */
  --t-fast:        100ms ease;
  --t:             200ms ease;
  --t-slow:        350ms ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Gold Top Line ── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topline-height);
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
  z-index: 1000;
}

/* ── Header ── */
.header {
  position: fixed;
  top: var(--topline-height);
  left: 0; right: 0;
  height: var(--header-height);
  background: rgba(6,6,6,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 900;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  flex-shrink: 0;
}
.header-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 0.875rem;
  color: var(--bg-base);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.header-logo-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.header-logo-name span {
  color: var(--gold);
}

.header-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.header-search input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color var(--t);
  outline: none;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus { border-color: var(--gold-border); }
.header-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.875rem;
  pointer-events: none;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.header-nav a {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t), background var(--t);
}
.header-nav a:hover { color: var(--text-primary); background: var(--bg-raised); }
.header-nav a.active { color: var(--gold); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-left: 0.5rem;
}

.header-avatar {
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bg-base);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--t);
}
.header-avatar:hover { border-color: var(--gold); }

/* ── Page Body Offset ── */
.page-body {
  padding-top: calc(var(--header-height) + var(--topline-height) + 1.5rem);
  min-height: 100vh;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container--narrow { max-width: 800px; }
.container--wide   { max-width: 1440px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  transition: all var(--t);
  cursor: pointer;
  border: none;
  font-family: inherit;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--bg-base);
  box-shadow: 0 2px 12px rgba(201,168,76,0.3);
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.1);
  box-shadow: 0 4px 20px rgba(201,168,76,0.45);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-raised);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.2);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(248,113,113,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-border);
}
.btn-outline:hover:not(:disabled) {
  background: var(--gold-dim);
  border-color: var(--gold);
}

.btn-success {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(74,222,128,0.2);
}
.btn-success:hover:not(:disabled) { background: rgba(74,222,128,0.2); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) { color: var(--text-primary); background: var(--bg-raised); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2rem; font-size: 1.0625rem; border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-icon { padding: 0.5rem; border-radius: var(--radius-sm); }

/* ── Form Styles ── */
.form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.form-input,
.form-select,
.form-textarea {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  width: 100%;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-input.error,
.form-select.error,
.form-textarea.error { border-color: var(--red); }
.form-input.success,
.form-select.success,
.form-textarea.success { border-color: var(--green); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}
.form-hint { font-size: 0.8125rem; color: var(--text-muted); }
.form-error { font-size: 0.8125rem; color: var(--red); }
.form-success-msg { font-size: 0.8125rem; color: var(--green); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.input-prefix-wrap { position: relative; }
.input-prefix {
  position: absolute;
  left: 0.875rem;
  top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9375rem;
  pointer-events: none;
}
.input-prefix-wrap .form-input { padding-left: 1.75rem; }

/* ── Cards ── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.card--raised {
  background: var(--bg-raised);
}
.card--hover { transition: border-color var(--t), box-shadow var(--t), transform var(--t); }
.card--hover:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ── Auction Card ── */
.auction-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.auction-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.auction-card--live {
  border-color: rgba(74,222,128,0.25);
  box-shadow: 0 0 0 1px rgba(74,222,128,0.1), var(--shadow-green);
}
.auction-card--ending {
  border-color: rgba(248,113,113,0.35);
  box-shadow: 0 0 0 1px rgba(248,113,113,0.1), var(--shadow-red);
  animation: pulse-red 2s ease-in-out infinite;
}
@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 1px rgba(248,113,113,0.1), 0 0 16px rgba(248,113,113,0.2); }
  50%       { box-shadow: 0 0 0 1px rgba(248,113,113,0.2), 0 0 28px rgba(248,113,113,0.35); }
}

.auction-card__image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-raised);
}
.auction-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.auction-card:hover .auction-card__image img { transform: none; }

.auction-card__badges {
  position: absolute;
  top: 0.5rem; left: 0.5rem;
  display: flex; gap: 0.25rem;
  flex-wrap: wrap;
}
.auction-card__bin-badge {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
}

.auction-card__body {
  padding: 0.875rem;
  display: flex; flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.auction-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.auction-card__meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.auction-card__bid-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 0.25rem;
}
.auction-card__bid-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1px;
}
.auction-card__bid {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.5px;
}
.auction-card__bid-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.auction-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.auction-card__seller {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.auction-card__seller-name { color: var(--text-primary); font-weight: 500; }
.auction-card__bin {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.auction-card__bin strong { color: var(--blue); font-weight: 600; }

/* ── Badge Pills ── */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.badge-pill--gold    { background: var(--gold-dim);   color: var(--gold-light); border: 1px solid var(--gold-border); }
.badge-pill--green   { background: var(--green-dim);  color: var(--green); border: 1px solid rgba(74,222,128,0.2); }
.badge-pill--red     { background: var(--red-dim);    color: var(--red); border: 1px solid rgba(248,113,113,0.2); }
.badge-pill--blue    { background: var(--blue-dim);   color: var(--blue); border: 1px solid rgba(96,165,250,0.2); }
.badge-pill--purple  { background: var(--purple-dim); color: var(--purple); border: 1px solid rgba(167,139,250,0.2); }
.badge-pill--orange  { background: var(--orange-dim); color: var(--orange); border: 1px solid rgba(251,146,60,0.2); }
.badge-pill--surface { background: var(--bg-raised);  color: var(--text-muted); border: 1px solid var(--border); }
.badge-pill--new {
  background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(167,139,250,0.2));
  color: var(--blue);
  border: 1px solid rgba(96,165,250,0.25);
}
.badge-pill--ending {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.2);
  animation: pulse-text 1.5s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ── TCG Label ── */
.tcg-label {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tcg-label--pokemon    { background: rgba(255,203,5,0.15);   color: #FFCB05; border: 1px solid rgba(255,203,5,0.25); }
.tcg-label--mtg        { background: rgba(167,139,250,0.15); color: #a78bfa; border: 1px solid rgba(167,139,250,0.25); }
.tcg-label--onepiece   { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.25); }
.tcg-label--lorcana    { background: rgba(96,165,250,0.15);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.25); }
.tcg-label--sorcery    { background: rgba(251,146,60,0.15);  color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }
.tcg-label--gundam     { background: rgba(74,222,128,0.15);  color: #4ade80; border: 1px solid rgba(74,222,128,0.25); }
.tcg-label--dragonball { background: rgba(251,146,60,0.15);  color: #fb923c; border: 1px solid rgba(251,146,60,0.25); }
.tcg-label--lego       { background: rgba(250,204,21,0.15);  color: #facc15; border: 1px solid rgba(250,204,21,0.25); }

/* ── Condition Badge ── */
.condition-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.175rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.condition--near_perfect { background: rgba(74,222,128,0.12); color: var(--green); border: 1px solid rgba(74,222,128,0.2); }
.condition--excellent    { background: rgba(96,165,250,0.12); color: var(--blue);  border: 1px solid rgba(96,165,250,0.2); }
.condition--average      { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Sub-category Badge ── */
.sub-badge {
  display: inline-flex; align-items: center;
  padding: 0.175rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sub--sealed  { background: rgba(167,139,250,0.12); color: var(--purple); border: 1px solid rgba(167,139,250,0.2); }
.sub--graded  { background: rgba(201,168,76,0.12);  color: var(--gold);   border: 1px solid var(--gold-border); }
.sub--raw     { background: rgba(255,255,255,0.06); color: var(--text-muted); border: 1px solid var(--border); }

/* ── Countdown ── */
.countdown {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.countdown .countdown-icon { font-size: 0.75rem; }
.countdown--urgent {
  color: var(--orange);
}
.countdown--critical {
  color: var(--red);
  animation: countdown-pulse 1s ease-in-out infinite;
}
@keyframes countdown-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.countdown-lg {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.countdown-lg.countdown--urgent { color: var(--orange); }
.countdown-lg.countdown--critical {
  color: var(--red);
  animation: countdown-pulse 1s ease-in-out infinite;
  text-shadow: 0 0 20px rgba(248,113,113,0.4);
}

/* ── Toasts ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 280px;
  max-width: 480px;
  pointer-events: auto;
  animation: toast-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.toast-out {
  animation: toast-out 0.2s ease forwards;
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}
.toast--success { border-color: rgba(74,222,128,0.3); }
.toast--success .toast-icon { color: var(--green); }
.toast--error   { border-color: rgba(248,113,113,0.3); }
.toast--error   .toast-icon { color: var(--red); }
.toast--info    { border-color: var(--gold-border); }
.toast--info    .toast-icon { color: var(--gold); }
.toast--warning { border-color: rgba(251,146,60,0.3); }
.toast--warning .toast-icon { color: var(--orange); }

/* ── Skeleton Loading ── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-raised) 0%,
    var(--bg-hover)  50%,
    var(--bg-raised) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.skeleton-img   { aspect-ratio: 4/3; width: 100%; }
.skeleton-body  { padding: 0.875rem; display: flex; flex-direction: column; gap: 0.5rem; }
.skeleton-line  { height: 12px; width: 100%; }
.skeleton-line--short { width: 60%; }
.skeleton-line--xs    { width: 40%; }

/* ── Grid Layouts ── */
.auction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1200px) { .auction-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .auction-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px)  { .auction-grid { grid-template-columns: 1fr; } }

/* ── Filter Tabs ── */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  transition: all var(--t);
  cursor: pointer;
  font-family: inherit;
}
.filter-tab:hover { color: var(--text-primary); border-color: var(--border-hover); }
.filter-tab.active {
  background: var(--gold-dim);
  color: var(--gold-light);
  border-color: var(--gold-border);
}

.filter-pills {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 0.3125rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  transition: all var(--t);
  cursor: pointer;
  font-family: inherit;
}
.filter-pill:hover { color: var(--text-primary); background: var(--bg-raised); }
.filter-pill.active {
  color: var(--text-primary);
  background: var(--bg-raised);
  border-color: var(--border-hover);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
}
.pagination-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-raised);
  border: 1px solid var(--border);
  transition: all var(--t);
  cursor: pointer;
}
.pagination-btn:hover { color: var(--text-primary); border-color: var(--border-hover); }
.pagination-btn.active {
  background: var(--gold-dim);
  color: var(--gold-light);
  border-color: var(--gold-border);
  font-weight: 700;
}
.pagination-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Divider ── */
.divider {
  width: 100%; height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

/* ── Section Headers ── */
.section-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}
.section-subtitle { font-size: 0.875rem; color: var(--text-muted); }

/* ── Hero ── */
.hero {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,0.08) 0%, transparent 70%);
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  gap: 0.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0.375rem 0.375rem 0.375rem 1.25rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.hero-search:focus-within {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.hero-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 0.9375rem;
}
.hero-search input::placeholder { color: var(--text-muted); }

/* ── Auction Detail Layout ── */
.auction-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 1024px) { .auction-layout { grid-template-columns: 1fr; } }

.auction-sticky {
  position: sticky;
  top: calc(var(--header-height) + var(--topline-height) + 1.5rem);
}

/* Image Gallery */
.gallery { display: flex; flex-direction: column; gap: 0.75rem; }
.gallery-main {
  aspect-ratio: 1;
  background: var(--bg-raised);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex; gap: 0.5rem;
}
.gallery-thumb {
  flex: 1;
  aspect-ratio: 1;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color var(--t);
}
.gallery-thumb.active { border-color: var(--gold); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Bid Panel */
.bid-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.bid-panel__current-bid-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }
.bid-panel__current-bid { font-size: 2.5rem; font-weight: 900; color: var(--gold); letter-spacing: -1.5px; line-height: 1; }
.bid-panel__bid-count { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }

.reserve-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
}
.reserve-indicator--met { color: var(--green); }
.reserve-indicator--unmet { color: var(--orange); }

.anti-snipe-notice {
  background: rgba(251,146,60,0.08);
  border: 1px solid rgba(251,146,60,0.2);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bin-panel {
  background: var(--blue-dim);
  border: 1px solid rgba(96,165,250,0.2);
  border-radius: var(--radius);
  padding: 1rem;
}
.bin-panel__price { font-size: 1.5rem; font-weight: 800; color: var(--blue); }
.bin-panel__label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

.bid-history { display: flex; flex-direction: column; gap: 0.5rem; }
.bid-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}
.bid-history-item:last-child { border-bottom: none; }
.bid-history-item__user { color: var(--text-muted); }
.bid-history-item__amount { font-weight: 700; color: var(--text-primary); }
.bid-history-item__time { color: var(--text-faint); font-size: 0.75rem; }

/* ── Seller Card ── */
.seller-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.seller-avatar {
  width: 52px; height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bg-base);
  flex-shrink: 0;
}
.seller-name { font-weight: 700; font-size: 0.9375rem; }
.seller-rep { color: var(--gold); font-size: 0.875rem; font-weight: 600; }
.seller-badge { font-size: 0.75rem; color: var(--text-muted); }

/* ── Step Form / Progress ── */
.step-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 2.5rem;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  position: relative;
}
.step-item::after {
  content: '';
  position: absolute;
  top: 14px; left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 2px;
  background: var(--border);
  transition: background var(--t-slow);
}
.step-item:last-child::after { display: none; }
.step-item.complete::after { background: var(--gold); }
.step-dot {
  width: 28px; height: 28px;
  border-radius: var(--radius-full);
  background: var(--bg-raised);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--t-slow);
  position: relative;
  z-index: 1;
}
.step-item.active .step-dot {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-color: var(--gold);
  color: var(--bg-base);
  box-shadow: 0 0 12px rgba(201,168,76,0.4);
}
.step-item.complete .step-dot {
  background: var(--gold-dim);
  border-color: var(--gold);
  color: var(--gold);
}
.step-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); }
.step-item.active .step-label { color: var(--gold); }
.step-item.complete .step-label { color: var(--text-muted); }

/* TCG Picker Grid */
.tcg-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
@media (max-width: 600px) { .tcg-picker-grid { grid-template-columns: repeat(2, 1fr); } }
.tcg-picker-card {
  background: var(--bg-raised);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--t);
  text-align: center;
}
.tcg-picker-card:hover { border-color: var(--border-hover); background: var(--bg-hover); }
.tcg-picker-card.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 0 16px rgba(201,168,76,0.2);
}
.tcg-picker-card__icon { font-size: 1.75rem; }
.tcg-picker-card__name { font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* Duration Picker */
.duration-grid {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.duration-card {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  border: 2px solid var(--border);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--t);
  text-align: center;
  min-width: 72px;
}
.duration-card:hover { border-color: var(--border-hover); color: var(--text-primary); }
.duration-card.selected {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

/* Image Upload Slots */
.image-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
@media (max-width: 600px) { .image-slots { grid-template-columns: repeat(2, 1fr); } }
.image-slot {
  aspect-ratio: 1;
  background: var(--bg-raised);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}
.image-slot:hover { border-color: var(--gold-border); background: var(--gold-dim); }
.image-slot.drag-over { border-color: var(--gold); background: var(--gold-dim); }
.image-slot.has-image { border-style: solid; border-color: var(--border-hover); }
.image-slot img { width: 100%; height: 100%; object-fit: cover; position: absolute; }
.image-slot__remove {
  position: absolute; top: 0.25rem; right: 0.25rem;
  background: rgba(0,0,0,0.7);
  border-radius: var(--radius-full);
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; color: var(--text-primary);
  z-index: 2; cursor: pointer;
}
.image-slot__label { font-size: 0.75rem; color: var(--text-muted); text-align: center; }
.image-slot__icon { font-size: 1.25rem; color: var(--text-muted); }
.image-slot:first-child .image-slot__label::after { content: ' (Main)'; color: var(--gold); }

/* Toggle Switch */
.toggle-wrap { display: flex; align-items: center; gap: 0.75rem; }
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--t);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px; width: 16px;
  left: 2px; bottom: 2px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--t);
}
.toggle-switch input:checked + .toggle-slider { background: var(--gold-dim); border-color: var(--gold-border); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); background: var(--gold); }
.toggle-label { font-size: 0.9375rem; font-weight: 500; }

/* ── Admin Layout ── */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - var(--header-height) - var(--topline-height));
}
@media (max-width: 768px) { .admin-layout { grid-template-columns: 1fr; } }

.admin-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: calc(var(--header-height) + var(--topline-height));
  height: calc(100vh - var(--header-height) - var(--topline-height));
  overflow-y: auto;
}
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--t);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
}
.admin-nav-item:hover { color: var(--text-primary); background: var(--bg-raised); }
.admin-nav-item.active { color: var(--text-primary); background: var(--bg-raised); border-left: 2px solid var(--gold); margin-left: -1px; }
.admin-nav-item .nav-icon { font-size: 1rem; width: 1.25rem; text-align: center; }

.admin-content { padding: 2rem 1.5rem; }

/* ── Stat Cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr; } }
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stat-card__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }
.stat-card__value { font-size: 2rem; font-weight: 900; color: var(--text-primary); letter-spacing: -0.5px; }
.stat-card__icon { font-size: 1.25rem; }
.stat-card--gold  .stat-card__value { color: var(--gold); }
.stat-card--green .stat-card__value { color: var(--green); }
.stat-card--red   .stat-card__value { color: var(--red); }
.stat-card--blue  .stat-card__value { color: var(--blue); }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }
.data-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr { transition: background var(--t-fast); }
.data-table tbody tr:hover { background: var(--bg-raised); }
.data-table tbody tr:last-child td { border-bottom: none; }
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  overflow-x: auto;
}

/* ── Profile ── */
.profile-header {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(201,168,76,0.1) 0%, transparent 70%);
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.profile-avatar-lg {
  width: 84px; height: 84px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--bg-base);
  margin: 0 auto 1rem;
  box-shadow: 0 0 32px rgba(201,168,76,0.3);
  border: 3px solid rgba(201,168,76,0.3);
}
.profile-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }
.profile-rep { font-size: 1rem; color: var(--gold); font-weight: 600; }
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.profile-stat { text-align: center; }
.profile-stat__value { font-size: 1.25rem; font-weight: 800; color: var(--text-primary); }
.profile-stat__label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }

/* ── Tabs ── */
.tabs { display: flex; border-bottom: 1px solid var(--border); gap: 0; }
.tab-btn {
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-panel { display: none; padding: 1.5rem 0; }
.tab-panel.active { display: block; }

/* ── Star Rating ── */
.star-dist { display: flex; flex-direction: column; gap: 0.375rem; }
.star-dist-row { display: flex; align-items: center; gap: 0.625rem; font-size: 0.8125rem; }
.star-dist-bar-wrap { flex: 1; height: 6px; background: var(--bg-raised); border-radius: var(--radius-full); overflow: hidden; }
.star-dist-bar { height: 100%; background: var(--gold); border-radius: var(--radius-full); }
.star-dist-count { width: 24px; text-align: right; color: var(--text-muted); font-size: 0.75rem; }
.star-label { width: 16px; text-align: right; color: var(--text-muted); }

.review-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.review-stars { color: var(--gold); letter-spacing: 2px; font-size: 0.875rem; }
.review-text { font-size: 0.875rem; color: var(--text-primary); margin-top: 0.375rem; line-height: 1.5; }
.review-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem; }

/* ── Auth Card ── */
.auth-wrap {
  min-height: calc(100vh - var(--header-height) - var(--topline-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(201,168,76,0.06) 0%, transparent 60%);
}
.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  margin-bottom: 1.75rem;
}
.auth-toggle {
  display: flex;
  background: var(--bg-raised);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}
.auth-toggle-btn {
  flex: 1;
  padding: 0.5rem;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  font-family: inherit;
}
.auth-toggle-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Dispute Thread ── */
.dispute-message {
  padding: 0.875rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}
.dispute-message--system {
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
}
.dispute-message__author { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.25rem; }
.dispute-message__text { font-size: 0.875rem; }

/* ── Live dot ── */
.live-dot {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; font-weight: 700; color: var(--green);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.live-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: var(--radius-full);
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: live-blink 1.5s ease-in-out infinite;
}
@keyframes live-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50%       { opacity: 0.5; box-shadow: 0 0 12px var(--green); }
}

/* ── Misc Utilities ── */
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-blue    { color: var(--blue); }
.text-purple  { color: var(--purple); }
.text-orange  { color: var(--orange); }
.font-mono    { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.font-bold    { font-weight: 700; }
.font-black   { font-weight: 900; }
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: 0.25rem; }
.gap-2  { gap: 0.5rem; }
.gap-3  { gap: 0.75rem; }
.gap-4  { gap: 1rem; }
.gap-6  { gap: 1.5rem; }
.mt-1  { margin-top: 0.25rem; }
.mt-2  { margin-top: 0.5rem; }
.mt-4  { margin-top: 1rem; }
.mt-6  { margin-top: 1.5rem; }
.mb-2  { margin-bottom: 0.5rem; }
.mb-4  { margin-bottom: 1rem; }
.mb-6  { margin-bottom: 1.5rem; }
.p-4   { padding: 1rem; }
.rounded { border-radius: var(--radius); }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ── Selection ── */
::selection { background: rgba(201,168,76,0.3); color: var(--text-primary); }

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
