:root {
  color-scheme: dark;
  --bg: #111111;
  --panel: #181818;
  --panel-2: #202020;
  --line: rgba(255, 255, 255, .1);
  --text: #f7f2ea;
  --muted: #a7a29a;
  --accent: #f59e0b;
  --accent-2: #10b981;
  --danger: #ef4444;
  --shadow: 0 22px 60px rgba(0, 0, 0, .42);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, .08), transparent 34%),
    linear-gradient(225deg, rgba(16, 185, 129, .08), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: rgba(24, 24, 24, .92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #141414;
  font-weight: 900;
}

.login-panel h1,
.content h1,
.detail-copy h2,
.settings-drawer h2 {
  margin: 18px 0 20px;
  letter-spacing: 0;
}

.login-form,
.settings-form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  color: var(--text);
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 132px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(245, 158, 11, .72);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .14);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
}

.auth-notice {
  position: relative;
  margin: -4px 0 18px;
  padding: 12px 40px 12px 12px;
  color: var(--text);
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(16, 185, 129, .35);
  border-radius: 6px;
  font-size: 13px;
}

.auth-notice button {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 26px;
  height: 26px;
  color: var(--text);
  background: transparent;
  border: 0;
  font-weight: 800;
}

.auth-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.auth-links button {
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 8px;
  font-weight: 700;
}

.auth-links button:hover {
  color: var(--accent);
}

.primary-button,
.secondary-button,
.nav-button,
.icon-button {
  border: 0;
  border-radius: 6px;
}

.primary-button:disabled,
.secondary-button:disabled,
.toggle-button:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  color: #141414;
  background: var(--accent);
  padding: 11px 16px;
  font-weight: 800;
}

.secondary-button {
  color: var(--text);
  background: #2a2a2a;
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-weight: 700;
}

