/* DC Plex — What's New. Values taken from the design handoff. */

:root {
  --bg:          #171226;
  --surface:     #1b1430;
  --raised:      #221a33;
  --line:        #2e2444;
  --line-hover:  #47385f;
  --divider:     #241c38;
  --text:        #f4f1f8;
  --muted:       #b3a8c9;
  --dim:         #7d7194;
  --dimmest:     #6d6183;
  --accent:      #ff7a18;
  --accent-hi:   #ff9748;
  --accent-tint: rgba(255, 122, 24, 0.14);

  --ui:   'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap    { max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.wrap-sm { max-width: 1000px; margin: 0 auto; padding: 0 28px; }

.mono { font-family: var(--mono); }

/* ---------------------------------------------------------------- header */

.hdr {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; padding: 34px 0 26px;
}
.hdr-left  { display: flex; align-items: center; gap: 14px; }
.hdr-right { display: flex; align-items: center; gap: 18px; }
.hdr-logo {
  height: 32px; width: auto; display: block;
}
.hdr-rule  { width: 1px; height: 30px; background: var(--line); }
.hdr-title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }

.req {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px;
  font-size: 14px; color: var(--muted); transition: color .12s;
}
.req:hover { color: var(--accent); }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--raised); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}

/* ---------------------------------------------------------------- filters */

.filters {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding-bottom: 26px;
}
.pill {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px;
  border-radius: 17px; font-size: 13.5px; font-weight: 500;
  color: var(--muted); border: 1px solid var(--line); background: transparent;
  transition: border-color .12s, color .12s;
}
.pill:hover { border-color: var(--line-hover); color: var(--text); }
.pill.on {
  background: var(--text); color: var(--bg); border-color: var(--text);
}
.pill-rule { width: 1px; height: 22px; background: var(--line); margin: 0 6px; }

/* ---------------------------------------------------------------- groups */

