:root {
  --bg: #08080d;
  --surface: #0f0f16;
  --card: #141420;
  --card-hover: #1a1a28;
  --border: rgba(255,255,255,0.05);
  --border-hover: rgba(255,255,255,0.10);
  --teal: #3dd9a0;
  --teal-dim: rgba(61,217,160,0.10);
  --fg: #e8e6e1;
  --fg-secondary: #8a8880;
  --fg-muted: #4a4840;
  --tag-bg: rgba(255,255,255,0.06);
  --nav-bg: rgba(8,8,13,0.85);

  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  --radius-pill: 20px;
  --radius-card: 12px;
  --radius-poster: 10px;
  --radius-button: 10px;
  --gutter-page: 48px;

  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-base: 200ms;
}

/* Override the theme — we are doing a full takeover. */
body.mj-redesign,
body.mj-redesign * { box-sizing: border-box; }
html { background: var(--bg); }
body.mj-redesign { margin: 0; padding: 0; background: transparent; color: var(--fg); font-family: var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body.mj-redesign.modal-open { overflow: hidden; }
body.mj-redesign.search-open { overflow: hidden; }
body.mj-redesign::-webkit-scrollbar { width: 8px; background: var(--bg); }
body.mj-redesign::-webkit-scrollbar-thumb { background: var(--card-hover); border-radius: 4px; }

/* Hero title and overview have explicit classes so the theme's global `h1`
   rule (background:#344050, padding:24px, text-align:center, box-shadow!important)
   never targets them. The body.mj-redesign chain wins over body.theme_blue. */
body.mj-redesign .mj-hero-title {
  font-family: var(--font-display) !important;
  font-size: 48px !important; font-weight: 700 !important; letter-spacing: -1px !important;
  color: #fff !important; line-height: 1.1 !important;
  background: none !important; background-color: transparent !important;
  padding: 0 !important; margin: 0 0 12px !important;
  text-align: left !important; box-shadow: none !important;
  text-transform: none !important;
}
body.mj-redesign .mj-hero-title-meta {
  font-weight: 400; color: var(--fg-secondary); letter-spacing: -0.5px;
  font-size: 0.55em; margin-left: 8px; white-space: nowrap;
}
body.mj-redesign .mj-hero-title-runtime {
  display: inline-block; vertical-align: middle;
  font-family: var(--font-body); font-size: 12px; font-weight: 500;
  letter-spacing: 0.3px; color: var(--fg);
  background: var(--tag-bg); border: 1px solid var(--border-hover);
  padding: 4px 10px; border-radius: var(--radius-pill);
  margin-left: 10px; white-space: nowrap;
  position: relative; top: -4px;
}
body.mj-redesign .mj-hero-title-edit {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; margin-left: 10px;
  vertical-align: middle;
  border-radius: 50%; color: var(--fg-secondary);
  background: rgba(255,255,255,0.06);
  transition: background var(--dur-base), color var(--dur-base);
  text-decoration: none;
}
body.mj-redesign .mj-hero-title-edit:hover { background: var(--teal-dim); color: var(--teal); }
body.mj-redesign .mj-hero-overview {
  font-family: var(--font-body); font-size: 15px; line-height: 1.6;
  color: var(--fg-secondary); max-width: 600px; margin: 0 0 16px;
  background: none; padding: 0;
}
body.mj-redesign .section-heading {
  font-family: var(--font-display); font-size: 24px; font-weight: 600;
  color: #fff !important; margin: 0 0 16px !important;
  background: none !important; padding: 0 !important; text-align: left !important;
  box-shadow: none !important;
}

/* --- Navbar (mj- prefixed to avoid Bootstrap/theme collisions) --- */
.mj-navbar {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: auto minmax(320px, 520px) auto;
  grid-template-areas: 'brand search actions';
  align-items: center;
  gap: 24px;
  padding: 14px var(--gutter-page);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}
.mj-nav-brand-group {
  grid-area: brand;
  display: flex; align-items: center; gap: 14px;
  position: relative;
  min-width: 0;
}
.mj-nav-home { display: flex; align-items: center; }
.mj-nav-home img {
  width: 24px; height: 24px;
  filter: invert(1);
  transition: opacity var(--dur-base);
}
.mj-nav-home:hover img { opacity: 0.75; }
.mj-hamburger-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: transparent; border: none; padding: 0;
  color: var(--fg); cursor: pointer; border-radius: 8px;
  transition: background var(--dur-base), color var(--dur-base);
}
.mj-hamburger-btn:hover { background: var(--card-hover); color: var(--teal); }
.mj-hamburger-menu {
  position: absolute; top: calc(100% + 14px); left: 0;
  width: 240px; background: var(--card);
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1100;
}
.mj-hamburger-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mj-hamburger-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 6px;
  font-size: 13px; color: var(--fg); text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.mj-hamburger-menu-item:hover { background: rgba(255,255,255,0.06); color: var(--teal); }