.danger-button {
  color: #fff;
  background: rgba(239, 68, 68, .2);
  border-color: rgba(239, 68, 68, .55);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  background: rgba(18, 18, 18, .82);
  border-right: 1px solid var(--line);
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand span,
.topbar p,
.section-heading span,
.movie-card p,
.detail-copy p,
.file-meta,
.scan-summary span,
.scan-panel p,
.scan-recent span,
.episode-row small,
.manage-main span,
.manage-main p,
.metadata-summary span,
.metadata-warning span {
  color: var(--muted);
}

.nav-button {
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  margin-bottom: 7px;
  color: var(--muted);
  background: transparent;
}

.nav-button:hover,
.nav-button.active {
  color: var(--text);
  background: rgba(255, 255, 255, .07);
}

.content {
  padding: 26px clamp(18px, 3vw, 42px) 48px;
  background: var(--bg);
}

.title-shell .content {
  padding: 0;
  background: var(--bg);
}

.title-shell .sidebar,
.has-title-modal .sidebar {
  background: rgba(5, 6, 8, .92);
}

.has-title-modal .content {
  position: relative;
}

.has-title-modal .topbar,
.has-title-modal .title-background-view {
  filter: brightness(.42);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.topbar h1 {
  margin: 0 0 4px;
  font-size: clamp(30px, 4vw, 48px);
}

.topbar p {
  margin: 0;
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.search-box {
  width: min(320px, 44vw);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 24px 0 14px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

.home-hero {
  position: relative;
  min-height: min(500px, 56vh);
  display: grid;
  align-items: end;
  margin: -28px calc(clamp(18px, 3vw, 42px) * -1) 22px;
  padding: clamp(92px, 15vh, 138px) clamp(24px, 5vw, 72px) clamp(94px, 14vh, 132px);
  overflow: hidden;
  background: #151515;
  cursor: pointer;
}

.home-hero::before,
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero::before {
  z-index: 1;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(17, 17, 17, .86) 8%, rgba(17, 17, 17, .28) 24%, transparent 42%),
    linear-gradient(0deg, var(--bg) 0%, rgba(17, 17, 17, .96) 12%, rgba(17, 17, 17, .58) 34%, rgba(17, 17, 17, .16) 68%, rgba(17, 17, 17, .06) 84%),
    linear-gradient(90deg, rgba(17, 17, 17, .98) 0%, rgba(17, 17, 17, .76) 32%, rgba(17, 17, 17, .18) 70%, rgba(17, 17, 17, .06) 100%);
}

.home-hero::after {
  inset: auto 0 0;
  z-index: 2;
  height: 230px;
  background: linear-gradient(0deg, var(--bg) 0%, rgba(17, 17, 17, .94) 22%, rgba(17, 17, 17, .56) 58%, transparent 100%);
}

.home-hero-backdrop,
.home-hero-trailer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-hero-backdrop {
  z-index: 0;
  object-fit: cover;
  background: #151515;
}

.home-hero-trailer {
  z-index: 0;
  border: 0;
  pointer-events: none;
  transform: scale(1.18);
  transform-origin: center;
  opacity: 1;
  transition: opacity .45s ease;
}

.home-hero.is-intro .home-hero-trailer {
  opacity: 0;
}

.home-hero-copy {
  position: relative;
  z-index: 3;
  width: min(500px, 100%);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
}

.home-hero-copy h2 {
  margin: 10px 0 12px;
  color: #fff;
  font-size: clamp(34px, 5vw, 62px);
  line-height: .94;
}

.home-hero-copy p:not(.watch-facts) {
  max-width: 520px;
  margin: 0 0 24px;
  color: rgba(255, 250, 240, .84);
  line-height: 1.5;
}

.home-hero-controls {
  position: absolute;
  right: clamp(18px, 4vw, 48px);
  bottom: clamp(78px, 13vh, 118px);
  z-index: 4;
}

.home-hero-thumbs {
  position: absolute;
  right: clamp(82px, 8vw, 120px);
  bottom: clamp(84px, 14vh, 126px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(430px, 38vw);
  overflow: hidden;
}

.home-hero-thumbs button {
  width: 72px;
  height: 42px;
  flex: 0 0 auto;
  padding: 0;
  overflow: hidden;
  background: #202020;
  border: 2px solid transparent;
  border-radius: 4px;
  opacity: .74;
}

.home-hero-thumbs button:hover,
.home-hero-thumbs .is-active {
  border-color: var(--accent);
  opacity: 1;
}

.home-hero-thumbs img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.home-hero-dots {
  position: absolute;
  left: clamp(24px, 5vw, 72px);
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.home-hero-dots span {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
}

.home-hero-dots .is-active {
  background: var(--accent);
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 18px;
}

.poster-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.movie-card {
  min-width: 0;
}

.poster-button {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  padding: 0;
  overflow: hidden;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}

.poster-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .18s ease, opacity .18s ease;
}

.poster-button:hover img {
  transform: scale(1.035);
}

.series-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #141414;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.is-missing .poster-button img {
  opacity: .42;
  filter: grayscale(1);
}

.progress-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(0, 0, 0, .42);
}

.progress-bar i {
  display: block;
  height: 100%;
  background: var(--accent-2);
}

.movie-card h3 {
  margin: 10px 0 4px;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card p {
  margin: 0;
  font-size: 12px;
}

.empty-state {
  display: grid;
  place-items: start;
  gap: 12px;
  max-width: 560px;
  margin-top: 80px;
  padding: 28px;
  background: rgba(24, 24, 24, .76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.title-page {
  display: grid;
  gap: 24px;
}

.back-button {
  justify-self: start;
}

.hero-back-button {
  position: absolute;
  left: clamp(18px, 3vw, 42px);
  top: 22px;
  z-index: 2;
}

.title-hero {
  position: relative;
  min-height: 430px;
  display: grid;
  grid-template-columns: 190px minmax(0, 720px);
  gap: 26px;
  align-items: end;
  padding: clamp(22px, 4vw, 42px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  box-shadow: var(--shadow);
}

.watch-hero {
  min-height: min(720px, 72vh);
  grid-template-columns: minmax(0, 820px);
  align-items: end;
  margin: -26px calc(clamp(18px, 3vw, 42px) * -1) 0;
  padding: clamp(92px, 18vh, 190px) clamp(24px, 5vw, 72px) clamp(44px, 8vh, 92px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-backdrop-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #111;
}

.title-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 44% 56%, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .52) 28%, rgba(0, 0, 0, .18) 58%, rgba(0, 0, 0, .08) 100%),
    linear-gradient(90deg, rgba(17, 17, 17, .97) 0%, rgba(17, 17, 17, .86) 34%, rgba(17, 17, 17, .46) 60%, rgba(17, 17, 17, .16) 100%),
    linear-gradient(0deg, rgba(17, 17, 17, .84) 0%, rgba(17, 17, 17, .18) 54%, rgba(17, 17, 17, .48) 100%);
}

.watch-hero::before {
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(17, 17, 17, .92) 16%, rgba(17, 17, 17, .34) 48%, rgba(17, 17, 17, .08) 74%),
    linear-gradient(90deg, rgba(17, 17, 17, .98) 0%, rgba(17, 17, 17, .82) 28%, rgba(17, 17, 17, .3) 58%, rgba(17, 17, 17, .08) 100%);
}

.title-hero > *:not(.hero-backdrop-img):not(.hero-trailer-frame) {
  position: relative;
  z-index: 2;
}

.title-page {
  min-height: 100vh;
  padding: clamp(18px, 4vw, 42px);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, .08), transparent 28%),
    var(--bg);
}

.title-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(22px, 5vh, 96px) clamp(18px, 4vw, 48px);
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(2px);
}

