: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%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  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,
.profile-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.profile-screen {
  align-items: start;
  padding-top: clamp(36px, 9vh, 94px);
  background:
    radial-gradient(circle at 50% 28%, rgba(245, 158, 11, .12), transparent 34%),
    radial-gradient(circle at 75% 68%, rgba(16, 185, 129, .08), transparent 32%),
    #0f1014;
}

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

.profile-panel {
  position: relative;
  width: min(1240px, 100%);
  min-height: 70vh;
  display: grid;
  align-content: start;
  justify-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 clamp(18px, 4vw, 42px);
}

.profile-panel h1 {
  margin: clamp(54px, 8vh, 88px) 0 0;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  text-align: center;
}

.login-panel {
  width: min(420px, 100%);
}

.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;
}

.settings-toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-toggle-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.settings-toggle-row strong,
.settings-toggle-row small {
  display: block;
}

.settings-toggle-row strong {
  color: var(--text);
  font-size: 14px;
}

.settings-toggle-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tabs button {
  padding: 10px 12px;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.auth-tabs button.active {
  color: #111;
  background: var(--accent);
  border-color: var(--accent);
}

.signup-confirmation {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 1000;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  padding: 14px;
  color: #06130e;
  background: var(--accent-2);
  border: 1px solid rgba(16, 185, 129, .7);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .28);
}

.signup-confirmation strong {
  font-size: 15px;
  font-weight: 900;
}

.signup-confirmation span {
  color: #092016;
  font-size: 14px;
  line-height: 1.45;
}

.signup-confirmation .secondary-button {
  width: max-content;
  margin-top: 4px;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  border-color: rgba(0, 0, 0, .25);
}

.account-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(245, 158, 11, .16), transparent 28%),
    radial-gradient(circle at 80% 15%, rgba(16, 185, 129, .12), transparent 28%),
    linear-gradient(135deg, #17120b 0%, #101010 46%, #071811 100%);
}

.account-panel {
  width: min(520px, 100%);
  padding: 34px;
  background: rgba(23, 23, 23, .94);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}

.account-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 30px;
  margin: 4px 0 14px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.account-badge-success {
  color: #04110c;
  background: var(--accent-2);
}

.account-badge-warning {
  color: #111;
  background: var(--accent);
}

.account-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 7vw, 54px);
  line-height: .95;
  letter-spacing: 0;
}

.account-panel p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.account-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  color: #111;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.account-action:hover {
  filter: brightness(1.08);
}

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;
}

.form-success,
.profile-limit {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(22px, 4vw, 48px);
  margin: clamp(120px, 24vh, 230px) 0 24px;
}

.profile-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 138px;
  min-height: 174px;
  padding: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.profile-card:hover {
  background: transparent;
  transform: translateY(-2px);
}

.profile-avatar {
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  color: #fff;
  border: 4px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .38);
  font-size: 42px;
  font-weight: 900;
  transition: border-color .18s ease, transform .18s ease;
}

.profile-avatar-mo-amber {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .55), transparent 24%),
    linear-gradient(135deg, #f59e0b, #7c2d12 62%, #111);
}

.profile-avatar-mo-teal {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .48), transparent 24%),
    linear-gradient(135deg, #14b8a6, #064e3b 62%, #111);
}

.profile-avatar-mo-sky {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .46), transparent 24%),
    linear-gradient(135deg, #38bdf8, #1e3a8a 62%, #111);
}

.profile-avatar-mo-violet {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .46), transparent 24%),
    linear-gradient(135deg, #a78bfa, #581c87 62%, #111);
}

.profile-avatar-mo-rose {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .46), transparent 24%),
    linear-gradient(135deg, #fb7185, #881337 62%, #111);
}

.profile-avatar-mo-lime {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .5), transparent 24%),
    linear-gradient(135deg, #84cc16, #365314 62%, #111);
}

.profile-avatar-mo-slate {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .42), transparent 24%),
    linear-gradient(135deg, #94a3b8, #1f2937 62%, #111);
}

.profile-avatar-mo-gold {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, .58), transparent 24%),
    linear-gradient(135deg, #fbbf24, #92400e 62%, #111);
}

.profile-card:hover .profile-avatar,
.profile-card:focus-visible .profile-avatar {
  border-color: rgba(255, 255, 255, .86);
  transform: scale(1.04);
}