.mj-hamburger-menu-item svg { flex-shrink: 0; color: var(--fg-secondary); }
.mj-hamburger-menu-item:hover svg { color: var(--teal); }
.mj-hamburger-menu-jellyfin { display: block; }
.mj-hamburger-menu-item--pro svg { color: #f3c14b; }
.mj-hamburger-menu-item--pro:hover svg { color: #ffd86b; }
.mj-hamburger-menu-section {
  padding: 10px 12px 4px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-secondary);
}
.mj-hamburger-menu-section:first-child { border-top: none; margin-top: 0; }
.mj-hamburger-menu-count {
  margin-left: auto;
  padding: 1px 7px;
  background: rgba(255,255,255,0.07);
  border-radius: 999px;
  font-size: 11px; font-weight: 600; color: var(--fg-secondary);
}
.mj-hamburger-menu-item:hover .mj-hamburger-menu-count {
  background: rgba(20,184,166,0.15);
  color: var(--teal);
}

.mj-bell-container { position: relative; }
.mj-bell-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  background: transparent; color: var(--fg);
  border: none; border-radius: 50%; cursor: pointer;
  transition: background var(--dur-base), color var(--dur-base);
}
.mj-bell-btn:hover { background: var(--card-hover); color: var(--teal); }
.mj-bell-count {
  position: absolute; top: -2px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #e74c3c; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px;
  border-radius: 999px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.mj-bell-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; max-width: calc(100vw - 32px);
  background: var(--card); border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1100;
}
.mj-bell-dropdown.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mj-bell-header {
  padding: 12px 14px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: #fff;
  text-transform: uppercase; letter-spacing: 0.5px;
  display: flex; justify-content: space-between; align-items: center;
}
.mj-bell-date { font-size: 11px; font-weight: 500; color: var(--fg-secondary); text-transform: none; letter-spacing: 0; }
.mj-bell-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.22) rgba(255,255,255,0.04);
}
.mj-bell-list::-webkit-scrollbar {
  width: 8px;
}
.mj-bell-list::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}
.mj-bell-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.20);
  border: 2px solid var(--card);
  border-radius: 999px;
}
.mj-bell-list::-webkit-scrollbar-thumb:hover {
  background: rgba(61,217,160,0.42);
}
.mj-bell-list::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.mj-bell-item { border-bottom: 1px solid var(--border); }
.mj-bell-item:last-child { border-bottom: none; }
.mj-bell-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  text-decoration: none; color: var(--fg);
  transition: background 0.15s;
}
.mj-bell-link:hover { background: rgba(255,255,255,0.06); }
.mj-bell-poster {
  width: 40px; height: 56px; flex-shrink: 0;
  background: var(--surface); border-radius: 4px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.mj-bell-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mj-bell-poster.is-empty { color: var(--fg-muted); }
.mj-bell-content { min-width: 0; flex: 1; }
.mj-bell-title { font-size: 13px; font-weight: 600; color: var(--fg); margin-bottom: 4px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mj-bell-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 10px; }
.mj-bell-tag {
  display: inline-block; padding: 2px 6px;
  background: var(--tag-bg); color: var(--fg-secondary);
  border-radius: 3px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.mj-bell-tag--new { background: rgba(61,217,160,0.18); color: var(--teal); }
.mj-bell-tag--updated { background: rgba(255,184,0,0.16); color: #ffb800; }
.mj-bell-se { color: var(--teal); font-weight: 600; }
.mj-bell-empty { padding: 24px 14px; text-align: center; color: var(--fg-secondary); font-size: 13px; }

/* Push the global "New Rate" pill left to make room for the bell.
   Default rate-banner sits at right: 95px (avatar at 48 + 32 + 15 gap).
   Bell adds ~48px (36 button + 12 gap). */
body.mj-redesign #mrb-root { right: 158px; }
@media (max-width: 600px) {
  body.mj-redesign #mrb-root { right: 130px; }
}

.nav-search { grid-area: search; width: 100%; justify-self: center; }
.nav-actions { grid-area: actions; display: flex; align-items: center; gap: 12px; justify-self: end; min-width: 0; }

body.mj-redesign .search-container.mj-search-container {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}
body.mj-redesign .search-input,
body.mj-redesign #mj-search-bar {
  width: 100%;
  height: 46px;
  min-width: 0;
  max-width: none;
  background: rgba(18,18,28,0.92);
  border: 1px solid rgba(86,78,150,0.22);
  color: var(--fg);
  padding: 0 18px 0 44px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
  transition: border-color var(--dur-base), background-color var(--dur-base), box-shadow var(--dur-base);
  appearance: none;
  -webkit-appearance: none;
  border-top: 1px solid rgba(86,78,150,0.22);
}
body.mj-redesign .search-input::placeholder,
body.mj-redesign #mj-search-bar::placeholder { color: rgba(184,181,205,0.58); }
body.mj-redesign .search-input:focus,
body.mj-redesign #mj-search-bar:focus {
  width: 100%;
  border-color: rgba(61,217,160,0.34);
  background: rgba(24,24,35,0.96);
  box-shadow: 0 0 0 4px rgba(61,217,160,0.08);
}
body.mj-redesign .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  fill: var(--fg-secondary);
  pointer-events: none;
}
body.mj-redesign .mj-search-output {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  right: auto;
  width: 100%;
  max-height: min(70vh, 560px);
  background: rgba(15,15,22,0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.42);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition: opacity var(--dur-base), transform var(--dur-base), visibility var(--dur-base);
}
body.mj-redesign .mj-search-output.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
body.mj-redesign .mj-search-meta {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-secondary);
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
body.mj-redesign .mj-search-results {
  list-style: none;
  margin: 0;
  padding: 8px;
  max-height: min(60vh, 500px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
body.mj-redesign .mj-search-results::-webkit-scrollbar { display: none; }
body.mj-redesign .mj-search-results li { margin: 0; }
body.mj-redesign .mj-search-result-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background-color var(--dur-base);
  cursor: pointer;
}
body.mj-redesign .mj-search-result-link:hover { background: rgba(255,255,255,0.06); }
body.mj-redesign .mj-result-poster {
  flex: 0 0 48px;
  width: 48px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}
body.mj-redesign .mj-result-poster img,
body.mj-redesign .mj-result-poster-placeholder {
  width: 100%;
  height: 100%;
  display: block;
}
body.mj-redesign .mj-result-poster img { object-fit: cover; }
body.mj-redesign .mj-result-poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.35);
}
body.mj-redesign .mj-result-poster-placeholder svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
body.mj-redesign .mj-result-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}
body.mj-redesign .mj-result-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.mj-redesign .mj-result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--fg-secondary);
  font-size: 12px;
}
body.mj-redesign .mj-result-year { color: var(--fg-secondary); }
body.mj-redesign .mj-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--fg-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.mj-redesign .mj-badge.tv { background: rgba(233,30,99,0.16); color: #f48fb1; }
body.mj-redesign .mj-badge.movie { background: rgba(61,217,160,0.14); color: #7ce4be; }
body.mj-redesign .mj-badge.netflix { background: rgba(229,9,20,0.16); color: #ff6d78; }
body.mj-redesign .mj-badge.hbo { background: rgba(126,87,194,0.18); color: #c6afff; }
body.mj-redesign .mj-badge.prime { background: rgba(0,168,225,0.16); color: #77d9ff; }
body.mj-redesign .mj-badge.disney { background: rgba(17,60,207,0.18); color: #8dadff; }
body.mj-redesign .mj-badge.apple { background: rgba(255,255,255,0.12); color: #f1f1f1; }
body.mj-redesign .mj-badge.hulu { background: rgba(30,215,96,0.16); color: #75f0ab; }
body.mj-redesign .mj-badge.paramount { background: rgba(56,130,246,0.18); color: #95c0ff; }
body.mj-redesign .mj-search-empty {
  list-style: none;
  padding: 32px 16px;
  text-align: center;
  color: var(--fg-secondary);
}
body.mj-redesign .mj-search-empty p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}
body.mj-redesign .mj-search-icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--fg);
  cursor: pointer;
  transition: background-color var(--dur-base), border-color var(--dur-base), color var(--dur-base);
}
body.mj-redesign .mj-search-icon-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}
body.mj-redesign .mj-search-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
body.mj-redesign .mj-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  background: rgba(8,8,13,0.985);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-base), visibility var(--dur-base);
}
body.mj-redesign .mj-search-overlay.active {
  opacity: 1;
  visibility: visible;
}
body.mj-redesign .mj-search-overlay-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(15,15,22,0.94);
}
body.mj-redesign .mj-search-overlay-input {
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
body.mj-redesign .mj-search-overlay-input::placeholder { color: var(--fg-muted); }
body.mj-redesign .mj-search-overlay-input:focus {
  border-color: rgba(61,217,160,0.48);
  box-shadow: 0 0 0 4px rgba(61,217,160,0.08);
}
body.mj-redesign .mj-search-overlay-close {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: var(--fg);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
body.mj-redesign .mj-search-overlay-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 28px;
}
body.mj-redesign .mj-search-overlay-meta {
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-secondary);
}
body.mj-redesign .mj-search-overlay-results {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.mj-redesign .mj-search-overlay-results li { margin: 0 0 6px; }
body.mj-redesign .mj-search-overlay-results .mj-search-result-link {
  padding: 12px;
  background: rgba(255,255,255,0.03);
}
body.mj-redesign .mj-search-overlay-results .mj-result-title {
  white-space: normal;
}

.profile-container { position: relative; cursor: pointer; }
.avatar { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; transition: border var(--dur-base); display: block; }
.profile-container:hover .avatar { border-color: var(--teal); }
/* Mirrors the home topbar (.mj-user-dropdown) so the menu looks identical
   across the redesign and the legacy theme. */
.profile-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 200px; background: var(--card);
  border-radius: 4px; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}
.profile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.profile-menu-header {
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--fg-muted);
  display: flex; align-items: center; gap: 10px;
}
.profile-menu-header img { width: 36px; height: 36px; border-radius: 50%; }
.profile-menu-header .name { font-size: 13px; font-weight: 600; color: #fff; }
.profile-menu-header .status { font-size: 10px; color: var(--teal); }
.profile-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 13px; color: var(--fg);
  text-decoration: none;
  transition: background 0.15s;
}
.profile-menu-item:hover { background: rgba(255,255,255,0.08); }
.profile-menu-item svg { width: 18px; flex-shrink: 0; color: var(--fg-secondary); }
.profile-menu-item--account { color: var(--teal); }
.profile-menu-item--account svg { color: var(--teal); }
.profile-menu-divider { border-top: 1px solid var(--fg-muted); margin: 4px 0; }
.profile-menu-item--danger { color: #e74c3c; }
.profile-menu-item--danger svg { color: #e74c3c; }
.profile-menu-item--danger:hover { background: rgba(231,76,60,0.08); }

.profile-signed-out { display: flex; align-items: center; gap: 12px; }
.mj-nav-link { color: var(--fg); text-decoration: none; font-size: 13px; padding: 8px 12px; border-radius: var(--radius-button); transition: color var(--dur-base); }
.mj-nav-link:hover { color: var(--teal); }
.mj-nav-cta { background: var(--teal); color: #000; text-decoration: none; font-size: 13px; font-weight: 600; padding: 8px 18px; border-radius: var(--radius-button); transition: filter var(--dur-base); }
.mj-nav-cta:hover { filter: brightness(1.1); }

/* --- Hero --- */
.hero {
  position: relative; padding: 196px var(--gutter-page) 28px; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-bg {
  position: fixed; inset: 0; z-index: -1;
  background-size: cover; background-position: center 20%;
  background-color: #1a1a28;
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, transparent 0%, rgba(8,8,13,0.35) 55%, rgba(8,8,13,0.7) 90%, var(--bg) 100%),
    linear-gradient(to right, var(--bg) 0%, rgba(8,8,13,0.55) 35%, transparent 75%);
}

.meta-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--tag-bg); color: var(--fg-secondary); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.tag--accent  { background: var(--teal-dim); color: var(--teal); }
.tag--quality { border: 1px solid var(--fg-muted); background: transparent; }

.hero-actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

/* --- Hero meta row: rating + genres + latest-episode badge --- */
body.mj-redesign .mj-meta-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px; margin: 0 0 14px;
}
body.mj-redesign .mj-rating-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(243, 193, 75, 0.10);
  border: 1px solid rgba(243, 193, 75, 0.25);
  color: #f3c14b;
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; letter-spacing: 0.2px;
  white-space: nowrap;
}
body.mj-redesign .mj-rating-pill .mj-rating-value { color: #f3c14b; }
body.mj-redesign .mj-rating-pill .mj-rating-max  { color: rgba(243, 193, 75, 0.55); font-weight: 500; }
body.mj-redesign .mj-genre-chip {
  display: inline-block;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--tag-bg);
  border: 1px solid var(--border-hover);
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 500; letter-spacing: 0.3px;
  white-space: nowrap;
}
body.mj-redesign .mj-tv-latest {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--teal-dim);
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; letter-spacing: 0.2px;
  white-space: nowrap;
}
body.mj-redesign .mj-tv-latest-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 var(--teal);
  animation: mj-tv-latest-pulse 2s infinite;
}
@keyframes mj-tv-latest-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(61, 217, 160, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(61, 217, 160, 0);  }
  100% { box-shadow: 0 0 0 0 rgba(61, 217, 160, 0);    }
}

