/* Platform shell: dark tokens from the default design system */
:root {
  --canvas: #000;
  --surface: #1d1d1f;
  --tile: #272729;
  --tile-2: #2a2a2c;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --primary: #0066cc;
  --focus: #0071e3;
  --link: #2997ff;
  --grid: 1440px;
  --font: "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", Inter, sans-serif;
  --display: "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", Inter, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); }
body { font: 400 17px/1.47 var(--font); letter-spacing: -0.374px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* global nav */
.nav {
  position: sticky; top: 0; z-index: 50; height: 48px;
  display: flex; align-items: center; gap: 24px; padding: 0 16px;
  background: rgba(0, 0, 0, .8); backdrop-filter: saturate(180%) blur(20px);
}
.nav .logo { font: 700 17px/1 var(--display); letter-spacing: -0.3px; }
.nav a.tab { font-size: 14px; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
.nav a.tab[aria-current="page"] { color: var(--ink); }
.nav .account { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 12px; }
.nav .account .who { color: var(--muted); max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font-size: inherit; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 480px) { .nav { gap: 17px; } .nav .account .who { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 11px 22px; border-radius: 9999px; border: 1px solid var(--primary);
  font-size: 17px; cursor: pointer; transition: transform .1s;
}
.btn:active { transform: scale(.95); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.secondary { background: transparent; color: var(--link); border-color: var(--link); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; }

/* sections and rows */
.section { padding: 32px 0; }
.section h2 { font: 600 21px/1.19 var(--display); letter-spacing: -0.2px; margin: 0 16px 17px; max-width: var(--grid); }
.row { display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }

.card { flex: none; width: 148px; scroll-snap-align: start; }
.card .poster { aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; background: var(--tile); }
.card .poster img { width: 100%; height: 100%; object-fit: cover; }
.card .name { margin-top: 8px; font-size: 14px; line-height: 1.43; font-weight: 600; }
.card .meta { font-size: 12px; color: var(--muted); }
.card.wide { width: 240px; }
.card.wide .poster { aspect-ratio: 16 / 9; }
.progress { height: 3px; background: var(--tile-2); border-radius: 2px; margin-top: 6px; }
.progress span { display: block; height: 100%; background: var(--link); border-radius: 2px; }

.chip { display: inline-block; font-size: 12px; padding: 4px 10px; border-radius: 9999px; background: var(--tile); color: var(--muted); }
.badge { font-size: 12px; color: var(--muted); }
.empty { color: var(--muted); padding: 0 16px; font-size: 14px; }

@media (min-width: 834px) {
  .card { width: 184px; }
  .card.wide { width: 300px; }
  .section h2, .row { padding-left: 32px; padding-right: 32px; }
  .section h2 { margin-left: 0; }
}
