/* collector.html — Collector public profile page
   Depends on: base.css
   Requires: Google Fonts (Playfair Display + DM Sans)
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Secondary topbar ────────────────────────────────────────────────────── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
}

.nav-logo {
  flex-shrink: 0;
  align-self: flex-start;
  text-decoration: none;
  transition: transform .2s ease;
}
.nav-logo:hover { transform: translateY(-3px) rotate(-1deg) }
.nav-logo img {
  height: 150px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.5));
}

.logo-spacer { height: 80px }

.topbar-right { display: flex; align-items: center; gap: .5rem; margin-left: auto }
.back-btn { background: none; border: 1px solid var(--border); color: var(--muted); padding: .4rem .9rem; border-radius: 6px; font-size: .82rem; transition: all .2s }
.back-btn:hover { border-color: var(--accent); color: var(--accent) }
.share-wrap { position: relative }
.share-btn { background: none; border: 1px solid var(--border); color: var(--muted); padding: .4rem .9rem; border-radius: 6px; font-size: .82rem; transition: all .2s; cursor: pointer }
.share-btn:hover, .share-btn.open { border-color: var(--accent); color: var(--accent) }
.share-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .3rem; min-width: 170px; z-index: 200; flex-direction: column; gap: 1px; box-shadow: 0 8px 24px rgba(0,0,0,.4) }
.share-menu.open { display: flex }
.share-option { display: flex; align-items: center; gap: .55rem; padding: .5rem .75rem; border-radius: 7px; font-size: .82rem; color: var(--text); text-decoration: none; background: none; border: none; cursor: pointer; width: 100%; text-align: left; transition: background .15s }
.share-option:hover { background: var(--surface2) }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(to bottom, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--border); padding: 2.5rem 1.5rem 2rem }
.hero-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: flex-start; gap: 1.75rem; flex-wrap: wrap }

.avatar-wrap        { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--border2) }
.avatar-img         { width: 100%; height: 100%; object-fit: cover }
.avatar-placeholder { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--teal)); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: #111 }

.hero-info      { flex: 1; min-width: 200px }
.hero-name      { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--text); line-height: 1.2; margin-bottom: .35rem }
.hero-meta      { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .6rem }
.hero-location  { font-size: .8rem; color: var(--muted) }
.hero-since     { font-size: .8rem; color: var(--muted) }
.collector-badge{ display: inline-flex; align-items: center; gap: .45rem; background: linear-gradient(135deg, rgba(200,169,110,.15), rgba(200,169,110,.08)); border: 1px solid rgba(200,169,110,.45); border-radius: 20px; padding: .35rem .85rem; font-size: .78rem; font-weight: 600; color: var(--accent); letter-spacing: .02em; margin-bottom: .75rem }
.hero-bio       { font-size: .88rem; color: #bbb; line-height: 1.6; max-width: 480px; margin-bottom: .85rem }

.stats-row { display: flex; gap: 1.5rem; flex-wrap: wrap }
.stat-item { display: flex; flex-direction: column; gap: .1rem }
.stat-num  { font-size: 1.25rem; font-weight: 700; color: var(--accent); line-height: 1 }
.stat-lbl  { font-size: .65rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em }

/* ── Highlights ──────────────────────────────────────────────────────────── */
.highlights       { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.5rem 0 }
.highlights-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.75rem }
.highlight-card   { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; display: flex; align-items: center; gap: .9rem }
.highlight-cap-img{ width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; overflow: hidden; border: 1px solid var(--border2) }
.highlight-cap-img img { width: 100%; height: 100%; object-fit: cover }
.highlight-label  { font-size: .65rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .2rem }
.highlight-name   { font-size: .9rem; font-weight: 600 }
.highlight-season { font-size: .72rem; color: var(--teal) }