/* --- Tags row (cast / actor links) below hero actions --- */
body.mj-redesign .mj-tags-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 0;
}
body.mj-redesign .mj-tag-chip {
  display: inline-block;
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--fg-secondary);
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-base), border-color var(--dur-base), background var(--dur-base);
}
body.mj-redesign .mj-tag-chip:hover {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--teal-dim);
}

/* --- Redesigned footer (shared chrome footer for redesign templates) --- */
body.mj-redesign .mj-site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(20,20,32,0.72) 0%, rgba(8,8,13,0.98) 70%),
    var(--bg);
}
body.mj-redesign .mj-site-footer-inner {
  width: min(1180px, calc(100vw - (var(--gutter-page) * 2)));
  margin: 0 auto;
  padding: 34px 0 26px;
}
body.mj-redesign .mj-site-footer-main {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(130px, 0.7fr));
  gap: 34px;
  align-items: start;
}
body.mj-redesign .mj-site-footer-brand { min-width: 0; }
body.mj-redesign .mj-site-footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 12px;
}
body.mj-redesign .mj-site-footer-mark-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(61,217,160,0.11);
  border: 1px solid rgba(61,217,160,0.20);
  color: var(--teal);
}
body.mj-redesign .mj-site-footer-mark-icon svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}
body.mj-redesign .mj-site-footer-copy {
  max-width: 390px;
  margin: 0;
  color: var(--fg-secondary);
  font-size: 13px;
  line-height: 1.55;
}
body.mj-redesign .mj-site-footer-title {
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
body.mj-redesign .mj-site-footer-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.mj-redesign .mj-site-footer-link {
  color: var(--fg-secondary);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
  transition: color var(--dur-base);
}
body.mj-redesign .mj-site-footer-link:hover { color: var(--teal); }
body.mj-redesign .mj-site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
body.mj-redesign .mj-site-footer-code {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0;
}
body.mj-redesign .mj-site-footer-code .year,
body.mj-redesign .mj-site-footer-code .num { color: #d45c62; }
body.mj-redesign .mj-site-footer-code .op { color: var(--fg-secondary); }
body.mj-redesign .mj-site-footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--fg-muted);
  font-size: 12px;
}
body.mj-redesign .mj-site-footer-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}
body.mj-redesign .mj-site-footer-version .ver { color: var(--teal); font-weight: 700; }
body.mj-redesign .mj-site-footer-version .date { color: var(--fg-secondary); }
@media (max-width: 900px) {
  body.mj-redesign .mj-site-footer-inner {
    width: calc(100vw - 40px);
    padding: 30px 0 24px;
  }
  body.mj-redesign .mj-site-footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 28px 24px;
  }
  body.mj-redesign .mj-site-footer-brand { grid-column: 1 / -1; }
  body.mj-redesign .mj-site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 560px) {
  body.mj-redesign .mj-site-footer-main { grid-template-columns: 1fr; }
  body.mj-redesign .mj-site-footer-copy { max-width: none; }
  body.mj-redesign .mj-site-footer-meta { gap: 8px; }
}
/* Body-scoped to outrank theme rules like `body.theme_blue button { background:#008ec0 }`. */
body.mj-redesign .mj-btn {
  font-family: var(--font-display) !important;
  font-size: 14px !important; font-weight: 600 !important;
  padding: 12px 28px !important;
  border-radius: var(--radius-button) !important;
  border: none !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  transition: transform var(--dur-base), filter var(--dur-base);
  text-decoration: none !important;
  line-height: 1 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0 !important; box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
  height: auto !important;
  min-height: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
}
body.mj-redesign .mj-btn:hover  { transform: scale(1.02); filter: brightness(1.1); }
body.mj-redesign .mj-btn:active { transform: scale(0.98); }
body.mj-redesign button.mj-btn::-moz-focus-inner {
  border: 0;
  padding: 0;
}
body.mj-redesign .mj-btn-primary,
body.mj-redesign .mj-btn-primary:hover,
body.mj-redesign .mj-btn-primary:focus {
  background: var(--teal) !important; background-color: var(--teal) !important;
  color: #000 !important;
  /* 1px transparent border so the box model matches .mj-btn-secondary's 1px border. */
  border: 1px solid transparent !important;
}
body.mj-redesign .mj-btn-secondary,
body.mj-redesign .mj-btn-secondary:hover,
body.mj-redesign .mj-btn-secondary:focus {
  background: var(--tag-bg) !important; background-color: var(--tag-bg) !important;
  color: var(--fg) !important;
  border: 1px solid var(--border) !important;
  backdrop-filter: blur(4px);
}
body.mj-redesign .mj-btn svg { width: 16px; height: 16px; fill: currentColor; }