.title-modal {
  position: relative;
  width: min(960px, 100%);
  min-height: min(820px, calc(100vh - clamp(44px, 10vh, 120px)));
  margin: 0 auto;
  overflow: hidden;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, .62);
}

.title-modal .watch-hero {
  min-height: min(540px, 60vh);
  margin: 0;
  padding: clamp(86px, 13vh, 138px) clamp(32px, 5vw, 64px) clamp(38px, 7vh, 74px);
}

.title-modal .watch-hero::before {
  background:
    linear-gradient(0deg, #151515 0%, rgba(21, 21, 21, .94) 13%, rgba(21, 21, 21, .48) 42%, rgba(21, 21, 21, .1) 70%),
    linear-gradient(90deg, rgba(21, 21, 21, .98) 0%, rgba(21, 21, 21, .78) 33%, rgba(21, 21, 21, .22) 68%, rgba(21, 21, 21, .08) 100%);
}

.hero-trailer-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  transform: scale(1.18);
  transform-origin: center;
  opacity: 1;
  transition: opacity .28s ease;
}

.watch-hero.is-trailer-paused .hero-trailer-frame {
  opacity: 0;
}

.hero-trailer-controls {
  position: absolute;
  right: 30px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-trailer-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(245, 158, 11, .3);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 900;
}

.hero-trailer-button:hover {
  color: #141414;
  background: var(--accent);
}

.watch-close-button {
  position: absolute;
  top: 26px;
  right: 26px;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .92);
  background: rgba(0, 0, 0, .18);
  border: 0;
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
}

.watch-close-button:hover {
  background: rgba(255, 255, 255, .12);
}

.watch-copy {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .86);
}

.watch-copy h2 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: clamp(36px, 5.8vw, 68px);
  line-height: .94;
}

.watch-status {
  display: block;
  margin: 0 0 20px;
  color: var(--accent-2);
  font-size: 14px;
}

.watch-facts {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .88);
  font-weight: 800;
}

.metadata-summary.is-compact {
  gap: 12px;
}

.metadata-summary.is-compact span:first-child {
  display: none;
}

.metadata-summary.is-compact p {
  max-width: 500px;
  color: rgba(255, 255, 255, .82);
  line-height: 1.45;
}

.watch-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.watch-primary-button {
  min-width: min(320px, 68vw);
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 26px;
  color: #141414;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  font-weight: 900;
  font-size: 16px;
}

.watch-primary-button:hover {
  background: #fbbf24;
}

.watch-square-button {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  font-size: 30px;
  font-weight: 500;
}

.watch-square-button:hover,
.watch-square-button.is-on {
  color: #141414;
  background: var(--accent);
}

.watch-sections {
  display: grid;
  gap: 26px;
  padding: 0 clamp(32px, 5vw, 64px) clamp(36px, 6vw, 64px);
}

