/* ============================================================
   COLLECTOR — design system
   Media-agnostic showcase (games / books / albums / films).
   Palette anchored on the app: navy #273C52, slate #A1ACBB, blues.
   ============================================================ */

:root {
  /* Brand */
  --navy:        #273C52;
  --navy-900:    #1B2C3D;
  --navy-800:    #213347;
  --navy-700:    #2F4A66;
  --blue-600:    #3A5775;
  --blue-500:    #4A6B8A;
  --slate:       #A1ACBB;
  --slate-400:   #8B97A6;
  --slate-300:   #C3CBD4;

  /* Surfaces (cool-toned, low chroma) */
  --bg:          #EAEEF2;
  --bg-2:        #F3F6F8;
  --card:        #FFFFFF;
  --line:        #E2E8ED;
  --line-soft:   #EDF1F4;

  /* Ink */
  --ink:         #1D2A38;
  --ink-soft:    #5B6B7B;
  --ink-faint:   #8896A4;

  /* Accent (interactive) — kept in the navy family */
  --accent:      #273C52;

  /* Tokens */
  --r-card:  20px;
  --r-tile:  14px;
  --r-pill:  999px;
  --shadow:  0 1px 2px rgba(27,44,61,.04), 0 8px 24px rgba(27,44,61,.07);
  --shadow-lift: 0 2px 6px rgba(27,44,61,.08), 0 20px 44px rgba(27,44,61,.16);
  --pad:     28px;

  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- shared micro-label ---- */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
}

/* =========================================================
   HEADER BAND  (matches the app: COLLECTOR / Video Games)
   ========================================================= */
.app-header {
  background: var(--navy);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.app-header::before { /* faint equalizer texture (matches profile shelves) */
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 16px, transparent 16px 30px);
  -webkit-mask-image: linear-gradient(90deg, #000 0 30%, transparent 62%);
          mask-image: linear-gradient(90deg, #000 0 30%, transparent 62%);
  opacity: .5; z-index: 1; pointer-events: none;
}
.app-header__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 40px 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.app-header__eq {
  display: none;
}
.app-header__eq span { width: 16px; background: #fff; border-radius: 4px 4px 0 0; }
.app-header__titles { position: relative; z-index: 2; }
.app-header__kicker {
  font-size: 12px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--slate); margin: 0 0 4px;
}
.app-header__title {
  font-size: 46px; font-weight: 800; letter-spacing: -.02em;
  margin: 0; color: rgba(255,255,255,.92); line-height: 1;
}
.app-header__title em { font-style: normal; color: rgba(161,172,187,.55); }
.app-header__actions { display: flex; align-items: center; gap: 12px; z-index: 2; }
.app-header__share {
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 8px; display: grid; place-items: center;
  color: rgba(255,255,255,.5); transition: color .15s;
}
.app-header__share:hover { color: rgba(255,255,255,1); }
.app-header__share svg { width: 30px; height: 30px; fill: currentColor; display: block; }
.copy-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-12px);
  background: var(--card); color: var(--navy); border: 1.5px solid var(--navy);
  font-size: 13px; font-weight: 600;
  padding: 10px 20px; border-radius: var(--r-pill);
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 100;
}
.copy-toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* circular / square navy buttons echoing the app */
.icon-btn {
  width: 46px; height: 46px; border-radius: 13px;
  border: 1.4px solid rgba(255,255,255,.34);
  background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer;
  font-size: 22px; line-height: 1; transition: .18s;
}
.icon-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.6); }
.icon-btn--round { border-radius: var(--r-pill); }

/* =========================================================
   PAGE SHELL
   ========================================================= */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 40px 80px;
  display: grid;
  grid-template-columns: 312px 1fr;
  gap: 28px;
  align-items: start;
}

/* =========================================================
   PROFILE SIDEBAR
   ========================================================= */