/* --- Favorite button (Simple Favorites plugin), restyled to match the secondary button. --- */
body.mj-redesign .mj-favorite-wrap { display: inline-flex; align-items: stretch; }
/* Theme's style.min.css absolutely positions `.simplefavorite-button.has-count` (top:0;right:0)
   for poster-card overlays. In the redesign's hero-actions row we want it inline. */
body.mj-redesign .simplefavorite-button,
body.mj-redesign .simplefavorite-button.has-count,
body.mj-redesign button.simplefavorite-button.active.has-count {
  position: static !important;
  top: auto !important; right: auto !important; left: auto !important; bottom: auto !important;
}
body.mj-redesign .simplefavorite-button {
  font-family: var(--font-display) !important;
  font-size: 14px !important; font-weight: 600 !important;
  padding: 12px 22px !important;
  border-radius: var(--radius-button) !important;
  border: 1px solid var(--border) !important;
  background: var(--tag-bg) !important; background-color: var(--tag-bg) !important;
  color: var(--fg) !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px;
  line-height: 1 !important; text-transform: none !important; letter-spacing: 0 !important;
  margin: 0 !important; box-shadow: none !important;
  transition: transform var(--dur-base), filter var(--dur-base), background-color var(--dur-base), border-color var(--dur-base), color var(--dur-base);
  text-decoration: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: none !important;
  height: auto !important;
  min-height: 0 !important;
  white-space: nowrap;
  vertical-align: middle;
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: auto !important;
  float: none !important;
}
body.mj-redesign .simplefavorite-button:hover  { transform: scale(1.02); filter: brightness(1.15); border-color: var(--border-hover) !important; }
body.mj-redesign .simplefavorite-button:active { transform: scale(0.98); }
body.mj-redesign button.simplefavorite-button::-moz-focus-inner {
  border: 0;
  padding: 0;
}
/* "Active" / favorited state — teal accent */
body.mj-redesign .simplefavorite-button.active,
body.mj-redesign .simplefavorite-button.active:hover {
  background: var(--teal-dim) !important; background-color: var(--teal-dim) !important;
  border-color: var(--teal) !important;
  color: var(--teal) !important;
}
body.mj-redesign .mj-favorite-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
body.mj-redesign .mj-favorite-icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}
body.mj-redesign .mj-favorite-label {
  display: inline-block;
}
body.mj-redesign .simplefavorite-button-count {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  margin-left: 2px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background: rgba(255,255,255,0.08);
  color: var(--fg-secondary);
  vertical-align: middle;
}
body.mj-redesign .simplefavorite-button.active .simplefavorite-button-count {
  background: rgba(61,217,160,0.18);
  color: var(--teal);
}