.watch-tabs {
  display: flex;
  gap: clamp(28px, 5vw, 64px);
  padding-top: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.watch-tabs button {
  position: relative;
  padding: 0 0 20px;
  color: rgba(255, 255, 255, .56);
  background: transparent;
  border: 0;
  font-size: 20px;
  font-weight: 900;
}

.watch-tabs button:hover,
.watch-tabs .is-active {
  color: #fff;
}

.watch-tabs .is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: #fff;
  border-radius: 999px;
}

.watch-empty-panel {
  min-height: 150px;
  align-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.watch-empty-panel p {
  margin: 0;
  color: var(--muted);
}

.series-modal {
  width: min(1080px, 100%);
}

.series-hero {
  min-height: min(460px, 54vh);
}

.series-sections {
  padding-bottom: 28px;
}

.series-episodes-panel {
  gap: 14px;
}

.series-episode-list {
  max-height: min(520px, 48vh);
  display: grid;
  gap: 10px;
  overflow: auto;
  padding-right: 6px;
}

.series-episode-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px;
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.series-episode-card:hover {
  border-color: rgba(245, 158, 11, .48);
  background: rgba(255, 255, 255, .075);
}

.series-episode-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  background: #202020;
}

.series-episode-card div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.series-episode-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.series-episode-card strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.series-episode-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.watch-shelf {
  display: grid;
  gap: 12px;
}

.watch-shelf h3 {
  margin: 0;
  color: #fff;
  font-size: 20px;
}

.watch-poster-rail,
.watch-media-rail,
.watch-cast-strip {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 10px;
}

.watch-poster-rail {
  grid-auto-columns: 166px;
}

.watch-poster-card h3 {
  margin: 9px 0 0;
  overflow: hidden;
  color: rgba(255, 255, 255, .86);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-media-rail {
  grid-auto-columns: minmax(260px, 330px);
}

.watch-video-card {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  padding: 0;
  color: #fff;
  background: #101116;
  border: 0;
  border-radius: 6px;
  text-align: left;
}

.watch-video-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  opacity: .82;
}

.watch-video-card span {
  position: absolute;
  left: 16px;
  bottom: 48px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .52);
  border-radius: 999px;
}

.watch-video-card strong {
  display: block;
  padding: 12px;
  font-size: 14px;
}

.watch-cast-strip {
  grid-auto-columns: 112px;
  flex-wrap: nowrap;
  max-width: none;
}

.scan-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
  padding: 16px;
  background: rgba(24, 24, 24, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.scan-panel.is-running {
  border-color: rgba(245, 158, 11, .38);
}

.scan-panel-header,
.scan-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.scan-panel h2,
.scan-panel p {
  margin: 0;
}

.scan-panel h2 {
  font-size: 17px;
}

.scan-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #141414;
  background: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.scan-stats {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.scan-stats span {
  padding: 8px 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}

.scan-stats strong {
  color: var(--text);
}

.scan-current,
.scan-recent,
.scan-errors {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.scan-current span,
.scan-recent span,
.scan-errors strong {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scan-current code,
.scan-errors code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 8px 10px;
  border-radius: 6px;
  background: #101010;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-errors {
  padding: 12px;
  border-radius: 6px;
  background: rgba(239, 68, 68, .08);
  border: 1px solid rgba(239, 68, 68, .22);
}

.scan-errors p {
  display: grid;
  gap: 6px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, .62);
}

.detail-drawer,
.settings-drawer {
  position: relative;
  width: min(820px, 100%);
  height: 100vh;
  overflow: auto;
  padding: 26px;
  background: #151515;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.settings-drawer {
  width: min(520px, 100%);
}

.drawer-close {
  position: absolute;
  right: 18px;
  top: 18px;
}

.icon-button {
  width: 36px;
  height: 36px;
  color: var(--text);
  background: #2a2a2a;
}

.detail-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin: 34px 0 22px;
}

.detail-poster {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .45);
}

.detail-copy {
  max-width: 760px;
  padding: 14px 16px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(0, 0, 0, .42), rgba(0, 0, 0, .16) 78%, transparent);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .92), 0 1px 2px rgba(0, 0, 0, .95);
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-copy h2 {
  margin: 8px 0 8px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: .98;
  color: #fffaf0;
}

