/* ===== TRADING CARD ===== */
.tc-card {
  position: relative;
  aspect-ratio: 2.5 / 3.5;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}
.tc-card.small { max-width: 120px; }
.tc-frame {
  position: relative;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #64748b;
  background: #1e293b;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.tc-card.rarity-common .tc-frame {
  border-color: #94a3b8;
  background: linear-gradient(160deg, #334155, #1e293b);
}
.tc-card.rarity-rare .tc-frame {
  border-color: #3b82f6;
  background: linear-gradient(160deg, #1e3a5f, #0f172a);
  box-shadow: 0 0 20px rgba(59,130,246,0.25), 0 8px 24px rgba(0,0,0,0.4);
}
.tc-card.rarity-epic .tc-frame {
  border-color: #a855f7;
  background: linear-gradient(160deg, #3b0764, #1a0a2e);
  box-shadow: 0 0 28px rgba(168,85,247,0.3), 0 8px 24px rgba(0,0,0,0.45);
}
.tc-card.rarity-legend .tc-frame {
  border-color: #fbbf24;
  background: linear-gradient(160deg, #78350f, #1c1008 60%, #0c0a09);
  box-shadow: 0 0 32px rgba(251,191,36,0.35), 0 8px 28px rgba(0,0,0,0.5);
}
.tc-shine {
  pointer-events: none;
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(125deg, transparent 40%, rgba(255,255,255,0.07) 50%, transparent 60%);
}
.tc-card.rarity-rare .tc-shine { background: linear-gradient(125deg, transparent 35%, rgba(96,165,250,0.12) 50%, transparent 65%); }
.tc-card.rarity-epic .tc-shine { background: linear-gradient(125deg, transparent 30%, rgba(192,132,252,0.15) 50%, transparent 70%); }
.tc-card.rarity-legend .tc-shine {
  background: linear-gradient(125deg, transparent 25%, rgba(251,191,36,0.18) 48%, transparent 72%);
  animation: tc-legend-pulse 3s ease-in-out infinite;
}
@keyframes tc-legend-pulse {
  0%,100% { opacity: 0.7; }
  50% { opacity: 1; }
}
.tc-holo-overlay {
  pointer-events: none;
  position: absolute; inset: 0; z-index: 4;
  background: linear-gradient(105deg,
    transparent 0%,
    rgba(255,0,128,0.08) 20%,
    rgba(0,255,255,0.1) 40%,
    rgba(255,255,0,0.08) 60%,
    transparent 80%);
  mix-blend-mode: color-dodge;
  animation: tc-holo 4s linear infinite;
  background-size: 200% 200%;
}
@keyframes tc-holo {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
.tc-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 7px; font-size: 0.58rem; font-weight: 800; letter-spacing: 0.04em;
  z-index: 2; position: relative;
  background: rgba(0,0,0,0.45);
}
.tc-num { color: #e2e8f0; font-variant-numeric: tabular-nums; }
.tc-rare { color: #cbd5e1; }
.tc-card.rarity-rare .tc-rare { color: #93c5fd; }
.tc-card.rarity-epic .tc-rare { color: #d8b4fe; }
.tc-card.rarity-legend .tc-rare { color: #fde68a; }
.tc-edition {
  position: relative; z-index: 2;
  text-align: center; font-size: 0.55rem; font-weight: 800; letter-spacing: 0.06em;
  padding: 2px 4px; background: rgba(0,0,0,0.5); color: #fbbf24; text-transform: uppercase;
}
.tc-art {
  flex: 1; min-height: 0; position: relative; z-index: 1;
  background: #0a0810; display: flex; align-items: center; justify-content: center;
}
.tc-art img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tc-initials { font-weight: 900; font-size: 1.6rem; color: #3f3f46; }
.tc-bottom {
  position: relative; z-index: 2;
  padding: 6px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
}
.tc-name-row { display: flex; align-items: center; gap: 5px; }
.tc-crest { width: 14px; height: 14px; object-fit: contain; flex-shrink: 0; }
.tc-name {
  font-weight: 800; font-size: 0.78rem; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tc-sub { font-size: 0.62rem; color: #a1a1aa; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-meta {
  display: flex; justify-content: space-between; margin-top: 4px;
  font-size: 0.58rem; font-weight: 700; color: #cbd5e1; letter-spacing: 0.03em;
}
.tc-count {
  position: absolute; bottom: 6px; right: 6px; z-index: 5;
  background: rgba(0,0,0,0.75); border: 1px solid rgba(251,191,36,0.5);
  color: #fbbf24; font-size: 0.65rem; font-weight: 800;
  padding: 2px 6px; border-radius: 999px;
}
.tc-card.selected .tc-frame { outline: 2px solid #fbbf24; }
.tc-card.locked .tc-frame {
  border-color: #3f3f46; background: #18181b; filter: grayscale(0.3);
}
.tc-silhouette { font-size: 2.5rem; color: #27272a; font-weight: 900; }
.locked-art { background: #09090b !important; }

.tc-back .tc-frame {
  align-items: center; justify-content: center;
  background: linear-gradient(160deg, #1e1b4b, #312e81);
  border-color: #6366f1;
}
.tc-back-logo { font-weight: 900; font-size: 1.8rem; letter-spacing: 0.2em; }
.tc-back-sub { font-size: 0.65rem; letter-spacing: 0.25em; color: #a5b4fc; margin-top: 4px; }

/* ========== Tilt 3D + glare ========== */
.tc-card.tc-tilt {
  perspective: 900px;
}
.tc-card.tc-tilt .tc-frame {
  transform-style: preserve-3d;
  transition: transform 0.12s ease-out;
  will-change: transform;
}
.tc-glare {
  position: absolute; inset: 0; z-index: 4;
  pointer-events: none; opacity: 0;
  transition: opacity 0.15s ease;
  mix-blend-mode: soft-light;
  border-radius: inherit;
}

/* ========== Molduras por edição ========== */
.tc-card.ed-mvp .tc-frame {
  border-color: #fbbf24;
  box-shadow: 0 0 0 1px rgba(251,191,36,0.35), 0 8px 24px rgba(251,191,36,0.12);
}
.tc-card.ed-champion .tc-frame {
  border-color: #38bdf8;
  box-shadow: 0 0 0 1px rgba(56,189,248,0.35), 0 8px 24px rgba(56,189,248,0.12);
}
.tc-card.ed-finals .tc-frame {
  border-color: #f472b6;
  box-shadow: 0 0 0 1px rgba(244,114,182,0.35), 0 8px 24px rgba(244,114,182,0.12);
}
.tc-card.ed-allstar .tc-frame {
  border-color: #a78bfa;
  box-shadow: 0 0 0 1px rgba(167,139,250,0.35);
}
.tc-card.ed-icon .tc-frame {
  border-color: #facc15;
  box-shadow: 0 0 18px rgba(250,204,21,0.25);
}
.tc-card.ed-commemorative .tc-frame {
  border-color: #34d399;
  box-shadow: 0 0 0 1px rgba(52,211,153,0.3);
}
.tc-card.ed-breakout .tc-frame { border-color: #fb923c; }
.tc-card.ed-rivalry .tc-frame { border-color: #ef4444; }

.tc-edition.ed-badge-mvp { color: #fbbf24; }
.tc-edition.ed-badge-champion { color: #38bdf8; }
.tc-edition.ed-badge-finals { color: #f472b6; }
.tc-edition.ed-badge-icon { color: #facc15; }
.tc-edition.ed-badge-commemorative { color: #34d399; }

.jc-inv-filters select {
  background: var(--jc-card, #1a1625);
  color: inherit;
  border: 1px solid var(--jc-border, rgba(255,255,255,0.12));
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.78rem;
}

/* ========== Vitrine edit: sticky save + filters ========== */

/* Grid mercado */
.tc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 14px;
}
@media (max-width: 720px) {
  .tc-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
}

/* Preço de mercado sem quebrar a carta Jet */
.tc-market-tag {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(0,0,0,0.78);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.tc-market-tag .tc-price-val {
  font-weight: 800;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.tc-card.rarity-legend .tc-market-tag .tc-price-val { color: #fde68a; }
.tc-card.rarity-epic .tc-market-tag .tc-price-val { color: #e9d5ff; }
.tc-card.rarity-rare .tc-market-tag .tc-price-val { color: #bfdbfe; }

/* Espaço pro tag no bottom da carta */
.tc-card.has-market .tc-bottom { padding-bottom: 28px; }

/* Modal detalhe — carta maior com tilt */
.detail-card-wrap {
  max-width: 220px;
  margin: 0 auto 16px;
  perspective: 900px;
}
.detail-card-wrap .tc-card { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 6px; border-radius: 999px; font-size: 0.62rem; font-weight: 700;
}
.chip.up { background: rgba(34,197,94,.2); color: #4ade80; }
.chip.down { background: rgba(239,68,68,.2); color: #f87171; }
.chip.flat { background: rgba(100,116,139,.25); color: #a1a1aa; }