/* --- Player modal --- */
.player-modal {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(2,2,4,0.97);
  display: none;
  opacity: 0;
  transition: opacity 220ms var(--ease-default);
}
/* Hide the hero while the modal is open so the GPU isn't compositing it under the player. */
body.modal-open .hero { visibility: hidden; }
/* Hide site-level floating widgets while the player modal is open. Several
   mu-plugins inject fixed-position widgets at z-index 99998+ (subtitle CC
   request, favorites toast, rate banner, admin tool dock, account nudge),
   which would otherwise float over the player. */
body.modal-open #moja-sub-request,
body.modal-open #mlf-toast,
body.modal-open #mrb-root,
body.modal-open #mojaloss-admin-tool-dock,
body.modal-open #mj-account-nudge,
body.modal-open .frb-container {
  display: none !important;
}
.player-modal.is-open { display: flex; opacity: 1; align-items: center; justify-content: center; }
.player-modal-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, 92vw);
  transform: scale(0.97);
  transition: transform 260ms var(--ease-default);
}
.player-modal.is-open .player-modal-inner { transform: scale(1); }
.player-shell {
  position: relative;
  border-radius: var(--radius-card);
  overflow: visible;
  box-shadow: 0 30px 80px rgba(0,0,0,0.75), 0 0 0 1px var(--border-hover);
  background: #000;
}
/* Ambient glow: 32x18 canvas sampled at 10 Hz, CSS-blurred. z-index:-1 keeps the
   blur behind the player's #000 bg so it only shows around the edges. */