.detail-copy > p,
.metadata-summary p,
.metadata-summary span {
  color: rgba(255, 250, 240, .9);
}

.detail-actions,
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.media-player {
  position: relative;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.player-page {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

.standalone-player {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.standalone-player .player {
  width: min(100vw, calc(100vh * var(--video-ratio, 1.777777)));
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100vw;
  max-height: 100vh;
  aspect-ratio: var(--video-ratio, 1.777777);
  object-fit: contain;
  object-position: center center;
}

.player-back-button {
  position: fixed;
  left: 22px;
  top: 20px;
  z-index: 12;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(0, 0, 0, .48);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  font-size: 34px;
  line-height: 1;
  transition: opacity .22s ease, transform .22s ease, background .16s ease;
}

.player-back-button:hover {
  background: rgba(245, 158, 11, .24);
}

.player-page.is-controls-idle .player-back-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
}

.media-player:focus {
  outline: 2px solid rgba(245, 158, 11, .54);
  outline-offset: 3px;
}

.player {
  width: 100%;
  max-height: 64vh;
  display: block;
  background: #000;
}

.player-center-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 4;
  width: 68px;
  height: 68px;
  padding: 0;
  color: #141414;
  background: rgba(245, 158, 11, .94);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
  font-weight: 900;
  font-size: 26px;
  transform: translate(-50%, -50%);
  transition: opacity .16s ease, transform .16s ease;
}

.media-player.is-playing .player-center-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.94);
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8;
  display: grid;
  gap: 8px;
  padding: 52px 16px 14px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .66) 68%, transparent);
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .22s ease, transform .22s ease;
}

.media-player.is-playing.is-controls-idle {
  cursor: none;
}

.media-player.is-playing.is-controls-idle .player-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
}

.player-scrub-wrap {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}

.player-scrub,
.player-buffer {
  position: absolute;
  left: 0;
  right: 0;
}

.player-scrub {
  z-index: 2;
  height: 28px;
  padding: 0;
  opacity: .01;
  cursor: pointer;
}

.player-buffer {
  z-index: 1;
  height: 7px;
  overflow: hidden;
  background: rgba(255, 255, 255, .2);
  border-radius: 99px;
}

.player-buffer::after,
.player-buffer i {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
}

.player-buffer::after {
  width: calc(var(--scrub-value, 0) * 1%);
  background: var(--accent);
}

.player-buffer i {
  width: 0;
  background: rgba(255, 255, 255, .34);
}

.player-hover-preview {
  position: absolute;
  left: 0;
  bottom: 25px;
  z-index: 5;
  width: 154px;
  overflow: hidden;
  background: #101010;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(5px);
  transition: opacity .12s ease, transform .12s ease;
}

.player-hover-preview.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.player-hover-preview img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: #000;
}

.player-hover-preview strong {
  display: block;
  padding: 6px 8px;
  color: var(--text);
  font-size: 12px;
  text-align: center;
}

.player-control-row,
.player-left-controls,
.player-right-controls,
.player-volume,
.player-select {
  display: flex;
  align-items: center;
  gap: 9px;
}

.player-control-row {
  justify-content: space-between;
}

.player-button {
  min-width: 42px;
  min-height: 36px;
  padding: 8px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  font-weight: 900;
  font-size: 14px;
}

.player-button:hover {
  background: rgba(245, 158, 11, .22);
  border-color: rgba(245, 158, 11, .44);
}

.player-time {
  min-width: 112px;
  color: rgba(255, 250, 240, .86);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.player-volume,
.player-select {
  color: rgba(255, 250, 240, .76);
  font-size: 12px;
  font-weight: 800;
}

.icon-select {
  min-height: 36px;
  padding: 0 8px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
}

.icon-select.is-disabled {
  opacity: .42;
}

.player-volume input {
  width: 92px;
  padding: 0;
  accent-color: var(--accent);
}

.player-select select {
  width: 74px;
  min-width: 74px;
  padding: 7px 6px;
  color: var(--text);
  background: rgba(16, 16, 16, .92);
  border-color: rgba(255, 255, 255, .16);
}

.media-player:fullscreen,
.media-player:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  border: 0;
  border-radius: 0;
}

