/* ─── Auctions Page ───────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  width: 100%;
}

.auctions-main {
  padding: 60px 0 100px;
}

.auctions-head {
  margin-bottom: 36px;
  text-align: center;
}
.auctions-head h1 {
  font-size: clamp(54px, 4.5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.auctions-head p {
  color: var(--text-muted);
  font-size: 15.5px;
}

/* Sidebar + content layout */
.auctions-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: flex-start;
}

.auc-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 88px;
  margin-top: 54px; /* slight offset, sits just above the auction cards */
}
.auc-side-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}
.auc-side-btn {
  position: relative;
  overflow: hidden;
}
.auc-side-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent);
  transition: width 0.22s cubic-bezier(0.2, 0.7, 0.25, 1);
  opacity: 0.08;
}
.auc-side-btn:hover {
  color: var(--text);
  background: var(--bg-elevated);
  transform: translateX(2px);
}
.auc-side-btn:hover::before { width: 100%; }
.auc-side-btn.active {
  background: var(--accent);
  color: #000;
  transform: translateX(0);
}
.auc-side-btn.active::before { display: none; }
.auc-side-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auc-side-count {
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.auc-side-btn:hover .auc-side-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.auc-side-btn.active .auc-side-count {
  background: rgba(0, 0, 0, 0.2);
  color: #000;
}

/* Content side */
.auc-content { min-width: 0; }
.auc-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.auc-search {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  width: 280px;
  outline: none;
  transition: border-color 0.2s ease,
              box-shadow 0.2s ease,
              width 0.25s cubic-bezier(0.2, 0.7, 0.25, 1);
}
.auc-search:focus {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
  width: 320px;
}
@media (max-width: 880px) {
  .auc-search:focus { width: 100%; }
}

/* Loading / empty */
.auctions-loading,
.auctions-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 15px;
}

/* Pinterest-style masonry — cards pack tightly */
.auctions-grid {
  column-count: 3;
  column-gap: 16px;
}
@media (max-width: 1280px) { .auctions-grid { column-count: 2; } }
@media (max-width: 700px)  { .auctions-grid { column-count: 1; } }

/* Mobile: sidebar as 2-column grid (no horizontal scroll, all tabs visible) */
@media (max-width: 880px) {
  .auctions-main { padding: 28px 0 60px; }
  .auctions-head { margin-bottom: 22px; }
  .auctions-layout { grid-template-columns: 1fr; gap: 14px; }

  .auc-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
    padding: 6px;
    margin-top: 0;
    margin-bottom: 4px;
    gap: 4px;
  }
  .auc-side-btn {
    width: 100%;
    padding: 11px 14px;
    font-size: 13px;
    min-height: 42px;
    border-radius: 8px;
    transform: none !important; /* disable hover slide on mobile */
  }
  .auc-side-btn .auc-side-count {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    font-size: 10.5px;
    padding: 0 7px;
  }
  .auc-side-label { font-size: 13px; }

  /* Search beneath the tab grid */
  .auc-toolbar { margin-bottom: 12px; justify-content: stretch; }
  .auc-search { width: 100%; padding: 11px 14px; font-size: 14px; }
}

@media (max-width: 540px) {
  .auctions-head h1 { font-size: 30px !important; }
  .auctions-head p { font-size: 13.5px; }
  .auctions-grid { column-count: 1 !important; }
  .acard { padding: 18px; gap: 12px; }
  .acard-ign { font-size: 19px; }
  .acard-prices { padding: 10px; }
  .acard-price-value { font-size: 15px; }
  .acard-actions .btn { padding: 12px 14px; font-size: 13.5px; }

  /* Modal: take more screen */
  .modal { max-width: calc(100vw - 24px); }
  .modal-body { padding: 16px; }
  .modal-actions { padding: 12px 16px 16px; flex-direction: column-reverse; gap: 8px; }
  .modal-actions .btn { width: 100%; padding: 12px 16px; }
}
.acard {
  break-inside: avoid;
  margin-bottom: 16px;
  display: inline-flex;
  width: 100%;
  flex-direction: column;
}

/* ─── Auction Card ─────────────────────────────────────────── */
.acard {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.18s ease;
  position: relative;
  overflow: hidden;
}
.acard:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
              0 8px 24px rgba(0, 0, 0, 0.4);
}

.acard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.acard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.acard-ign {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  word-break: break-word;
  line-height: 1.1;
}
.acard-ign.hidden-name {
  color: var(--text-muted);
  font-style: italic;
}
.acard-main-capes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.acard-cat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Cape emoji image rendering */
.cape-emoji {
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
  user-select: none;
}
.has-line {
  display: flex !important;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.has-line .cape-emoji {
  margin: 0 1px;
}

.acard-note {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
}

.acard-lines {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.acard-lines li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.45;
}
.acard-lines li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-dim);
}

.acard-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.acard-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acard-price-label {
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.acard-price-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.acard-price-value.muted {
  color: var(--text-dim);
  font-weight: 500;
}
.acard-price-value.bin { color: #fbbf24; }

.acard-owner {
  font-size: 12.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.acard-owner .owner-name {
  font-weight: 700;
}
.acard-owner .owner-link {
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border-color 0.15s, opacity 0.15s;
}
.acard-owner .owner-link:hover {
  opacity: 0.85;
  border-bottom-color: currentColor;
}
.acard-owner .owner-name.role-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientShimmer 4s linear infinite;
}
.acard-owner.proxy {
  color: #ffffff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
}

/* "Listed X ago" footer — fills the empty space on short cards */
.acard-meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0.02em;
}
.acard-meta .acard-meta-id {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 10.5px;
  opacity: 0.6;
}

.acard-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}
/* Both buttons share the row equally and look the same (white pills) */
.acard-actions .btn {
  flex: 1;
  padding: 11px 16px;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.acard-actions .btn:focus,
.acard-actions .btn:focus-visible,
.acard-actions .btn:active {
  outline: none;
  box-shadow: 0 6px 30px var(--accent-glow);
}
.acard-namemc {
  background: var(--accent) !important;
  color: #000 !important;
  border: none !important;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.25, 1),
              box-shadow 0.2s ease,
              background 0.18s ease;
}
.acard-namemc:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.acard-namemc:active { transform: translateY(0) scale(0.98); }

.acard-actions .btn-primary {
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.25, 1),
              box-shadow 0.2s ease,
              background 0.18s ease;
}
.acard-actions .btn-primary:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.acard-actions .btn-primary:active { transform: translateY(0) scale(0.98); }

/* Discord Join CTA in offer modal when user not in server */
.btn-discord-join {
  background: #5865F2;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 6px 24px rgba(88, 101, 242, 0.35);
}
.btn-discord-join:hover {
  background: #4752C4;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(88, 101, 242, 0.5);
}

/* Live highlight pulse when C/O updates */
.acard.flash {
  animation: cardFlash 1.2s ease;
}
@keyframes cardFlash {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6); }
  100% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

/* ─── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: modalFade 0.18s ease;
}
.modal-backdrop[hidden] { display: none; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #0f0f0f;
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: modalPop 0.22s ease;
}
@keyframes modalPop {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-body p { color: var(--text-muted); font-size: 13.5px; line-height: 1.5; }
.modal-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-top: 4px;
}
.modal-body input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.15s;
}
.modal-body input:focus { border-color: var(--text); }
.modal-error {
  color: #ef4444;
  font-size: 13px;
  margin-top: 4px;
  font-weight: 500;
}

.modal-actions {
  padding: 14px 20px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-actions .btn { padding: 11px 22px; font-size: 14px; }
