/* Shahid-reference layout measured from MBC Shahid 7.117.0, recolored for Nova. */
:root {
  --nova-bg: #000000;
  --nova-bg-deep: #050505;
  --nova-surface: #0d0d0d;
  --nova-surface-2: #141414;
  --nova-text: #f8f9fb;
  --nova-muted: #aeb7c7;
  --nova-line: rgba(255,255,255,.08);
  --nova-purple: #9B4DFF;
  --nova-blue: #14D7FF;
  --nova-cyan: #F04AD8;
  --oscar-bg: var(--nova-bg);
  --oscar-bg-soft: var(--nova-bg-deep);
  --oscar-surface: var(--nova-surface);
  --oscar-surface-2: var(--nova-surface-2);
  --oscar-surface-3: #1a1a1a;
  --oscar-text: var(--nova-text);
  --oscar-text-2: #cdd3dd;
  --oscar-muted: #8e98a8;
  --oscar-border: rgba(255,255,255,.08);
  --oscar-red: var(--nova-purple);
  --oscar-red-2: #14D7FF;
  --oscar-purple: var(--nova-purple);
  --oscar-cyan: var(--nova-cyan);
  --accent: var(--nova-purple);
  --page-pad: clamp(18px, 2.1vw, 36px);
}

html,
body,
#app,
.app-root {
  background: #000000 !important;
}

body {
  color: var(--nova-text) !important;
  font-family: "Tajawal", "Noto Sans Arabic", "Segoe UI", Arial, sans-serif !important;
}

.oscar-app,
.oscar-app.anime-theme,
.oscar-app.matches-theme {
  --accent: var(--nova-purple) !important;
  background: #000000 !important;
}

/* Splash */
.oscar-splash {
  gap: 6px !important;
  background: #000000 !important;
}