.media-player:fullscreen .player,
.media-player:-webkit-full-screen .player {
  width: min(100vw, calc(100vh * var(--video-ratio, 1.777777)));
  height: auto;
  min-width: 0;
  min-height: 0;
  max-width: 100vw;
  max-height: 100vh;
  aspect-ratio: var(--video-ratio, 1.777777);
  object-fit: contain;
  object-position: center center;
}

.media-player:fullscreen .player-controls,
.media-player:-webkit-full-screen .player-controls {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2147483647;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  padding: 76px 18px 18px;
  background: linear-gradient(0deg, rgba(0, 0, 0, .96), rgba(0, 0, 0, .68) 64%, rgba(0, 0, 0, 0));
}

.media-player:fullscreen .player-button,
.media-player:fullscreen .player-scrub,
.media-player:fullscreen .player-volume input,
.media-player:fullscreen .player-select select,
.media-player:-webkit-full-screen .player-button,
.media-player:-webkit-full-screen .player-scrub,
.media-player:-webkit-full-screen .player-volume input,
.media-player:-webkit-full-screen .player-select select {
  pointer-events: auto;
}

.file-meta,
.scan-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.subtitle-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: rgba(24, 24, 24, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.subtitle-panel > div:first-child,
.subtitle-player-controls label,
.subtitle-upload-form,
.subtitle-results article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subtitle-panel span,
.subtitle-panel small,
.subtitle-results article span {
  color: var(--muted);
  font-size: 13px;
}

.subtitle-panel code {
  color: var(--text);
}

.subtitle-player-controls select,
.subtitle-upload-form select {
  width: 150px;
}

.subtitle-upload-form input[type="file"] {
  min-width: 220px;
}

.subtitle-results {
  display: grid;
  gap: 8px;
}

.subtitle-results article {
  padding: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.subtitle-results article div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.subtitle-results article strong,
.subtitle-results article span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.season-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.season-tab {
  min-height: 38px;
  padding: 8px 12px;
  color: var(--muted);
  background: #202020;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.season-tab:hover,
.season-tab.active {
  color: #141414;
  background: var(--accent);
  border-color: transparent;
}

.metadata-summary {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.metadata-summary p {
  max-width: 680px;
  margin: 0;
  line-height: 1.55;
}

.tagline {
  color: var(--text);
  font-size: 14px;
  font-style: italic;
}

.cast-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 760px;
}

.cast-card {
  width: 96px;
  display: grid;
  gap: 7px;
  padding: 0;
  color: var(--text);
  background: rgba(0, 0, 0, .24);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}

.cast-card:hover {
  border-color: rgba(245, 158, 11, .48);
}

.cast-card img,
.cast-avatar {
  width: 100%;
  aspect-ratio: 2 / 3;
  display: grid;
  place-items: center;
  object-fit: cover;
  background: #202020;
}

.cast-card span:last-child {
  display: grid;
  gap: 2px;
  padding: 0 8px 8px;
  min-width: 0;
}

.cast-card strong,
.cast-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cast-card strong {
  color: var(--text);
  font-size: 12px;
}

.cast-card small {
  color: var(--muted);
  font-size: 11px;
}

.cast-avatar {
  color: #141414;
  background: var(--accent);
  font-size: 28px;
  font-weight: 900;
}

.actor-results {
  display: grid;
  gap: 8px;
}

.trailer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .72);
}

.trailer-modal {
  position: relative;
  width: min(1040px, 100%);
  padding: 20px;
  background: #151515;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.trailer-modal h2 {
  margin: 0 48px 16px 0;
  font-size: 20px;
}

.trailer-modal iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  border-radius: 8px;
  background: #000;
}

.metadata-warning {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(245, 158, 11, .08);
  border: 1px solid rgba(245, 158, 11, .24);
  border-radius: 6px;
}

.metadata-warning code {
  color: var(--text);
}

.manage-list {
  display: grid;
  gap: 10px;
}

.slider-manager {
  margin: 16px 0 18px;
  padding: 14px;
  background: rgba(24, 24, 24, .66);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-heading {
  margin-top: 0;
}

.slider-form,
.slider-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(140px, .8fr) minmax(120px, .7fr) auto;
  gap: 10px;
  align-items: end;
}