.profile-card strong {
  max-width: 150px;
  overflow: hidden;
  font-size: 17px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-card small {
  color: var(--muted);
}

.add-avatar {
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .08);
  border-style: dashed;
  font-size: 56px;
}

.profile-remove-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #111;
  background: #fff;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .42);
}

.profile-card.is-editing .profile-avatar {
  filter: brightness(.62);
}

.profile-brand {
  position: absolute;
  top: 0;
  left: clamp(16px, 3vw, 34px);
  color: rgba(255, 255, 255, .78);
  font-weight: 900;
}

.profile-edit-button {
  position: absolute;
  top: 0;
  right: clamp(16px, 3vw, 34px);
  color: var(--text);
  background: transparent;
  border: 0;
  font-size: 16px;
  font-weight: 800;
}

.profile-edit-button.active,
.profile-edit-button:hover {
  color: var(--accent);
}

.profile-pin-form,
.profile-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(440px, 100%);
  margin-top: 18px;
}

.profile-pin-form {
  display: none;
}

.profile-pin-form.is-visible {
  display: grid;
}

.profile-create-form {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  background: rgba(18, 18, 18, .88);
  border: 1px solid rgba(245, 158, 11, .16);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .36);
}

.profile-create-form h2 {
  margin: 0;
}

.profile-create-avatar {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .08);
  border: 3px dashed rgba(255, 255, 255, .24);
  border-radius: 50%;
  font-size: 42px;
  font-weight: 900;
}

.profile-avatar-picker {
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile-avatar-picker legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.profile-avatar-picker > div {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-avatar-option {
  display: block;
  cursor: pointer;
}

.profile-avatar-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.profile-avatar-option .profile-avatar {
  width: 56px;
  height: 56px;
  border-width: 2px;
  font-size: 20px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.profile-avatar-option input:checked + .profile-avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .2), 0 12px 28px rgba(0, 0, 0, .34);
}

.profile-create-actions,
.profile-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-footer-actions {
  margin-top: 16px;
}

.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;
}

.app-shell {
  min-height: 100vh;
  display: block;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.8vw, 34px);
  padding: 18px clamp(24px, 4.2vw, 68px);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .94), rgba(0, 0, 0, .7) 58%, rgba(0, 0, 0, 0));
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 168px;
}

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

.site-brand span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.header-spacer {
  flex: 1 1 auto;
}

.sidebar {
  display: none;
  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: auto;
  text-align: center;
  padding: 9px 0;
  margin: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-weight: 800;
}

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

.content {
  padding: 0 0 56px;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  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 {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.page-heading {
  padding: 126px clamp(24px, 5vw, 72px) 0;
}

.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);
}

.header-search {
  width: min(320px, 22vw);
  min-width: 220px;
}

.header-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.header-search input {
  height: 44px;
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .08);
}

.header-scan-button {
  height: 44px;
  white-space: nowrap;
}

.profile-menu {
  position: relative;
}

.profile-menu summary {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  list-style: none;
  cursor: pointer;
  font-weight: 800;
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
}