.group { padding-bottom: 34px; }
.group-hd {
  display: flex; align-items: center; gap: 12px; padding-bottom: 14px;
}
.group-label { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.group-range { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.group-fill  { flex: 1; height: 1px; background: var(--line); }
.group-count { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

.rows { display: flex; flex-direction: column; gap: 8px; }

.row {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 18px;
  align-items: center; padding: 12px 18px 12px 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; transition: background .12s, border-color .12s;
}
@media (hover: hover) {
  .row:hover { background: var(--raised); border-color: var(--line-hover); }
}

.poster {
  width: 62px; height: 93px; border-radius: 8px; overflow: hidden;
  background: var(--raised); border: 1px solid var(--line);
  position: relative; flex: none;
}
.poster img, .detail-poster img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.poster-ph {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.045) 0 2px, transparent 2px 7px);
  position: relative;
}
.poster-ph::after {
  content: '2:3'; position: absolute; left: 5px; bottom: 4px;
  font-family: var(--mono); font-size: 9px; color: var(--dimmest);
}

.row-mid   { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.row-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em;
}
.row-meta  { font-size: 13.5px; color: var(--muted); }
.row-when  { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.chev      { font-size: 20px; color: var(--dimmest); line-height: 1; }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 5px; font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
}
.badge-new_series   { background: var(--accent); color: var(--bg); }
.badge-new_episodes { background: var(--accent-tint); color: var(--accent-hi); }
.badge-film         { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.badge-sm { height: 19px; padding: 0 7px; font-size: 9.5px; }

/* ---------------------------------------------------------------- footnote */

.footnote {
  font-size: 13px; line-height: 1.6; color: var(--dimmest);
  max-width: 620px; padding: 6px 0 44px;
}

/* ---------------------------------------------------------------- cards */

.card-page { padding: 90px 24px; display: flex; justify-content: center; }
.card {
  width: 100%; max-width: 420px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; padding: 40px 36px 32px;
}
.card-wide { max-width: 620px; padding: 44px 40px; }
.card-logo {
  height: 150px; width: auto; display: block; margin: 0 auto 24px;

}
.card h1 { margin: 0 0 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.card p  { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.card .em { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 46px; padding: 0 20px; border-radius: 10px; font-size: 15px;
  font-weight: 700; border: 1px solid transparent; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.btn-primary { background: var(--accent); color: var(--surface); }
.btn-primary:hover { background: var(--accent-hi); }
.btn-secondary {
  background: transparent; border-color: var(--line); color: var(--muted);
  font-weight: 500;
}
.btn-secondary:hover { border-color: var(--line-hover); color: var(--text); }
.btn-block { display: flex; width: 100%; height: 52px; border-radius: 12px; font-size: 16px; }
.btn-row { display: flex; gap: 10px; margin-top: 26px; }

.diamond {
  width: 8px; height: 8px; background: currentColor; transform: rotate(45deg);
}

.reassure {
  display: flex; flex-direction: column; gap: 8px; margin-top: 22px;
  text-align: left; font-size: 13px; line-height: 1.5; color: var(--dim);
}

/* ---------------------------------------------------------------- detail */

.back {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 14px; color: var(--muted); margin-bottom: 26px;
  transition: color .12s;
}
.back:hover { color: var(--accent); }

.detail { display: grid; grid-template-columns: 220px 1fr; gap: 34px; align-items: start; }
.detail-poster {
  width: 220px; height: 330px; border-radius: 14px; overflow: hidden;
  background: var(--raised); border: 1px solid var(--line); position: relative;
}
.detail-poster .poster-ph {
  background: repeating-linear-gradient(135deg,
    rgba(255,255,255,0.045) 0 3px, transparent 3px 10px);
}
.detail-poster .poster-ph::after { content: 'poster — 2:3'; left: 8px; bottom: 7px; }

.detail-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.detail-meta .mono { font-size: 12px; color: var(--dim); letter-spacing: 0.03em; }
.detail h1 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.synopsis { font-size: 15.5px; line-height: 1.6; color: var(--muted); max-width: 560px; margin-top: 14px; }

.section-hd { display: flex; align-items: center; gap: 12px; margin: 40px 0 12px; }
.section-hd .t { font-size: 14px; font-weight: 600; }

.ep {
  display: grid; grid-template-columns: 46px 1fr auto auto; gap: 16px;
  align-items: center; min-height: 46px; border-bottom: 1px solid var(--divider);
}
.ep-no   { font-family: var(--mono); font-size: 12.5px; color: var(--dim); }
.ep-t    { font-size: 15px; }
.ep-rt   { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.ep-when { font-family: var(--mono); font-size: 12px; color: var(--dimmest); text-align: right; min-width: 34px; }

.quiet {
  font-size: 13px; line-height: 1.6; color: var(--dimmest);
  margin-top: 18px; max-width: 520px; padding-bottom: 44px;
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 720px) {
  .wrap, .wrap-sm { padding: 0 18px; }

  .hdr { padding: 16px 0 12px; }
  .hdr-logo { height: 26px; }
  .hdr-rule, .hdr-title { display: none; }
  .req { font-size: 13.5px; }

  .filters { gap: 8px; padding-bottom: 14px; overflow-x: auto; flex-wrap: nowrap; }
  .pill { height: 44px; flex: none; }
  .pill-rule, .pill-range { display: none; }

  .group-hd { padding: 4px 0 10px; }
  .group-label { font-size: 14px; }
  .group-range { display: none; }

  .rows { gap: 6px; }
  .row {
    grid-template-columns: 46px 1fr auto; gap: 14px; min-height: 44px;
    padding: 10px 12px 10px 10px; border-radius: 12px;
  }
  .row:active { background: var(--raised); }
  .poster { width: 46px; height: 69px; border-radius: 6px; }
  .poster-ph::after { display: none; }

  .row-mid { gap: 5px; }
  .row-title {
    font-size: 15px; flex-wrap: nowrap; gap: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
  }
  .row-meta {
    font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .row-tail { display: flex; align-items: center; gap: 8px; }

  .footnote { font-size: 12.5px; line-height: 1.55; }

  .card-page { padding: 40px 18px; }
  .card { padding: 32px 24px 28px; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }

  .detail { grid-template-columns: 96px 1fr; gap: 16px; }
  .detail-poster { width: 96px; height: 144px; border-radius: 10px; }
  .detail-poster .poster-ph::after { display: none; }
  .detail h1 { font-size: 21px; letter-spacing: -0.02em; }
  .synopsis { font-size: 14.5px; }
  .ep { grid-template-columns: 40px 1fr auto; min-height: 44px; }
  .ep-rt { display: none; }
}

/* desktop-only: the inline badge sits beside the title */
@media (min-width: 721px) {
  .row-tail-badge { display: none; }
}
@media (max-width: 720px) {
  .row-title-badge { display: none; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
