/* ============================================
   Rose Cards — Dark Collector Theme
   ============================================ */
:root {
  --bg: #0a0a0c;
  --bg-2: #111114;
  --panel: #15151a;
  --panel-2: #1c1c22;
  --border: #2a2a32;
  --text: #efece4;
  --muted: #8c8a82;
  --gold: #f5c842;
  --gold-soft: rgba(245, 200, 66, 0.14);
  --red: #e84545;
  --red-soft: rgba(232, 69, 69, 0.14);
  --blue: #3aa0ff;
  --blue-soft: rgba(58, 160, 255, 0.14);
  --green: #3ecf8e;

  /* team accents */
  --spurs-bg: #0a0a0a;
  --spurs-fg: #c4c4c4;
  --pats-bg: #0b2240;
  --pats-fg: #c60c30;
  --oilers-bg: #041e42;
  --oilers-fg: #fc4c02;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245,200,66,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(232,69,69,0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  /* Subtle grain */
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(245,200,66,0.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(232,69,69,0.05), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ---------- Banner ---------- */
.banner {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.banner-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}
.banner-checking { background: rgba(140,138,130,0.12); color: var(--muted); }
.banner-ok       { background: rgba(62,207,142,0.10); color: var(--green); }
.banner-err      { background: rgba(232,69,69,0.10);  color: var(--red); }

/* ---------- Layout ---------- */
.shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* ---------- Hero ---------- */
.hero { padding-top: 18px; }
.title-wrap { margin-bottom: 36px; }
.title {
  font-family: 'Bebas Neue', Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(64px, 14vw, 132px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--text);
  text-shadow: 0 4px 24px rgba(0,0,0,0.6);
}
.title-underline {
  width: 120px;
  height: 6px;
  margin-top: 10px;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: 0 0 22px rgba(245,200,66,0.5);
}
.subtitle {
  margin-top: 14px;
  color: var(--muted);
  font-size: 16px;
  max-width: 520px;
}

/* ---------- Fan logo ---------- */
.fan {
  position: relative;
  height: 220px;
  margin: 28px 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fan-card {
  position: absolute;
  width: 130px;
  height: 188px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px;
  text-align: center;
  font-family: 'Bebas Neue', Impact, sans-serif;
  letter-spacing: 0.06em;
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
  transition: transform 220ms ease;
}
.fan-card .fc-top, .fan-card .fc-bottom { font-size: 13px; opacity: 0.85; }
.fan-card .fc-name { font-size: 18px; line-height: 1; }
.fan-card-1 {
  background: linear-gradient(160deg, var(--spurs-bg), #1a1a1a);
  color: var(--spurs-fg);
  transform: rotate(-16deg) translateX(-112px);
}
.fan-card-2 {
  background: linear-gradient(160deg, var(--pats-bg), #102a55);
  color: #ffffff;
  border-top: 4px solid var(--pats-fg);
  transform: rotate(0deg) translateY(-14px);
  z-index: 2;
}
.fan-card-2 .fc-name { color: var(--pats-fg); }
.fan-card-3 {
  background: linear-gradient(160deg, var(--oilers-bg), #0b3071);
  color: #ffffff;
  border-top: 4px solid var(--oilers-fg);
  transform: rotate(16deg) translateX(112px);
}
.fan-card-3 .fc-name { color: var(--oilers-fg); }
.fan:hover .fan-card-1 { transform: rotate(-20deg) translateX(-128px); }
.fan:hover .fan-card-3 { transform: rotate(20deg) translateX(128px); }

/* ---------- Upload ---------- */
.upload {
  border: 1.5px dashed var(--border);
  background: var(--panel);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
}
.upload-hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  border-radius: 999px;
  padding: 14px 24px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 120ms ease, background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--gold);
  color: #181400;
  box-shadow: 0 10px 30px rgba(245,200,66,0.25);
}
.btn-primary:hover { background: #ffd75a; box-shadow: 0 14px 40px rgba(245,200,66,0.35); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-ebay {
  background: var(--panel-2);
  color: var(--gold);
  border: 1px solid var(--gold);
  margin-top: 18px;
  text-decoration: none;
  font-size: 14px;
  padding: 12px 20px;
}
.btn-ebay:hover { background: var(--gold-soft); }
.btn-icon { font-size: 18px; }

/* ---------- Preview ---------- */
.preview-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}
#preview-img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 12px;
  display: block;
  margin: 0 auto;
}
.preview-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

/* ---------- Progress ---------- */
.progress {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
}
.progress-text { color: var(--text); font-weight: 500; }
.spinner {
  width: 22px; height: 22px;
  border: 3px solid rgba(245,200,66,0.25);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Verdict ---------- */
.verdict {
  border-radius: 18px;
  padding: 28px 24px;
  margin-bottom: 22px;
  text-align: center;
  border: 2px solid var(--border);
  background: var(--panel);
}
.verdict-action {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(48px, 9vw, 80px);
  line-height: 0.95;
  letter-spacing: 0.06em;
}
.verdict-reason {
  font-size: 15px;
  margin-top: 8px;
  opacity: 0.95;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.verdict.sell  { background: var(--red-soft);  border-color: var(--red);  color: var(--red); }
.verdict.keep  { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.verdict.trade { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }

/* ---------- Panel ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 22px;
  margin-bottom: 18px;
}
.panel-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.panel-h h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(245,200,66,0.4);
}
.badge-muted { background: var(--panel-2); color: var(--muted); border-color: var(--border); }
.badge.high   { background: rgba(62,207,142,0.12); color: var(--green); border-color: rgba(62,207,142,0.5); }
.badge.medium { background: var(--gold-soft); color: var(--gold); border-color: rgba(245,200,66,0.5); }
.badge.low    { background: var(--red-soft); color: var(--red); border-color: rgba(232,69,69,0.5); }

/* ---------- KV grid ---------- */
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.kv {
  display: flex; flex-direction: column;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.kv-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.kv-value { font-size: 15px; color: var(--text); font-weight: 600; margin-top: 2px; word-break: break-word; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid rgba(245,200,66,0.5);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ---------- Value grid ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.value-cell {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.vc-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.vc-main  { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 22px; margin-top: 6px; color: var(--text); }
.vc-sub   { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--muted); margin-top: 2px; }
.vc-gold  { color: var(--gold); }
.vc-red   { color: var(--red); }

/* ---------- Sold list ---------- */
.sold-list { display: flex; flex-direction: column; gap: 8px; }
.sold-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
.sold-title { color: var(--text); word-break: break-word; }
.sold-price { font-family: 'JetBrains Mono', monospace; color: var(--gold); font-weight: 700; }
.sold-date  { color: var(--muted); font-size: 12px; }

/* ---------- Other ---------- */
.row-actions { display: flex; justify-content: center; margin-top: 8px; }
.footer { text-align: center; margin-top: 36px; color: var(--muted); font-size: 12px; }
.error-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--red);
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 50;
  max-width: 90vw;
  box-shadow: 0 10px 30px rgba(232,69,69,0.4);
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .shell { padding: 18px 14px 60px; }
  .kv-grid { grid-template-columns: 1fr; }
  .value-grid { grid-template-columns: 1fr; }
  .fan { height: 200px; }
  .fan-card { width: 110px; height: 160px; }
  .fan-card-1 { transform: rotate(-14deg) translateX(-64px); }
  .fan-card-3 { transform: rotate(14deg) translateX(64px); }
  .sold-row { grid-template-columns: 1fr; gap: 4px; }
}