.splash-glow { display: none !important; }
.oscar-splash img {
  width: min(56vw, 260px) !important;
  height: min(56vw, 260px) !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  filter: none !important;
}
.oscar-splash strong { margin-top: -25px !important; font-size: 1.08rem !important; letter-spacing: 1.8px !important; }
.oscar-splash strong span { color: var(--nova-cyan) !important; }
.oscar-loader { width: 110px !important; height: 3px !important; background: #303a49 !important; }
.oscar-loader span { background: linear-gradient(90deg, transparent, var(--nova-purple), var(--nova-cyan), transparent) !important; }

/* Transparent top navigation over the hero. */
.oscar-toolbar,
.oscar-toolbar.home-toolbar,
.oscar-toolbar:not(.home-toolbar) {
  z-index: 145 !important;
  height: calc(68px + var(--safe-top)) !important;
  padding: var(--safe-top) var(--page-pad) 0 !important;
  background: linear-gradient(180deg, rgba(7,10,15,.9), rgba(7,10,15,.4), transparent) !important;
  border: 0 !important;
  box-shadow: none !important;
}

.oscar-toolbar .toolbar-title {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nova-header-logo {
  width: 48px;
  height: 48px;
  padding: 0;
  flex: 0 0 48px;
  border-radius: 9px;
  overflow: hidden;
  background: transparent;
}

.nova-header-logo img { width: 100%; height: 100%; object-fit: cover; }

.nova-top-tabs {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(15px, 3vw, 38px);
  overflow-x: auto;
  scrollbar-width: none;
}
.nova-top-tabs::-webkit-scrollbar { display: none; }
.nova-top-tabs button {
  flex: 0 0 auto;
  padding: 8px 0;
  color: #fff;
  background: transparent;
  font-size: clamp(.82rem, 1.8vw, 1.12rem);
  font-weight: 800;
  white-space: nowrap;
}
.nova-top-tabs button.active { color: var(--nova-cyan); }
.home-search-button { flex: 0 0 auto; }

.oscar-toolbar:not(.home-toolbar) {
  background: linear-gradient(180deg, rgba(10,14,20,.96), rgba(10,14,20,.35), transparent) !important;
}
.oscar-toolbar:not(.home-toolbar) .toolbar-title {
  position: static !important;
  transform: none !important;
  max-width: none !important;
}
.oscar-toolbar:not(.home-toolbar) .toolbar-title h1 {
  width: auto !important;
  color: #fff;
  text-align: right !important;
  font-size: clamp(1.3rem, 4vw, 2rem) !important;
}
.catalog-header-spacer { display: none !important; }

/* Drawer */
.side-menu {
  width: min(88vw, 360px) !important;
  background: var(--nova-bg-deep) !important;
  border-left: 1px solid var(--nova-line) !important;
  box-shadow: -30px 0 60px rgba(0,0,0,.55) !important;
}
.side-menu-brand { grid-template-columns: 72px 1fr 40px !important; border-color: var(--nova-line) !important; }
.side-menu-brand img { width: 72px !important; height: 72px !important; border-radius: 8px !important; object-fit: cover !important; }
.side-menu > button { min-height: 54px !important; border-radius: 5px !important; }
.side-menu > button:active { color: #fff !important; background: var(--nova-surface) !important; }

/* Reference campaign row occupies the same role as Shahid's first landscape rail. */
.nova-campaigns { padding: 18px var(--page-pad) 26px !important; background: #000000 !important; }
.nova-campaign-heading {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nova-campaign-heading h2 { margin: 0; color: #fff; font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 900; }
.nova-campaign-heading button { width: 42px; height: 42px; display: grid; place-items: center; color: #98a6bb; background: transparent; }
.nova-campaign-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.nova-campaign-rail::-webkit-scrollbar { display: none; }
.nova-campaign-card {
  flex: 0 0 clamp(280px, 43vw, 560px) !important;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--nova-surface);
  box-shadow: none !important;
  scroll-snap-align: start;
}
.nova-campaign-card::after { display: none !important; }
.nova-campaign-card img { width: 100%; height: 100%; object-fit: cover; }

/* Home rails. */
.target-home-reference .target-worldcup,
.target-home-reference .target-programs,
.target-home-reference .target-episode-section,
.target-home-reference .oscar-section,
.target-home-reference .target-promo-shell {
  padding-right: var(--page-pad) !important;
  padding-left: var(--page-pad) !important;
  background: #000000 !important;
}
.target-home-reference .section-heading,
.section-heading { min-height: 60px !important; }
.target-home-reference .section-heading h2,
.section-heading h2 {
  color: #fff !important;
  font-size: clamp(1.18rem, 2.5vw, 1.72rem) !important;
  font-weight: 900 !important;
}
.target-home-reference .section-heading h2 > i,
.section-heading h2 > i { display: none !important; }
.target-home-reference .section-heading button,
.section-heading button { color: #9aa8bc !important; }
.target-home-reference .poster-rail { gap: 11px !important; }
.target-home-reference .poster-rail .oscar-card { flex-basis: clamp(145px, 25vw, 260px) !important; }
.target-program-card,
.target-episode-card,
.poster-wrap { border-radius: 7px !important; background: var(--nova-surface) !important; box-shadow: none !important; }
.target-worldcup-promo { border: 0 !important; border-radius: 8px !important; background: var(--nova-surface) !important; box-shadow: none !important; }
.target-worldcup-copy em,
.target-promo-copy em,
.primary-action {
  border-radius: 999px !important;
  background: linear-gradient(105deg,var(--nova-purple),var(--nova-blue)) !important;
  box-shadow: none !important;
}

/* Catalog hero measured from the TV Shows / Movies screens. */
.catalog-page { padding: 0 0 34px !important; background: #000000 !important; }
.catalog-showcase {
  position: relative;
  height: clamp(590px, 78vh, 860px);
  overflow: hidden;
  background: var(--nova-bg-deep);
  cursor: pointer;
}
.catalog-showcase-image { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center 18% !important; }
.catalog-showcase-shade { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(9,12,17,.1),rgba(9,12,17,.03) 40%,rgba(21,26,35,.55) 72%,var(--nova-bg) 98%); }
.catalog-showcase-copy {
  position: absolute;
  z-index: 2;
  right: var(--page-pad);
  bottom: 36px;
  left: var(--page-pad);
  max-width: 900px;
  margin: auto;
  color: #fff;
  text-align: center;
}
.catalog-showcase-copy h2 { margin: 0 0 12px; font-size: clamp(2rem, 6vw, 4.4rem); line-height: 1.05; font-weight: 900; text-shadow: 0 3px 20px #000; }
.catalog-showcase-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 7px; color: #d8dde6; font-size: .92rem; }
.catalog-showcase-meta span + span::before { content: "•"; margin-left: 7px; color: var(--nova-cyan); }
.catalog-showcase-copy p { max-width: 720px; margin: 13px auto 0; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 1; -webkit-box-orient: vertical; color: #d2d7e0; font-weight: 700; }
.catalog-showcase-actions { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.catalog-watch,
.catalog-save { min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; color: #fff; font-weight: 900; }
.catalog-watch { background: linear-gradient(105deg,var(--nova-purple),var(--nova-blue)); }
.catalog-save { border: 3px solid transparent; background: linear-gradient(var(--nova-bg-deep),var(--nova-bg-deep)) padding-box,linear-gradient(105deg,var(--nova-purple),var(--nova-cyan),var(--nova-blue)) border-box; }
.catalog-save.saved { background: linear-gradient(105deg,var(--nova-purple),var(--nova-blue)); }

.category-tabs {
  height: 68px !important;
  margin: 0 !important;
  padding: 8px var(--page-pad) !important;
  gap: 8px !important;
  border: 0 !important;
  background: #000000 !important;
}
.category-tabs button {
  min-width: 0 !important;
  height: 42px !important;
  padding: 0 17px !important;
  border: 1px solid var(--nova-line) !important;
  border-radius: 999px !important;
  color: #c5ccd7 !important;
  background: var(--nova-surface) !important;
  font-size: .84rem !important;
}
.category-tabs button.active { color: #fff !important; border-color: transparent !important; background: linear-gradient(105deg,var(--nova-purple),var(--nova-blue)) !important; box-shadow: none !important; }
.filter-panel { padding: 4px var(--page-pad) 16px !important; }
.filter-chip { height: 42px !important; min-width: 104px !important; border: 1px solid var(--nova-line) !important; border-radius: 999px !important; color: #d5dbe4 !important; background: var(--nova-surface) !important; }
.oscar-grid { padding: 0 var(--page-pad); grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 12px 10px !important; }
.oscar-grid .poster-wrap { border-radius: 7px !important; }
.poster-title { right: 9px !important; bottom: 10px !important; font-size: .82rem !important; }
.card-title { text-align: right !important; }
.translation-badge,
.quality-badge,
.score-badge,
.episode-badge { border-radius: 4px !important; }
.translation-badge { background: var(--nova-purple) !important; }
.quality-badge { background: var(--nova-blue) !important; }
.channel-grid { padding: 12px var(--page-pad) 0; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 18px 10px !important; }
.channel-logo { border-radius: 7px !important; background: var(--nova-surface) !important; }

/* Search / Explore reference. */
.search-sheet {
  height: calc(78px + var(--safe-top)) !important;
  padding: var(--safe-top) var(--page-pad) 0 !important;
  gap: 9px !important;
  background: var(--nova-surface) !important;
  box-shadow: none !important;
}
.search-field { height: 52px !important; border: 0 !important; border-radius: 999px !important; color: #97a5bb !important; background: var(--nova-bg-deep) !important; }
.search-field:focus-within { box-shadow: 0 0 0 2px var(--nova-purple); }

/* Details: full-bleed portrait header and centered copy. */
.media-details,
.channel-details,
.episode-details-page { background: #000000 !important; }
.details-hero { min-height: clamp(620px, 86vh, 900px) !important; padding-bottom: 30px !important; }
.details-hero > .safe-background-image { object-position: center 18% !important; }
.details-hero-shade { background: linear-gradient(180deg,rgba(9,12,17,.1),rgba(9,12,17,.03) 36%,rgba(21,26,35,.58) 70%,var(--nova-bg) 98%) !important; backdrop-filter: none !important; }
.details-hero-content {
  width: 100% !important;
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: calc(var(--safe-top) + 100px) var(--page-pad) 12px !important;
  display: block !important;
  text-align: center !important;
}
.details-poster { display: none !important; }
.details-copy { text-align: center !important; }
.details-copy h1 { margin: 8px 0 10px !important; font-size: clamp(2rem,6vw,4.4rem) !important; line-height: 1.05 !important; }
.details-meta,
.details-status-badges,
.details-engagement,
.details-cta { justify-content: center !important; }
.details-copy p { max-width: 720px; margin: 14px auto !important; color: #d3d8e1 !important; }
.details-cta .primary-action { min-width: min(56vw,360px); }
.details-content { max-width: 1280px !important; margin: 0 auto; }
.details-section { padding-right: var(--page-pad) !important; padding-left: var(--page-pad) !important; }
.genre-chips { justify-content: center; }
.stream-choice-card,
.settings-list,
.library-sync-card,
.frequency-card,
.match-card,
.schedule-row { border-color: var(--nova-line) !important; background: var(--nova-surface) !important; }

/* Account and settings. */
.account-card {
  margin: calc(78px + var(--safe-top)) var(--page-pad) 20px !important;
  min-height: 130px;
  grid-template-columns: 92px 1fr 44px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--nova-surface) !important;
}
.account-card img { width: 92px !important; height: 92px !important; border-radius: 8px !important; object-fit: cover !important; }
.account-page .settings-list,
.settings-page > .settings-list,
.settings-page > .library-sync-card { margin-right: var(--page-pad); margin-left: var(--page-pad); }
.settings-list { border-radius: 8px !important; }
.settings-list > div,
.settings-list > label,
.settings-list > button { min-height: 68px !important; border-color: var(--nova-line) !important; background: var(--nova-surface) !important; }
.settings-list input[type="checkbox"] { accent-color: var(--nova-purple) !important; }

@media (max-width: 600px) {
  :root { --page-pad: 18px; }
  .oscar-toolbar,
  .oscar-toolbar.home-toolbar,
  .oscar-toolbar:not(.home-toolbar) { height: calc(62px + var(--safe-top)) !important; padding-inline: 12px !important; }
  .nova-header-logo { width: 40px; height: 40px; flex-basis: 40px; border-radius: 7px; }
  .nova-top-tabs { gap: 20px; }
  .nova-top-tabs button { font-size: .74rem; }
  .home-search-button { display: none !important; }

  .nova-campaigns { padding-top: 8px !important; }
  .nova-campaign-heading { min-height: 52px; }
  .nova-campaign-heading h2 { font-size: 1.08rem; }
  .nova-campaign-rail { margin-inline: calc(-1 * var(--page-pad)); padding-inline: var(--page-pad); gap: 10px; }
  .nova-campaign-card { flex-basis: 74vw !important; border-radius: 6px !important; }

  .target-home-reference .section-heading,
  .section-heading { min-height: 52px !important; }
  .target-home-reference .section-heading h2,
  .section-heading h2 { font-size: 1.08rem !important; }
  .target-home-reference .poster-rail .oscar-card { flex-basis: 42vw !important; }

  .catalog-showcase { height: clamp(580px, 79vh, 740px); }
  .catalog-showcase-image { object-position: center top !important; }
  .catalog-showcase-copy { bottom: 30px; }
  .catalog-showcase-copy h2 { font-size: clamp(1.7rem,8vw,2.5rem); }
  .catalog-showcase-copy p { font-size: .76rem; }
  .catalog-showcase-actions { margin-top: 15px; gap: 10px; }
  .catalog-watch,
  .catalog-save { min-height: 49px; font-size: .8rem; }
  .category-tabs { height: 62px !important; }
  .category-tabs button { height: 40px !important; padding-inline: 14px !important; font-size: .72rem !important; }
  .filter-panel { gap: 7px !important; }
  .filter-chip { min-width: 93px !important; height: 39px !important; font-size: .7rem !important; }
  .oscar-grid { gap: 10px 8px !important; }
  .poster-title { font-size: .68rem !important; }

  .details-hero { min-height: clamp(590px, 81vh, 760px) !important; }
  .details-copy h1 { font-size: clamp(1.7rem,8vw,2.6rem) !important; }
  .account-card { margin-top: calc(70px + var(--safe-top)) !important; min-height: 110px; grid-template-columns: 76px 1fr 38px !important; }
  .account-card img { width: 76px !important; height: 76px !important; }
}

@media (min-width: 1280px) {
  .oscar-grid { grid-template-columns: repeat(7,minmax(0,1fr)) !important; }
  .channel-grid { grid-template-columns: repeat(8,minmax(0,1fr)) !important; }
  .target-home-reference .poster-rail .oscar-card { flex-basis: 210px !important; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