.profile {
  position: sticky;
  top: 24px;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.profile__avatar {
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 30px; letter-spacing: .02em;
  background: #9EADBD;
  box-shadow: 0 0 0 5px rgba(158,173,189,.5);
}
.profile__avatar--img { background: none; border-radius: 50%; box-shadow: 0 0 0 5px rgba(158,173,189,.5); overflow: hidden; }
.profile__avatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile__name { font-size: 23px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.profile__handle { font-size: 14px; color: var(--blue-500); font-weight: 600; margin: 3px 0 0; }
.profile__bio { font-size: 16px; line-height: 1.55; color: var(--ink-soft); margin: 0; text-wrap: pretty; }
.profile__bio--empty { color: var(--ink-faint); font-style: italic; }

.profile__meta { display: flex; flex-direction: column; gap: 4px; }
.profile__meta-row { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--ink-soft); }
.profile__meta-row .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--slate-300); }

.profile__divider { height: 1px; background: var(--line); margin: 2px 0; }

/* stat strip — mirrors the app's pill (controller 0 · clock ---) */
.profile__stats { display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; gap: 10px; }
.stat--wide { grid-column: 1 / -1; }
.stat {
  background: var(--bg-2); border-radius: var(--r-tile);
  padding: 13px 14px; display: flex; flex-direction: column; gap: 2px;
}
.stat__num { font-size: 22px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.stat__date { font-size: 17px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.stat__label { font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin-top: 2px; }

/* socials */
.socials { display: flex; flex-direction: column; gap: 8px; }
.social {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--ink); font-size: 13.5px;
  padding: 7px 9px; border-radius: 11px; transition: .15s;
}
.social:hover { background: var(--bg-2); }
.social__glyph {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--navy); color: #fff;
}
.social__glyph svg { width: 18px; height: 18px; fill: #fff; display: block; }
.social__glyph svg * { fill: #fff; }
.social__handle { color: var(--ink-soft); font-weight: 600; }

/* =========================================================
   MAIN COLUMN
   ========================================================= */
.main { min-width: 0; }

.collection-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.collection-bar__title { display: flex; align-items: baseline; gap: 12px; padding-left: 10px; }
.collection-bar__title h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.collection-bar__count { font-size: 14px; color: var(--ink-faint); font-weight: 600; }

/* equalizer glyph used next to "Collection" like the app */
.eq-glyph { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.eq-glyph span { width: 4px; border-radius: 2px; background: var(--slate); }

/* ---- filter bar with pickers ---- */
.filter-bar {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin-bottom: 22px;
}

.picker { display: flex; flex-direction: column; gap: 5px; }

.picker__label {
  font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--slate);
  padding-left: 10px;
}

.picker__wrap { position: relative; }

.picker__trigger {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  padding: 8px 12px 8px 14px; border-radius: var(--r-pill);
  border: 1.3px solid var(--line); background: var(--card); color: var(--ink);
  cursor: pointer; white-space: nowrap; transition: border-color .15s;
  min-width: 110px;
}
.picker__trigger:hover { border-color: var(--slate-300); }
.picker[data-open] .picker__trigger { border-color: var(--navy); }

.picker__current { flex: 1; text-align: left; }

.picker__chevron {
  width: 14px; height: 14px; flex: none;
  color: var(--slate); transition: transform .18s;
}
.picker[data-open] .picker__chevron { transform: rotate(180deg); }

.picker__menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 100%;
  background: var(--card); border: 1.3px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lift);
  padding: 6px; list-style: none; margin: 0;
  z-index: 50; max-height: 260px; overflow-y: auto;
}

.picker__opt {
  display: block; width: 100%; text-align: left;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 8px 12px; border: none; background: none;
  border-radius: 9px; cursor: pointer; color: var(--ink);
  white-space: nowrap; transition: background .12s;
}
.picker__opt:hover { background: var(--bg); }
.picker__opt--active { color: var(--navy); font-weight: 700; background: var(--bg-2); }