.slider-form {
  margin-bottom: 12px;
}

.slider-list {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.slider-row {
  padding: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.slider-main {
  display: grid;
  gap: 4px;
}

.slider-main span,
.muted-tags {
  color: var(--muted);
}

.slider-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tag-bulk-toolbar {
  margin: 0;
}

.tag-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip-row span {
  width: fit-content;
  padding: 3px 7px;
  color: #141414;
  background: rgba(245, 158, 11, .92);
  border-radius: 999px;
  font-weight: 800;
}

.manage-toolbar,
.bulk-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(24, 24, 24, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented-control,
.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented-control button {
  min-height: 36px;
  padding: 8px 11px;
  color: var(--muted);
  background: #202020;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.segmented-control button.active,
.segmented-control button:hover {
  color: #141414;
  background: var(--accent);
  border-color: transparent;
}

.manage-search {
  width: min(360px, 44vw);
}

.select-all-control,
.row-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 800;
}

.select-all-control input,
.row-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.manage-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  background: rgba(24, 24, 24, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manage-row.is-hidden {
  opacity: .68;
}

.manage-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.manage-main strong,
.manage-main span,
.manage-main p,
.manage-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manage-main span,
.manage-main p,
.manage-main small {
  white-space: nowrap;
}

.manage-main p {
  margin: 0;
  font-size: 13px;
}

.manage-title-button {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--text);
  background: transparent;
  border: 0;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manage-title-button:hover {
  color: var(--accent);
}

.manage-credits {
  color: var(--muted);
  font-size: 12px;
}

.manage-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.manage-status span {
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.manage-status .is-on {
  color: #141414;
  background: var(--accent);
  border-color: transparent;
}

.manage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.manage-editor-backdrop {
  z-index: 35;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  padding: 28px;
}

.manage-editor {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px;
  background: #151515;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.manage-editor-header {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: end;
  margin: 0 46px 18px 0;
}

.manage-editor-header img {
  width: 96px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel-2);
}

.manage-editor-header h2 {
  margin: 6px 0;
  font-size: clamp(26px, 4vw, 42px);
}

.manage-editor-header p {
  margin: 0;
  color: var(--muted);
}

.manage-editor-switches,
.asset-upload-row,
.manage-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.manage-editor-switches {
  margin-bottom: 18px;
}

.manage-editor-switches label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-weight: 800;
}

.manage-editor-switches input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.manage-title-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manage-title-form .wide-field {
  grid-column: 1 / -1;
}

.asset-upload-row label {
  flex: 1 1 260px;
}

.manage-editor-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.manage-subtitles {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, .2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.manage-subtitles > div:first-child,
.manage-subtitle-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manage-subtitles span,
.manage-subtitles small {
  color: var(--muted);
  font-size: 13px;
}

.manage-subtitle-form select {
  width: 132px;
}

.manage-subtitle-form input[type="file"] {
  min-width: 220px;
}

.manage-subtitle-results {
  margin-top: 2px;
}

.toggle-button {
  min-height: 36px;
  padding: 8px 10px;
  color: var(--muted);
  background: #202020;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.toggle-button.is-on {
  color: #141414;
  background: var(--accent-2);
}

.episode-list {
  display: grid;
  gap: 10px;
}

.episode-row {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  color: var(--text);
  background: #202020;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
}

.episode-row:hover {
  border-color: rgba(245, 158, 11, .48);
}

.episode-row span {
  color: var(--accent);
  font-weight: 900;
}

.episode-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-section {
  display: grid;
  gap: 16px;
}

.user-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: rgba(24, 24, 24, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-list {
  display: grid;
  gap: 10px;
}

.user-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(24, 24, 24, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.user-row.is-disabled {
  opacity: .62;
}

.user-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #141414;
  background: var(--accent);
  border-radius: 8px;
  font-weight: 900;
}

.user-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-name-button,
.user-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-name-button {
  justify-self: start;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  font-weight: 800;
}

.user-name-button:hover {
  color: var(--accent);
}

.user-main span {
  color: var(--muted);
  font-size: 13px;
}

.user-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  min-width: 76px;
  justify-content: center;
  padding: 7px 10px;
  border-radius: 999px;
  color: #141414;
  background: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
}

.status-pill.is-disabled {
  color: var(--muted);
  background: #202020;
  border: 1px solid var(--line);
}

.user-avatar.is-large {
  width: 96px;
  height: 96px;
  font-size: 32px;
}

.user-editor {
  width: min(840px, 100%);
}

.upload-section {
  display: grid;
  gap: 16px;
}

.upload-form {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 110px 110px minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: rgba(24, 24, 24, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-actions {
  display: flex;
  align-items: end;
}

.upload-progress {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: rgba(24, 24, 24, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-progress div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress span {
  color: var(--muted);
  font-size: 13px;
}

.upload-progress .progress-bar.static {
  position: static;
  display: block;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, .09);
}

@media (max-width: 780px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-brand {
    grid-column: 1 / -1;
    margin: 0;
  }

  .nav-button {
    width: 100%;
    margin: 0;
    text-align: center;
    white-space: nowrap;
  }

  .content {
    padding: 18px 14px 34px;
  }

  .topbar,
  .topbar-actions,
  .subtitle-panel > div:first-child,
  .subtitle-player-controls label,
  .subtitle-upload-form,
  .subtitle-results article,
  .manage-subtitle-form,
  .player-control-row,
  .player-left-controls,
  .player-right-controls,
  .detail-layout,
  .title-hero,
  .manage-toolbar,
  .bulk-toolbar,
  .scan-panel-header,
  .episode-row,
  .manage-row,
  .upload-form,
  .user-form,
  .user-row,
  .user-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .manage-row img {
    width: 96px;
  }

  .manage-search {
    width: 100%;
  }

  .manage-actions {
    justify-content: stretch;
  }

  .manage-actions button {
    flex: 1 1 140px;
  }

  .slider-form,
  .slider-row {
    grid-template-columns: 1fr;
  }

  .slider-actions {
    justify-content: stretch;
  }

  .search-box {
    width: 100%;
  }

  .home-hero {
    min-height: 60vh;
    margin: -18px -14px 18px;
    padding: 96px 18px 126px;
  }

  .home-hero-copy h2 {
    font-size: clamp(34px, 12vw, 54px);
  }

  .home-hero-copy p:not(.watch-facts) {
    display: none;
  }

  .home-hero-controls {
    right: 18px;
    bottom: 54px;
  }

  .home-hero-thumbs {
    left: 18px;
    right: 74px;
    bottom: 60px;
    max-width: none;
  }

  .home-hero-thumbs button {
    width: 58px;
    height: 34px;
  }

  .home-hero-dots {
    left: 18px;
    bottom: 24px;
  }

  .player-controls {
    position: static;
    padding: 12px;
    background: #101010;
  }

  .standalone-player .player-controls {
    position: absolute;
    background: linear-gradient(0deg, rgba(0, 0, 0, .92), rgba(0, 0, 0, .66) 68%, transparent);
  }

  .player {
    max-height: 58vh;
  }

  .standalone-player .player {
    height: auto;
    max-height: 100vh;
  }

  .player-left-controls,
  .player-right-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .player-button,
  .player-select select,
  .player-volume input {
    width: 100%;
  }

  .player-time {
    grid-column: 1 / -1;
  }

  .poster-grid {
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
    gap: 14px;
  }

  .detail-poster {
    width: 142px;
  }

  .title-hero {
    min-height: auto;
    padding: 18px;
  }

  .watch-hero {
    min-height: 74vh;
    margin: -18px -14px 0;
    padding: 86px 18px 42px;
  }

  .title-overlay {
    padding: 12px;
  }

  .title-modal {
    width: 100%;
    min-height: calc(100vh - 24px);
  }

  .title-modal .watch-hero {
    min-height: 62vh;
    margin: 0;
    padding: 78px 18px 36px;
  }

  .series-episode-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .series-episode-card {
    grid-template-columns: 1fr;
  }

  .series-episode-card img {
    max-width: 100%;
  }

  .watch-actions {
    align-items: stretch;
  }

  .watch-primary-button {
    min-width: 0;
    flex: 1 1 auto;
  }

  .cast-card {
    width: 82px;
  }
}