#ambient-glow-layer {
  position: absolute;
  top: -5%; left: -5%;
  width: 110%; height: 110%;
  z-index: -1;
  pointer-events: none;
}
#ambient-glow-layer canvas {
  width: 100%; height: 100%;
  filter: blur(50px);
  opacity: 0.6;
  will-change: filter;
}
.player-close {
  position: absolute; top: -44px; right: 0;
  background: rgba(255,255,255,0.06); color: var(--fg);
  border: 1px solid var(--border); border-radius: 999px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--dur-base), color var(--dur-base), border-color var(--dur-base);
}
.player-close:hover { background: var(--teal-dim); color: var(--teal); border-color: var(--teal); }
.player-close svg { width: 14px; height: 14px; fill: currentColor; }
.player-meta { margin-top: 16px; display: flex; align-items: baseline; gap: 12px; font-family: var(--font-display); color: var(--fg); }
.player-meta .t { font-size: 18px; font-weight: 600; }
.player-meta .y { font-size: 13px; color: var(--fg-secondary); }

/* Video.js skin tweaks */
.video-js { font-family: var(--font-body); background-color: #000; }
.video-js .vjs-big-play-button {
  background-color: rgba(8,8,13,0.55);
  border: 2px solid var(--teal);
  border-radius: 50%;
  width: 80px; height: 80px;
  line-height: 76px;
  transition: background-color var(--dur-base), transform var(--dur-base);
}
.video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus {
  background-color: var(--teal-dim);
  border-color: var(--teal);
  transform: translate(-50%, -50%) scale(1.05);
}
.video-js .vjs-control-bar { background-color: rgba(8,8,13,0.92); }
.video-js .vjs-play-progress,
.video-js .vjs-volume-level { background-color: var(--teal); }
.video-js .vjs-slider { background-color: rgba(255,255,255,0.15); }
.video-js .vjs-loading-spinner { border-color: var(--teal); }

/* --- Related grid --- */
.content-section { padding: 16px var(--gutter-page) 32px; max-width: 1400px; margin: 0 auto; }
.section-heading { color: #fff; }
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 12px; }
.movie-card { cursor: pointer; position: relative; text-decoration: none; color: inherit; display: block; }
.poster {
  width: 100%; aspect-ratio: 2/3; border-radius: var(--radius-poster);
  object-fit: cover; background: var(--card); transition: transform 0.3s var(--ease-default), box-shadow 0.3s ease;
  display: block;
}
.movie-card:hover .poster {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0,0,0,0.4);
}
.movie-title { font-size: 13px; font-weight: 500; margin-top: 10px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.movie-year  { font-size: 11px; color: var(--fg-muted); margin-top: 2px; }

/* Hide anything injected by the theme/admin bar that would clash. */
.mj-redesign #wpadminbar { display: none !important; }
.mj-redesign html { margin-top: 0 !important; }

@media (max-width: 1024px) {
  .mj-navbar {
    grid-template-columns: auto minmax(260px, 1fr) auto;
    gap: 18px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    padding-left: 24px;
    padding-right: 24px;
  }

  .content-section {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 820px) {
  .mj-navbar {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand actions'
      'search search';
    gap: 12px 16px;
  }

  .nav-search {
    width: 100%;
  }

  .hero {
    padding-top: 148px;
  }
}

@media (max-width: 640px) {
  .mj-navbar {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'brand actions';
    padding: 12px 20px;
  }

  .nav-search {
    display: none;
  }

  body.mj-redesign .mj-search-icon-btn {
    display: inline-flex;
  }

  .profile-signed-out {
    gap: 8px;
  }

  .mj-nav-link {
    padding: 8px 10px;
    font-size: 12px;
  }

  .mj-nav-cta {
    padding: 8px 14px;
    font-size: 12px;
  }

  .hero {
    min-height: 78vh;
    padding: 132px 20px 48px;
  }

  body.mj-redesign .mj-hero-title {
    font-size: 40px !important;
  }

  .content-section {
    padding: 32px 20px 64px;
  }

  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 420px) {
  .mj-nav-link {
    display: none;
  }

  .hero {
    padding-top: 124px;
  }
}