.profile-menu .profile-avatar {
  width: 40px;
  height: 40px;
  border-width: 2px;
  font-size: 15px;
  box-shadow: none;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  width: 250px;
  display: grid;
  gap: 4px;
  padding: 12px;
  background: rgba(18, 18, 18, .98);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.profile-dropdown strong {
  padding: 6px 8px 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.profile-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 8px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-align: left;
  font-weight: 750;
}

.profile-dropdown button:hover,
.profile-dropdown button.is-current {
  background: rgba(255, 255, 255, .08);
}

.profile-dropdown hr {
  width: 100%;
  margin: 6px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.profile-dropdown .profile-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

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

.scan-panel,
.library-section,
.live-watch-page,
.rail-section,
.empty-state {
  margin-left: clamp(24px, 5vw, 72px);
  margin-right: clamp(24px, 5vw, 72px);
}

.home-hero + .rail-section {
  margin-top: 4px;
}

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

.section-heading > div:first-child {
  min-width: 0;
}

.rail-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rail-section:not(.is-scrollable) .rail-heading-actions {
  display: none;
}

.rail-view-all,
.rail-arrow {
  height: 34px;
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .9);
  background: rgba(24, 24, 24, .82);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

.rail-view-all {
  padding: 0 13px;
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-arrow {
  width: 34px;
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
}

.rail-view-all:hover,
.rail-arrow:hover {
  border-color: rgba(245, 158, 11, .58);
  background: rgba(245, 158, 11, .14);
}

.home-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: clamp(560px, 74vh, 800px);
  display: grid;
  align-items: end;
  margin: 0 0 -46px;
  padding: clamp(170px, 22vh, 240px) clamp(48px, 7vw, 112px) clamp(136px, 18vh, 210px);
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  isolation: isolate;
}

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

.home-hero::before {
  z-index: 1;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(17, 17, 17, .97) 6%, rgba(17, 17, 17, .76) 17%, rgba(17, 17, 17, .2) 38%, rgba(17, 17, 17, .18) 62%, rgba(17, 17, 17, .74) 84%, var(--bg) 100%),
    linear-gradient(180deg, var(--bg) 0%, rgba(17, 17, 17, .72) 9%, rgba(17, 17, 17, .12) 36%, rgba(17, 17, 17, .72) 76%, var(--bg) 100%);
}

.home-hero::after {
  inset: -2px;
  z-index: 2;
  background:
    radial-gradient(ellipse at 58% 36%, transparent 0%, transparent 34%, rgba(17, 17, 17, .44) 66%, var(--bg) 100%),
    linear-gradient(180deg, var(--bg) 0%, rgba(17, 17, 17, .58) 13%, transparent 34%, rgba(17, 17, 17, .8) 76%, var(--bg) 94%, var(--bg) 100%),
    linear-gradient(90deg, var(--bg) 0%, rgba(17, 17, 17, .82) 8%, transparent 25%, transparent 70%, rgba(17, 17, 17, .84) 89%, var(--bg) 100%);
}

.home-hero-backdrop,
.home-hero-trailer {
  position: absolute;
}

.home-hero-backdrop {
  inset: -10%;
  width: 120%;
  height: 120%;
  z-index: 0;
  object-fit: cover;
  background: var(--bg);
}

.home-hero-trailer {
  z-index: 0;
  border: 0;
  pointer-events: none;
  top: 50%;
  left: 50%;
  width: 150vw;
  height: 84.375vw;
  min-width: 178vh;
  min-height: 100vh;
  transform: translate(-50%, -50%) scale(1.08);
  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(540px, 100%);
  margin-left: 0;
  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 {
  display: none;
}

.home-hero-thumb-strip {
  position: absolute;
  right: clamp(64px, 7vw, 132px);
  bottom: clamp(96px, 14vh, 144px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 7px;
  width: min(540px, 38vw);
}

.home-hero-thumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.home-hero-thumbs::-webkit-scrollbar {
  display: none;
}

.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;
}

.hero-thumb-arrow {
  width: 26px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--text);
  background: rgba(0, 0, 0, .22);
  border: 0;
  border-radius: 4px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  opacity: .7;
}

.hero-thumb-arrow:hover {
  color: #141414;
  background: var(--accent);
  opacity: 1;
}

.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(32px, 7vw, 112px);
  bottom: 42px;
  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);
}


.home-hero {
  width: 100%;
  max-width: 100%;
  margin: 0 0 -46px;
  padding: clamp(170px, 22vh, 240px) clamp(48px, 7vw, 112px) clamp(136px, 18vh, 210px);
  overflow: hidden;
}

.home-hero-backdrop {
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 1;
  filter: saturate(.92) brightness(.84);
}

.home-hero-trailer {
  opacity: 0 !important;
  visibility: hidden;
}

.home-hero-copy {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 3;
  width: min(540px, 100%);
  margin: 0;
}

.home-hero-controls {
  display: none;
}


.home-hero {
  margin-bottom: 0;
  padding-bottom: clamp(190px, 24vh, 280px);
}

