/* Sensenig Cinema - Collect. Same tokens and type as the Seerr / Jellyfin themes. */
@font-face {
  font-family: "SC Display";
  src: url("/brand/BebasNeue-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter Variable";
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --sc-accent: #aa5cc3;
  --sc-accent-hover: #bd74d6;
  --sc-bg: #0d0d12;
  --sc-surface: #16161d;
  --sc-text: #f3f1f7;
  --sc-muted: #a9a6b3;
  --sc-field: rgba(42, 40, 52, 0.8);
  --sc-field-border: #706c7c;
  --sc-edge: rgba(255, 255, 255, 0.08);
  --ok: #4fc584;
  --warn: #e3b25a;
  --bad: #e5675f;
}

* { box-sizing: border-box; }
html { background-color: var(--sc-bg); }
html, body { margin: 0; color: var(--sc-text); }
body { background: transparent; }
body {
  font: 16px/1.5 "Inter Variable", ui-sans-serif, system-ui, sans-serif;
  min-height: 100vh;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--sc-accent); color: #fff; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--sc-accent-hover); text-decoration: none; }

html { scrollbar-color: rgba(170, 92, 195, 0.55) transparent; scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(170, 92, 195, 0.45); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }

.display { font-family: "SC Display", "Arial Narrow", sans-serif; font-weight: 400; letter-spacing: 0.05em; }
.muted { color: var(--sc-muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.error { color: var(--bad); margin: 0; }

/* ---------- rotating poster backdrop with the house wash ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--sc-bg); }
.bd-img {
  position: absolute; inset: -20px; background: center / cover no-repeat;
  opacity: 0; transition: opacity 1.6s ease; filter: blur(2px);
}
.bd-img.show { opacity: 1; }
.bd-wash {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at center, rgba(13, 13, 18, 0.25) 0%, rgba(13, 13, 18, 0.85) 75%),
    linear-gradient(180deg, rgba(13, 13, 18, 0.35) 0%, rgba(13, 13, 18, 0.95) 100%);
}
body.in-app .bd-wash {
  background-image: linear-gradient(180deg, rgba(13, 13, 18, 0.7) 0%, rgba(13, 13, 18, 0.96) 45%, var(--sc-bg) 100%);
}

/* ---------- glass card, same as the Jellyfin / Seerr sign-in ---------- */
.glass {
  background: rgba(22, 22, 29, 0.62);
  border: 1px solid var(--sc-edge);
  border-radius: 18px;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

/* ---------- inputs and buttons ---------- */
label { display: grid; gap: 6px; font-size: 14px; color: var(--sc-text); }
input {
  background: var(--sc-field); border: 1px solid var(--sc-field-border); border-radius: 10px;
  padding: 11px 13px; width: 100%; min-width: 0; color: #fff; outline: none;
}
input::placeholder { color: #8e8a99; }
input:focus { border-color: var(--sc-accent); box-shadow: 0 0 0 2px rgba(170, 92, 195, 0.25); }
.btn {
  border-radius: 999px; padding: 10px 18px; cursor: pointer; white-space: nowrap; font-weight: 500;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.22); color: #fff;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.06); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--sc-accent); border-color: var(--sc-accent); }
.btn.primary:hover { background: var(--sc-accent-hover); border-color: var(--sc-accent-hover); }
.btn.big { width: 100%; padding: 13px; font-size: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--sc-accent-hover); cursor: pointer; font-size: inherit; }

/* ---------- sign-in ---------- */
.login-wrap { min-height: 100vh; display: grid; place-content: center; padding: 24px 16px; gap: 22px; }
.login { width: min(400px, 92vw); padding: 28px 26px; display: grid; gap: 14px; }
.logo-lg { width: 78%; margin: 0 auto 2px; display: block; }
.login h1 { margin: 0; text-align: center; font-size: 1.9rem; line-height: 1; }
.login p { margin: -6px 0 4px; font-size: 14px; }
.login .btn { margin-top: 6px; }
.footnote { text-align: center; font-size: 13px; color: var(--sc-muted); margin: 0; line-height: 1.7; }
.footnote strong { color: var(--sc-text); }
.footnote a { font-weight: 600; }

/* ---------- app ---------- */
.top {
  max-width: 600px; margin: 0 auto; padding: 16px 16px 6px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.logo-sm { height: 52px; }
.top-right { text-align: right; display: grid; gap: 2px; }
.top-title { font-size: 1.6rem; line-height: 1; color: var(--sc-text); }
.who { font-size: 13px; color: var(--sc-muted); }

.app { max-width: 600px; margin: 0 auto; padding: 8px 12px 48px; display: grid; gap: 18px; }
.section { font-size: 1.55rem; line-height: 1.1; margin: 4px 4px 10px; color: var(--sc-text); }
.meta { margin: 0 4px 10px; }

.scanner { padding: 14px; display: grid; gap: 12px; }
.reader { border-radius: 12px; overflow: hidden; background: #000; }
.reader:empty { display: none; }
.reader video { width: 100% !important; display: block; }
.reader-idle { text-align: center; padding: 6px 2px 0; }
.reader-idle p { margin: 10px 0 0; }
.manual { display: grid; gap: 8px; }
.row { display: flex; gap: 8px; }

.card { padding: 16px; }
.result { display: grid; grid-template-columns: 112px 1fr; gap: 16px; align-items: start; }
.poster, .noposter {
  width: 112px; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px;
  background: var(--sc-surface); box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.5);
}
.result .title { font-family: "SC Display", "Arial Narrow", sans-serif; letter-spacing: .04em; font-size: 1.85rem; line-height: 1.02; margin: 0; }
.result .year { color: var(--sc-muted); }
.badge {
  display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; border: 1px solid #bd74d6; background: rgba(170, 92, 195, 0.88);
}
.badge.tv { background: rgba(13, 13, 18, 0.78); border-color: var(--sc-accent); }
.result .overview {
  font-size: 13px; color: var(--sc-muted); margin: 10px 0 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.result .open { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; }

.status { margin-top: 16px; border-radius: 14px; padding: 14px 16px; display: grid; gap: 12px; }
.status .label { font-family: "SC Display", "Arial Narrow", sans-serif; letter-spacing: .05em; font-size: 1.6rem; line-height: 1; }
.status .hint { font-size: 13px; color: var(--sc-text); opacity: .8; margin-top: 4px; }
.status.available { background: rgba(79, 197, 132, .12); border: 1px solid rgba(79, 197, 132, .45); }
.status.available .label { color: var(--ok); }
.status.requested, .status.partial { background: rgba(227, 178, 90, .1); border: 1px solid rgba(227, 178, 90, .45); }
.status.requested .label, .status.partial .label { color: var(--warn); }
.status.missing, .status.blocked { background: rgba(229, 103, 95, .1); border: 1px solid rgba(229, 103, 95, .45); }
.status.missing .label, .status.blocked .label { color: var(--bad); }
.status.bought { background: rgba(170, 92, 195, .14); border: 1px solid rgba(189, 116, 214, .55); }
.status.bought .label { color: var(--sc-accent-hover); }

.alts { display: grid; gap: 8px; }
.alt {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left;
  padding: 8px 12px 8px 8px; cursor: pointer; border-radius: 14px; color: inherit;
}
.alt:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 14px 30px rgba(0,0,0,.6); }
.alt .poster, .alt .noposter { width: 44px; border-radius: 7px; box-shadow: none; }
.alt .t { font-weight: 600; }
.alt .y { color: var(--sc-muted); font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.available { background: var(--ok); }
.dot.requested, .dot.partial { background: var(--warn); }
.dot.missing, .dot.blocked { background: var(--bad); }

#nextBtn { margin-top: 16px; }

.recent-list { list-style: none; margin: 0; padding: 4px 14px; }
.recent-list li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--sc-edge); }
.recent-list li:last-child { border-bottom: 0; }
.recent-list .by { color: var(--sc-muted); font-size: 12px; text-align: right; white-space: nowrap; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: rgba(22, 22, 29, 0.92); border: 1px solid rgba(189, 116, 214, .5); padding: 10px 18px; border-radius: 999px;
  max-width: 92vw; z-index: 10; box-shadow: 0 14px 40px rgba(0,0,0,.6); font-size: 14px; text-align: center;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