.filter-apply {
  font-family: var(--font); font-size: 13px; font-weight: 700;
  padding: 8px 20px; border-radius: var(--r-pill);
  border: none; background: var(--navy); color: #fff;
  cursor: pointer; transition: background .15s; white-space: nowrap;
}
.filter-apply:hover { background: var(--navy-700); }

/* =========================================================
   GAME GRID + COVER CARD
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 22px;
}

.card {
  display: flex; flex-direction: column; gap: 11px;
  cursor: pointer; border: none; background: none; padding: 0;
  text-align: left; font-family: var(--font);
  text-decoration: none; color: inherit;
  transition: transform .22s cubic-bezier(.2,.7,.3,1);
}
.card:hover { transform: translateY(-4px); }
.card:active { transform: translateY(-1px) scale(.97); transition-duration: .08s; }

.cover {
  position: relative;
  border-radius: var(--r-tile);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .22s;
  isolation: isolate;
}
.card:hover .cover { box-shadow: var(--shadow-lift); }

.cover__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cover__placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: #c8cfd8; }
.cover__placeholder svg { width: 36px; height: 36px; fill: #fff; opacity: .5; }

/* typographic poster placeholder */
.cover__art {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 14px;
}
.cover__art::after { /* sheen */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(150deg, rgba(255,255,255,.16), rgba(255,255,255,0) 40%, rgba(0,0,0,.28));
}
.cover__toprow { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 2; }
.cover__rating {
  font-size: 9px; font-weight: 800; letter-spacing: .08em;
  color: rgba(255,255,255,.92); border: 1.2px solid rgba(255,255,255,.5);
  padding: 2px 5px; border-radius: 4px;
}
.cover__tag {
  font-size: 9px; font-weight: 800; letter-spacing: .1em;
  background: rgba(255,255,255,.92); color: var(--navy-900);
  padding: 3px 6px; border-radius: 4px;
}
.cover__title {
  position: relative; z-index: 2;
  color: #fff; font-weight: 800; line-height: 1.02;
  font-size: 21px; letter-spacing: -.01em;
  text-transform: uppercase; text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
.cover__hint {
  position: relative; z-index: 2;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.6); margin-top: 6px;
}

/* meta under the cover */
.card__meta { display: flex; flex-direction: column; gap: 2px; padding-left: 5px; }
.card__title { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.card__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.platform-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  color: var(--blue-500);
}
.category-tag {
  font-size: 11px;
  color: var(--blue-500);
}
.card__row .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--slate-300); }

/* format badge — outlined style #2 */
.format-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--navy); border: 1.2px solid var(--slate-300);
  padding: 3px 8px; border-radius: 6px; text-transform: uppercase;
  background: var(--card);
}
.cover .format-badge {
  position: absolute; bottom: 12px; right: 12px; z-index: 2;
}

/* empty state */
.empty {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--ink-faint);
}
.empty h3 { color: var(--ink-soft); font-size: 18px; margin: 0 0 6px; }

/* user-not-found / page-level empty banner */
section.empty {
  grid-column: 1 / -1;
  border: 1.6px dashed var(--slate-300);
  border-radius: var(--r-card);
  background: radial-gradient(120% 90% at 50% -10%, rgba(39,60,82,.05), transparent 60%), var(--bg-2);
  padding: 56px 40px 60px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: inherit;
}
.empty__title { font-size: 25px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0; }
.empty__sub   { font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: 440px; text-wrap: pretty; }
.empty__actions { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }

.pbtn { font-family: var(--font); font-size: 14px; font-weight: 700; border-radius: var(--r-pill); padding: 12px 22px; cursor: pointer; border: 1.5px solid transparent; text-decoration: none; display: inline-flex; align-items: center; gap: 9px; transition: .16s; white-space: nowrap; }
.pbtn--primary { background: var(--navy); color: #fff; }
.pbtn--primary:hover { background: var(--navy-900); transform: translateY(-1px); }

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination { display: flex; align-items: center; gap: 4px; }

.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 8px;
  border-radius: 9px; font-size: 13px; font-weight: 600;
  font-family: var(--font); color: var(--ink-soft);
  text-decoration: none; transition: background .12s, color .12s;
  border: 1.2px solid transparent;
}
.page-btn:hover:not(.page-btn--active):not(.page-btn--disabled) {
  background: var(--card); border-color: var(--line); color: var(--ink);
}
.page-btn--active { background: var(--navy); color: #fff; border-color: var(--navy); }
.page-btn--disabled { opacity: .35; cursor: default; }
.page-btn--prev, .page-btn--next { color: var(--ink); }

.page-ellipsis {
  min-width: 24px; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--ink-faint);
}

.collection-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; margin-top: 10px; border-top: 1px solid var(--line);
}
.collection-footer__count { font-size: 14px; font-weight: 600; color: var(--ink-faint); }

/* =========================================================
   THEME / LAYOUT VARIANTS
   ========================================================= */

/* ---------- IMMERSIVE: dark, larger covers, overlay detail ---------- */
.theme-immersive { background: var(--navy-900); }
.theme-immersive .app-header {
  background: linear-gradient(180deg, #2C435C 0%, var(--navy) 60%, var(--navy-900) 100%);
}
.theme-immersive .profile {
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.theme-immersive .profile__name,
.theme-immersive .collection-bar__title h2 { color: #fff; }
.theme-immersive .profile__bio { color: var(--slate-300); }
.theme-immersive .profile__meta-row { color: var(--slate); }
.theme-immersive .stat { background: rgba(255,255,255,.05); }
.theme-immersive .stat__num { color: #fff; }
.theme-immersive .profile__divider { background: rgba(255,255,255,.1); }
.theme-immersive .social { color: #fff; }
.theme-immersive .social:hover { background: rgba(255,255,255,.06); }
.theme-immersive .social__handle { color: var(--slate); }
.theme-immersive .collection-bar__count { color: var(--slate); }
.theme-immersive .eq-glyph span { background: var(--blue-500); }
.theme-immersive .chip {
  background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); color: var(--slate-300);
}
.theme-immersive .chip:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.theme-immersive .chip[data-active="true"] { background: #fff; border-color: #fff; color: var(--navy-900); }
.theme-immersive .filter-label { color: var(--slate-400); }
.theme-immersive .card__title { color: #fff; }
.theme-immersive .format-badge { background: transparent; color: var(--slate-300); border-color: rgba(255,255,255,.22); }
.theme-immersive .grid { grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 26px; }

/* hover detail overlay (immersive only) */
.cover__overlay {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(0deg, rgba(13,22,31,.92) 0%, rgba(13,22,31,.2) 55%, transparent 100%);
  opacity: 0; transition: opacity .2s; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 14px; gap: 8px;
}
.theme-immersive .card:hover .cover__overlay { opacity: 1; }
.cover__overlay .ov-cat {
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--slate);
}
.cover__overlay .ov-line { display: flex; gap: 8px; align-items: center; }

/* ---------- EDITORIAL: light, airy, featured first tile ---------- */
.theme-editorial { background: var(--bg-2); }
.theme-editorial .page { gap: 40px; }
.theme-editorial .grid { gap: 28px; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); }
.theme-editorial .card--featured { grid-column: span 2; grid-row: span 2; }
.theme-editorial .card--featured .cover { aspect-ratio: auto; height: 100%; min-height: 380px; }
.theme-editorial .card--featured .cover__title { font-size: 38px; }
.theme-editorial .card--featured .card__title { font-size: 18px; }
.theme-editorial .chip { border-radius: 9px; }
.theme-editorial .app-header__title { font-weight: 800; }

@media (max-width: 880px) {
  .page { grid-template-columns: 1fr; }
  .profile { position: static; }
  .app-header__title { font-size: 34px; }
  .theme-editorial .card--featured { grid-column: span 1; grid-row: auto; }
  .theme-editorial .card--featured .cover { aspect-ratio: 3/4; min-height: 0; }
}