.home-hero::after {
  inset: -2px;
  background:
    radial-gradient(ellipse at 58% 34%, transparent 0%, transparent 32%, rgba(17, 17, 17, .42) 66%, var(--bg) 100%),
    linear-gradient(180deg, var(--bg) 0%, rgba(17, 17, 17, .58) 12%, transparent 32%, rgba(17, 17, 17, .42) 58%, rgba(17, 17, 17, .86) 76%, var(--bg) 94%, var(--bg) 100%),
    linear-gradient(0deg, var(--bg) 0%, var(--bg) 14%, rgba(17, 17, 17, .96) 28%, rgba(17, 17, 17, .74) 48%, rgba(17, 17, 17, .28) 72%, transparent 100%),
    linear-gradient(90deg, var(--bg) 0%, rgba(17, 17, 17, .82) 8%, transparent 25%, transparent 70%, rgba(17, 17, 17, .84) 89%, var(--bg) 100%);
}

.home-hero + .rail-section {
  margin-top: 24px;
}

/* Isolated homepage trailer layer: the approved banner remains the layout base. */
.home-hero-video-shell {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease;
  contain: paint;
}

.home-hero-video-shell .home-hero-trailer {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: max(100%, 177.78vh) !important;
  height: max(100%, 56.25vw) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0;
  transform: translate(-50%, -50%) scale(1.08) !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none;
}

.home-hero.is-trailer-ready .home-hero-video-shell {
  opacity: .66;
  visibility: visible;
}

.home-hero.is-trailer-ready .home-hero-backdrop {
  opacity: .42;
}

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

.poster-rail {
  position: relative;
  z-index: 5;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 158px;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.poster-rail.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.poster-rail::-webkit-scrollbar {
  display: none;
}

.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: 68px;
  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;
  overflow: hidden;
  text-indent: -999px;
}

.hero-trailer-button::before {
  content: "Audio";
  text-indent: 0;
  font-size: 12px;
  letter-spacing: 0;
}

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

.hero-trailer-controls .hero-trailer-button {
  width: 46px;
  height: 46px;
  color: rgba(255, 250, 240, .96);
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32);
  font-size: 22px;
  line-height: 1;
  text-indent: 0;
}

.hero-trailer-controls .hero-trailer-button::before {
  content: none;
}

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

.home-hero-controls .hero-trailer-button {
  width: 38px;
  height: 38px;
  color: transparent;
  background: rgba(0, 0, 0, .46);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .34);
  font-size: 0;
  text-indent: 0;
}

.home-hero-controls .hero-trailer-button::before {
  content: "\266A";
  color: rgba(255, 250, 240, .9);
  font-size: 17px;
  line-height: 1;
}

.home-hero-controls .hero-trailer-button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.home-hero-controls .hero-trailer-button:hover::before {
  color: #141414;
}

.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;
}

.live-watch-page {
  display: grid;
  gap: 22px;
}

.live-watch-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
}

.live-watch-heading h1 {
  margin: 2px 0 0;
  font-size: clamp(30px, 4vw, 54px);
}

.live-watch-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.live-watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 20px;
  align-items: start;
}

.live-player-panel,
.live-guide-panel,
.live-now-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 18, 18, .76);
}

.live-player-panel {
  overflow: hidden;
}

.live-player-panel .media-player {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.live-player-panel .player {
  max-height: min(62vh, 620px);
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.live-now-card {
  display: grid;
  gap: 10px;
  margin: 12px;
  padding: 14px;
}

.live-now-card > div {
  display: grid;
  gap: 5px;
}

.live-now-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  color: #0b0b0b;
  background: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.live-now-card strong {
  font-size: 22px;
}

.live-now-card small,
.live-now-card p {
  color: var(--muted);
}

.live-now-card p {
  margin: 0;
  line-height: 1.55;
}

.live-epg-progress {
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
}

.live-epg-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent-2);
  border-radius: inherit;
  transform: scaleX(var(--epg-progress, 0));
  transform-origin: left center;
  transition: transform .35s ease;
}

.live-guide-panel {
  max-height: min(74vh, 760px);
  overflow: hidden;
  padding: 14px;
}

.live-guide-list {
  display: grid;
  gap: 8px;
  max-height: calc(min(74vh, 760px) - 78px);
  overflow: auto;
  padding-right: 4px;
}

.live-guide-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}

.live-guide-item.is-now {
  border-color: rgba(245, 158, 11, .55);
  background: rgba(245, 158, 11, .11);
}

.live-guide-item time {
  color: var(--accent);
  font-weight: 900;
  font-size: 13px;
}