/* ── Tippers toggle ─────────────────────────────────────────────────────── */
.tippers-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  padding: .55rem 1rem;
  cursor: pointer;
  transition: background .15s;
  width: 100%;
  font-family: inherit;
}
.tippers-toggle:hover { background: var(--surface2) }
.tippers-toggle.open { border-radius: 12px 12px 0 0 }
.tippers-toggle-icon { font-size: .7rem; color: var(--muted); transition: transform .2s }
.tippers-toggle.open .tippers-toggle-icon { transform: rotate(180deg) }

/* ── Collection ──────────────────────────────────────────────────────────── */
.collection     { max-width: 720px; margin: 0 auto; padding: 0 1.5rem 4rem }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem }
.section-title  { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600 }

.cap-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem }
.cap-thumb   { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: border-color .2s, transform .15s; cursor: default; display: block }
a.cap-thumb  { cursor: pointer }
.cap-thumb:hover { border-color: var(--accent); transform: translateY(-2px) }
.cap-thumb-img  { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; overflow: hidden }
.cap-thumb-img img { width: 100%; height: 100%; object-fit: cover }
.cap-thumb-body   { padding: .55rem .65rem }
.cap-thumb-name   { font-size: .75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.cap-thumb-season { font-size: .65rem; color: var(--muted) }

/* ── States ──────────────────────────────────────────────────────────────── */
.private-banner { text-align: center; padding: 3rem 1.5rem; color: var(--muted) }
.private-banner span { font-size: 2.5rem; display: block; margin-bottom: .75rem }
.not-found      { text-align: center; padding: 4rem 1.5rem; color: var(--muted) }

/* Guest teaser gate */
.collection-teaser { position: relative }
.collection-teaser .cap-grid { filter: blur(4px); pointer-events: none; user-select: none; opacity: .7 }
.teaser-gate  { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(to bottom, transparent 0%, rgba(15,15,15,.85) 40%, rgba(15,15,15,.97) 100%); border-radius: 12px; padding: 2rem; text-align: center; gap: 1rem }
.teaser-gate p{ color: var(--muted); font-size: .88rem; max-width: 280px; line-height: 1.5 }
.teaser-signin { display: inline-block; background: var(--accent); color: #111; font-weight: 700; padding: .65rem 1.5rem; border-radius: 8px; font-size: .9rem; text-decoration: none; transition: background .2s }
.teaser-signin:hover { background: var(--teal) }

/* ── Skeleton ─────────────────────────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }

/* ── Milestone badges ────────────────────────────────────────────────────── */
.milestone-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem }
.milestone-chip  {
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(200,169,110,.07); border: 1px solid rgba(200,169,110,.2);
  border-radius: 20px; padding: .18rem .55rem;
  font-size: .68rem; color: var(--muted); white-space: nowrap;
}
.mc-icon { font-size: .8rem }

/* ── Collection stats card ───────────────────────────────────────────────── */
.stats-card {
  max-width: 720px; margin: 1.25rem auto 0; padding: 0 1.5rem;
}
.stats-card-title {
  font-size: .65rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 600; margin-bottom: .6rem;
}
.stats-card-seasons { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .5rem }
.stat-pill {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: .25rem .65rem; font-size: .75rem; color: var(--muted);
}
.stat-pill strong { color: var(--text); font-weight: 600 }
.stats-card-top { font-size: .75rem; color: var(--muted) }
.stats-card-top strong { color: var(--text) }

/* ── Report button ───────────────────────────────────────────────────────── */
.report-btn { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 8px; font-size: .78rem; font-weight: 500; cursor: pointer; border: 1px solid transparent; background: none; color: var(--muted); transition: all .2s; margin-top: .5rem }
.report-btn:hover { border-color: var(--danger); color: var(--danger) }
.report-btn:disabled { opacity: .5; cursor: default; pointer-events: none }

/* ── Report modal ─────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 1rem }
.modal-overlay.hidden { display: none }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 420px; box-shadow: 0 24px 64px rgba(0,0,0,.6) }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--border) }
.modal-title { font-weight: 600; font-size: .95rem }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: .2rem .4rem; border-radius: 4px; transition: color .15s }
.modal-close:hover { color: var(--text) }
.modal-body { padding: 1.25rem 1.3rem }
.form-group { margin-bottom: 1rem }
.form-group label { display: block; font-size: .82rem; color: var(--text2); margin-bottom: .4rem; font-weight: 500 }
.form-group select, .form-group textarea { width: 100%; background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; color: var(--text); padding: .55rem .75rem; font-size: .88rem; font-family: inherit; transition: border-color .15s }
.form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent) }
.form-group textarea { resize: vertical; min-height: 80px }
.form-actions { display: flex; gap: .65rem; justify-content: flex-end; margin-top: 1.1rem }
.btn-cancel { background: var(--surface2); border: 1px solid var(--border2); color: var(--text2); padding: .55rem 1.1rem; border-radius: 8px; font-size: .88rem; cursor: pointer; transition: all .15s }
.btn-cancel:hover { border-color: var(--border); color: var(--text) }
.btn-save { background: var(--accent); border: 1px solid transparent; color: #111; padding: .55rem 1.25rem; border-radius: 8px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .15s }
.btn-save:hover { background: var(--accent2) }
.btn-save:disabled { opacity: .6; cursor: default }
.error-msg { color: var(--danger); font-size: .82rem; min-height: 1.2em; margin-top: .25rem }

/* ── Item lightbox ─────────────────────────────────────────────────────────── */
.item-lb-modal { max-width: 480px; overflow: hidden }
.item-lb-photo { width: 100%; aspect-ratio: 4/3; background: var(--surface2); overflow: hidden }
.item-lb-photo img { width: 100%; height: 100%; object-fit: cover }
.item-lb-photo .item-lb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 4rem; color: var(--muted) }
.item-lb-actions { display: flex; gap: .65rem; align-items: center; margin-top: 1rem }
.item-lb-link { display: inline-flex; align-items: center; gap: .4rem; background: var(--accent); color: #111; border-radius: 8px; padding: .55rem 1.1rem; font-size: .88rem; font-weight: 600; text-decoration: none; transition: background .15s }
.item-lb-link:hover { background: var(--accent2) }
.item-lb-brand { font-size: .8rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem }
.item-lb-desc  { font-size: .88rem; color: var(--text2); line-height: 1.55; margin-bottom: .25rem }
.item-card { cursor: pointer }
.item-card:hover .cap-thumb-img { opacity: .85 }

/* ── Tip button ───────────────────────────────────────────────────────────── */
.tip-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem 1.1rem; border-radius: 8px; font-size: .82rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border2); background: none; color: var(--muted); transition: all .2s; margin-top: .5rem }
.tip-btn:hover  { border-color: var(--accent); color: var(--accent) }
.tip-btn.tipping{ background: var(--accent); border-color: var(--accent); color: #111 }
.tip-btn.tipping:hover { background: transparent; color: var(--danger); border-color: var(--danger) }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) { .highlights-grid { grid-template-columns: 1fr } }

@media (max-width: 640px) {
  .nav-logo img { height: 80px !important }
  .logo-spacer  { height: 0 }
  .topbar       { padding: 0 1rem !important; height: 56px }

  /* Bottom tab bar */
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)) }

  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 56px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #111;
    border-top: 1px solid var(--border);
    z-index: 150;
  }
  .bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; color: var(--muted);
    text-decoration: none; -webkit-tap-highlight-color: transparent; transition: color .15s;
  }
  .bottom-nav-item.active { color: var(--accent) }
  .bottom-nav-icon  { font-size: 1.25rem; line-height: 1 }
  .bottom-nav-label { font-size: .6rem; font-weight: 500; letter-spacing: .02em }
}

.bottom-nav { display: none }
.more-drawer { display: none }
.more-overlay { display: none }