.live-guide-item strong,
.live-guide-item span,
.live-guide-item p {
  display: block;
}

.live-guide-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.live-guide-item p {
  margin: 8px 0 0;
  color: rgba(255, 250, 240, .78);
  font-size: 13px;
  line-height: 1.45;
}

.live-channel-strip {
  min-width: 0;
}

.live-mini-card.active .poster-button {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, .45);
}

.player-pause-backdrop {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  background: #000;
  transition: opacity .22s ease;
}

.player-pause-backdrop img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(.62);
}

.player-pause-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, .18) 46%, rgba(0, 0, 0, .72) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, .78), transparent 44%, rgba(0, 0, 0, .34));
}

.media-player.has-played:not(.is-playing) .player-pause-backdrop {
  opacity: 1;
}

.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-message {
  position: absolute;
  left: 50%;
  bottom: 82px;
  z-index: 7;
  max-width: min(720px, calc(100% - 48px));
  padding: 10px 14px;
  color: rgba(255, 255, 255, .92);
  background: rgba(12, 12, 12, .82);
  border: 1px solid rgba(245, 158, 11, .32);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  transform: translateX(-50%);
}

.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-live-badge {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  padding: 3px 7px;
  color: #0b0b0b;
  background: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.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);
}

.slider-manager {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(18, 18, 18, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.slider-form,
.slider-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1fr) minmax(150px, .7fr) auto;
  gap: 10px;
  align-items: end;
}

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

.slider-row {
  grid-template-columns: minmax(190px, 1fr) minmax(160px, .8fr) minmax(130px, .7fr) 120px minmax(360px, auto);
  padding: 10px;
  background: rgba(24, 24, 24, .76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.slider-main span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

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

.tag-chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  color: rgba(255, 255, 255, .86);
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.muted-tags {
  color: var(--muted);
}

.danger-button {
  color: #fecaca;
  border-color: rgba(248, 113, 113, .35);
}

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

.admin-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin-workspace-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-workspace-card:hover {
  background: rgba(245, 158, 11, .08);
  border-color: rgba(245, 158, 11, .65);
}

.admin-workspace-card strong {
  font-size: 20px;
}

.admin-workspace-card span {
  color: var(--accent);
  font-weight: 800;
}

.admin-workspace-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.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;
}

.bulk-series-select {
  min-height: 36px;
  color: var(--text);
  background: #202020;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}

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

.selected-series-card {
  border-color: rgba(245, 158, 11, .55);
  background: rgba(245, 158, 11, .08);
}

.episode-season-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.episode-season-choice strong,
.episode-season-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-season-choice span {
  color: var(--muted);
  font-size: 13px;
}

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

.episode-season-choice.active span,
.episode-season-choice:hover span {
  color: rgba(20, 20, 20, .78);
}

.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-series-row {
  background: rgba(28, 26, 22, .86);
  border-color: rgba(245, 158, 11, .24);
}

.manage-live-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.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;
}

.live-epg-editor {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.live-epg-editor-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.live-epg-editor-header div {
  display: grid;
  gap: 4px;
}

.live-epg-editor-header span {
  color: var(--muted);
  font-size: 13px;
}

.live-epg-editor-header label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}

.live-epg-editor textarea {
  min-height: 170px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.manage-episodes-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

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

.manage-episode-picker {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
}

.episode-link-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  gap: 10px;
  align-items: end;
}

.episode-link-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

.episode-link-toolbar input {
  width: 100%;
  color: var(--text);
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.manage-episode-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 6px;
  background: rgba(0, 0, 0, .18);
}

.manage-episode-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.series-metadata-results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.metadata-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.metadata-search-row input {
  width: 100%;
  color: var(--text);
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

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

.series-match-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 16, 16, .72);
}

.series-match-card img {
  width: 56px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
}

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

.series-match-card span,
.series-match-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.series-match-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.manage-episode-row.is-hidden {
  opacity: .62;
}

.manage-episode-row div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.manage-episode-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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(4, 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;
}

.crm-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.crm-summary-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: rgba(24, 24, 24, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.crm-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.crm-summary-card strong {
  color: var(--text);
  font-size: 26px;
}

.user-management-layout {
  display: block;
}

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

.user-row-button {
  width: 100%;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  color: var(--text);
  text-align: left;
}

.user-row-button:hover,
.user-row-button.is-selected {
  border-color: rgba(245, 158, 11, .48);
  background: rgba(245, 158, 11, .08);
}

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

.user-status-stack {
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
  font-size: 13px;
}

.user-status-stack strong {
  color: var(--text);
  font-size: 14px;
}

.verify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  min-height: 24px;
  padding: 4px 9px;
  color: rgba(255, 250, 240, .92);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.verify-badge.is-verified {
  color: #06130e;
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.verify-badge.is-pending {
  color: #141414;
  background: var(--accent);
  border-color: var(--accent);
}

.verify-badge.is-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  border-color: var(--line);
}

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

.stream-row {
  display: grid;
  grid-template-columns: 180px 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;
}

.session-row {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(150px, auto);
}

.session-row.is-watching {
  border-color: rgba(16, 185, 129, .38);
  background: rgba(16, 185, 129, .08);
}

.session-person {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
}

.session-status {
  justify-items: end;
  text-align: right;
}

.stream-progress {
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
}

.stream-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.stream-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stream-row span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-empty {
  color: var(--muted);
}

.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-main strong,
.user-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.user-main .user-id-line {
  color: var(--accent);
  font-weight: 800;
}

.user-controls {
  display: grid;
  grid-template-columns: 110px 160px auto auto;
  gap: 8px;
  align-items: center;
}

.user-editor {
  position: relative;
  width: min(860px, calc(100vw - 48px));
  max-height: calc(100vh - 88px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 26px 72px 26px 26px;
  background: rgba(24, 24, 24, .96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
}

.user-editor-backdrop {
  z-index: 35;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 36px 18px;
}

.user-editor-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.user-editor-header .verify-badge {
  grid-column: 2;
  justify-self: start;
}

.user-editor-header h3,
.user-editor-header p {
  margin: 0;
}

.user-editor-header p {
  color: var(--muted);
  font-size: 13px;
}

.user-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.user-editor-actions,
.danger-zone,
.temp-password-panel {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.temp-password-panel {
  padding: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.temp-password-panel label {
  flex: 1 1 260px;
}

.danger-zone {
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.danger-button {
  border-color: rgba(239, 68, 68, .5);
  color: #fecaca;
}

.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) {
  .profile-screen {
    padding-top: 28px;
  }

  .profile-panel h1 {
    margin-top: 54px;
    font-size: 30px;
  }

  .profile-grid {
    gap: 18px;
    margin-top: 64px;
  }

  .profile-card {
    width: 112px;
    min-height: 150px;
  }

  .profile-avatar {
    width: 94px;
    height: 94px;
    font-size: 34px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .site-header {
    min-height: auto;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .96), rgba(0, 0, 0, .82) 78%, rgba(0, 0, 0, 0));
  }

  .site-brand {
    min-width: auto;
  }

  .site-brand span {
    display: none;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    gap: 18px;
  }

  .header-spacer {
    display: none;
  }

  .header-search {
    flex: 1 1 160px;
    min-width: 0;
  }

  .content {
    padding: 0 0 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,
  .crm-summary-grid,
  .user-management-layout,
  .user-row,
  .user-controls,
  .user-editor-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .user-editor {
    position: static;
  }

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

  .manage-search {
    width: 100%;
  }

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

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

  .search-box {
    width: 100%;
  }

  .page-heading {
    padding: 146px 14px 0;
  }

  .home-hero {
    min-height: 68vh;
    margin: 0;
    padding: 142px 18px 178px;
    width: 100%;
    max-width: 100%;
  }

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

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

  .home-hero-thumb-strip {
    left: 18px;
    right: 18px;
    bottom: 60px;
    width: auto;
  }

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

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

  .scan-panel,
  .library-section,
  .live-watch-page,
  .rail-section,
  .empty-state {
    margin-left: 14px;
    margin-right: 14px;
  }

  .live-watch-heading,
  .live-watch-layout,
  .live-epg-editor-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .live-watch-layout {
    gap: 14px;
  }

  .live-guide-panel {
    max-height: none;
  }

  .live-guide-list {
    max-height: 520px;
  }

  .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;
  }
}
