* { box-sizing: border-box; }
body { margin: 0; color: #ebf1e7; background: #0d120d; font: 16px/1.45 Arial, sans-serif; }
body, a, button, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, .button, .primary { display: inline-block; padding: 11px 18px; border: 1px solid #4b5b41; border-radius: 8px; background: #192218; color: #ebf1e7; cursor: pointer; }
.primary { border-color: #d8ed9b; background: #d8ed9b; color: #11180e; font-weight: 700; }
a:focus, button:focus, input:focus { outline: 3px solid #d8ed9b; outline-offset: 3px; }
.tv-nav { display: flex; flex-wrap: wrap; align-items: center; padding: 13px 4%; background: #11190f; border-bottom: 1px solid #33412d; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: 2px; margin-right: 22px; }
.brand span, .label, .more { color: #d8ed9b; }
.brand small { font-size: 12px; color: #b4c3a8; }
.tv-nav nav, .tv-search, .actions, .page-links { display: flex; align-items: center; flex-wrap: wrap; }
.tv-nav nav a, .exit { display: inline-block; padding: 9px 12px; border-radius: 7px; font-weight: 600; }
.tv-nav [aria-current] { background: #293721; color: #d8ed9b; }
.tv-search { margin-left: auto; }
.tv-search input { width: 9em; min-height: 41px; padding: 7px 10px; border: 1px solid #4b5b41; border-radius: 6px; color: #ebf1e7; background: #0d120d; }
.tv-search input::placeholder { color: #a8b69b; }
.tv-search button { min-height: 41px; margin-left: 6px; padding: 6px 12px; }
.exit { color: #b4c3a8; }
main { padding: 20px 4% 48px; }
.tv-feature { position: relative; display: flex; align-items: flex-end; min-height: 360px; min-height: min(68vh, 540px); margin-bottom: 29px; overflow: hidden; border: 1px solid #36442f; border-radius: 13px; background: #151e14; }
.feature-image { position: absolute; right: 0; top: 0; width: 68%; height: 100%; object-fit: contain; object-position: center; }
.tv-feature::before { position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; left: 0; content: ""; background: linear-gradient(90deg,#11180f 8%,rgba(17,24,15,.96) 32%,rgba(17,24,15,.36) 69%,transparent),linear-gradient(0deg,#11180f 2%,transparent 59%); }
.feature-info { position: relative; z-index: 2; width: 62%; padding: 30px 4%; }
h1, h2, p { margin: 0; }
h1 { font-size: 44px; font-size: clamp(29px,5vw,68px); line-height: 1.05; overflow-wrap: break-word; }
h2 { font-size: 25px; }
.label { margin-bottom: 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .13em; }
.metadata, .synopsis { margin-top: 12px; color: #cbd8c4; }
.synopsis { max-width: 40em; }
.actions { margin-top: 18px; }
.actions > * { margin: 0 10px 8px 0; }
.actions form { display: inline-block; }
.shelf { margin-bottom: 22px; }
.shelf-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 0 8px 9px; }
.more { padding: 8px; }
.poster-row, .poster-grid { display: flex; margin: 0 -5px; padding: 6px 5px; }
.poster-row { overflow-x: auto; overflow-y: hidden; }
.poster-grid { flex-wrap: wrap; }
.poster-card { display: block; flex: 0 0 calc(20% - 14px); min-width: 116px; margin: 0 7px 17px; padding: 3px; border-radius: 8px; }
.poster-card:focus { background: #293721; }
.poster { position: relative; height: 0; padding-top: 145%; overflow: hidden; border: 1px solid #43503a; border-radius: 7px; background: #20251e; }
.tv-poster { position: absolute; width: 100%; height: 100%; top: 0; left: 0; object-fit: contain; }
.poster span { position: absolute; bottom: 8px; left: 10px; right: 10px; font-weight: 700; }
.poster img + span { display: none; }
.poster img.failed + span { display: block; }
.js-tv .tv-poster:not(.loaded), .js-tv .feature-image:not(.loaded) { visibility: hidden; }
.js-tv .poster img:not(.loaded) + span { display: block; }
.poster-card strong { display: block; margin-top: 7px; line-height: 1.25; overflow-wrap: break-word; }
.poster-card small { color: #b4c3a8; }
.page-heading { margin: 16px 0 22px; font-size: 38px; }
.page-links { justify-content: center; }
.page-links > * { margin: 8px; }
.tv-panel { max-width: 850px; margin: 30px auto; padding: 30px; border: 1px solid #45583d; border-radius: 12px; background: #151e14; }
.tv-panel p, .tv-panel form { margin-top: 12px; }
.tv-ad { display: block; width: auto; max-width: 100%; max-height: 230px; margin: 12px 0; }
.back { display: inline-block; margin-top: 14px; color: #d8ed9b; padding: 7px 0; }
@media (max-width: 900px) {
  .tv-nav { padding: 8px 4%; }
  .tv-search { margin-left: 0; }
  .poster-card { flex-basis: calc(25% - 14px); }
  .feature-info { width: 76%; }
}
@media (max-width: 520px) {
  .tv-nav nav { order: 2; width: 100%; }
  .tv-nav nav a, .exit { padding: 7px; font-size: 13px; }
  .tv-nav .brand { font-size: 18px; margin-right: 12px; }
  .tv-search input { width: 6.5em; }
  .tv-search button { font-size: 13px; }
  .tv-feature { min-height: 360px; }
  .feature-image { width: 100%; }
  .tv-feature::before { background: linear-gradient(0deg,#11180f 12%,rgba(17,24,15,.85) 44%,transparent); }
  .feature-info { width: 100%; padding: 18px; }
  .poster-card { flex-basis: calc(50% - 14px); min-width: 95px; }
  .poster-row .poster-card { flex-basis: calc(44% - 14px); }
}

.tv-settings label { display: block; line-height: 1.7; margin-bottom: 12px; }
.tv-settings select { display: block; padding: 8px 13px; border: 1px solid #4b5b41; border-radius: 6px; background: #192218; color: #ebf1e7; font: inherit; }
.tv-settings button { margin-top: 10px; }
.tv-history { margin-top: 24px; padding-top: 16px; border-top: 1px solid #4b5b41; }
.tv-history > div { margin: 9px 0; }
.tv-history a { margin: 0 6px 6px 0; }
.tv-history button:disabled { opacity: .55; }
body[data-appearance="day"] { background: #edf3e6; color: #203020; }
body[data-appearance="day"] .tv-nav,
body[data-appearance="day"] .tv-panel { background: #f8fbf5; border-color: #bacbb2; }
body[data-appearance="day"] .tv-nav [aria-current],
body[data-appearance="day"] button,
body[data-appearance="day"] .button,
body[data-appearance="day"] .tv-search input,
body[data-appearance="day"] .tv-settings select { background: #e1ebd9; color: #203020; border-color: #bacbb2; }
body[data-appearance="day"] .primary { background: #315d34; color: #fff; border-color: #315d34; }
body[data-appearance="day"] .brand span,
body[data-appearance="day"] .brand small,
body[data-appearance="day"] .more,
body[data-appearance="day"] .exit,
body[data-appearance="day"] .back,
body[data-appearance="day"] .tv-panel .label,
body[data-appearance="day"] .poster-card small { color: #315d34; }
body[data-appearance="day"] .poster-card:focus { background: #dcebd2; }
body[data-appearance="day"] a:focus,
body[data-appearance="day"] button:focus,
body[data-appearance="day"] input:focus,
body[data-appearance="day"] select:focus { outline-color: #315d34; }
body[data-appearance="day"] .tv-feature { background: #f8fbf5; border-color: #bacbb2; }
body[data-appearance="day"] .poster { background: #e1ebd9; border-color: #bacbb2; }
body[data-appearance="day"] .tv-feature .label,
body[data-appearance="day"] .tv-feature .metadata,
body[data-appearance="day"] .tv-feature .synopsis { color: #4e634c; }

.tv-collections { display: flex; flex-wrap: wrap; margin: 0 0 18px; }
.tv-collections a { flex: 1 1 130px; display: block; text-align: center; margin: 0 8px 8px 0; padding: 13px; border: 1px solid #4b5b41; border-radius: 8px; background: #192218; color: #ebf1e7; font-weight: 700; }
body[data-appearance="day"] .tv-collections a { background: #e1ebd9; color: #203020; border-color: #bacbb2; }
body[data-layout="apple"] .tv-theme-home .tv-feature { min-height: 450px; min-height: min(69vh,615px); }
body[data-layout="apple"] .tv-theme-home .feature-image { width: 100%; }
body[data-layout="apple"] .tv-theme-home .tv-feature::before { background: linear-gradient(0deg,#11180f 5%,rgba(17,24,15,.45) 58%,transparent); }
body[data-layout="netflix"] .tv-theme-home .tv-feature { min-height: 380px; min-height: min(60vh,495px); margin-bottom: 17px; }
body[data-layout="disney"] .tv-theme-home .tv-feature { min-height: 330px; min-height: min(54vh,480px); }
body[data-layout="disney"] .tv-theme-home .feature-info { margin: 0 auto; text-align: center; }
body[data-layout="disney"] .tv-feature .actions { justify-content: center; }
body[data-layout="disney"] .tv-theme-home .feature-image { width: 100%; }
body[data-layout="disney"] .tv-theme-home .tv-feature::before { background: linear-gradient(0deg,#11180f 10%,rgba(17,24,15,.48) 65%,transparent); }

body[data-layout="prime"] .tv-theme-home .tv-feature { align-items: stretch; flex-direction: row-reverse; min-height: 380px; min-height: min(64vh,510px); }
body[data-layout="prime"] .tv-theme-home .tv-feature::before,
body[data-layout="paramount"] .tv-theme-home .tv-feature::before,
body[data-layout="mubi"] .tv-theme-home .tv-feature::before { display: none; }
body[data-layout="prime"] .tv-theme-home .feature-image { position: static; width: 55%; height: auto; align-self: stretch; }
body[data-layout="prime"] .tv-theme-home .feature-info { width: 45%; align-self: center; }
body[data-layout="max"] .tv-theme-home .tv-feature { min-height: 285px; min-height: min(47vh,420px); }
body[data-layout="max"] .tv-theme-home .tv-collections a { padding-block: 9px; }
body[data-layout="hulu"] .tv-theme-home .tv-feature { min-height: 415px; min-height: min(67vh,570px); }
body[data-layout="hulu"] .tv-theme-home .feature-image { right: 4%; width: 73%; }
body[data-layout="peacock"] .tv-theme-home .tv-feature { min-height: 260px; min-height: min(42vh,405px); margin-bottom: 14px; }
body[data-layout="peacock"] .tv-theme-home .poster-row { flex-wrap: wrap; }
body[data-layout="paramount"] .tv-theme-home .tv-feature,
body[data-layout="mubi"] .tv-theme-home .tv-feature { display: block; min-height: 0; }
body[data-layout="mubi"] .tv-theme-home .tv-feature { display: flex; flex-direction: column-reverse; align-items: stretch; }
body[data-layout="paramount"] .tv-theme-home .feature-image,
body[data-layout="mubi"] .tv-theme-home .feature-image { position: static; display: block; width: 100%; height: 33vh; }
body[data-layout="mubi"] .tv-theme-home .feature-image { height: 40vh; }
body[data-layout="paramount"] .tv-theme-home .feature-info,
body[data-layout="mubi"] .tv-theme-home .feature-info { width: 100%; }
body[data-layout="paramount"] .tv-theme-home .feature-info { text-align: center; }
body[data-layout="paramount"] .tv-theme-home .synopsis { margin-inline: auto; }
body[data-layout="paramount"] .tv-theme-home .actions { justify-content: center; }
body[data-layout="mubi"] .tv-theme-home { max-width: 1050px; margin: auto; }
body[data-layout="crunchyroll"] .tv-theme-home .tv-feature { min-height: 275px; min-height: min(46vh,425px); }
body[data-layout="crunchyroll"] .tv-collections a { text-align: left; }

body[data-layout="apple"] .poster, body[data-layout="prime"] .poster { padding-top: 56.25%; }
body[data-layout="disney"] .poster, body[data-layout="paramount"] .poster, body[data-layout="mubi"] .poster { padding-top: 62.5%; }
body[data-layout="hulu"] .poster, body[data-layout="max"] .poster { padding-top: 70%; }
body[data-layout="peacock"] .poster { padding-top: 116%; }
@media(min-width:900px) {
 body[data-layout="netflix"] .poster-card, body[data-layout="peacock"] .poster-card, body[data-layout="crunchyroll"] .poster-card { flex-basis: calc(16.666% - 14px); }
 body[data-layout="max"] .poster-card, body[data-layout="paramount"] .poster-card { flex-basis: calc(33.333% - 14px); }
 body[data-layout="mubi"] .poster-card { flex-basis: calc(50% - 14px); }
}
@media(max-width:620px) {
 body[data-layout="prime"] .tv-theme-home .tv-feature { display: block; min-height: 0; }
 body[data-layout="prime"] .tv-theme-home .feature-image { display: block; width: 100%; height: 220px; }
 body[data-layout="prime"] .tv-theme-home .feature-info { width: 100%; }
}


body[data-appearance="day"] .tv-feature::before {
  background: linear-gradient(90deg,#f8fbf5 8%,rgba(248,251,245,.96) 35%,rgba(248,251,245,.25) 75%,transparent),
              linear-gradient(0deg,#f8fbf5 2%,transparent 59%);
}
body[data-appearance="day"][data-layout="apple"] .tv-theme-home .tv-feature::before,
body[data-appearance="day"][data-layout="disney"] .tv-theme-home .tv-feature::before {
  background: linear-gradient(0deg,#f8fbf5 8%,rgba(248,251,245,.9) 38%,transparent 85%);
}
@media (max-width: 520px) {
  body[data-appearance="day"] .tv-feature::before {
    background: linear-gradient(0deg,#f8fbf5 12%,rgba(248,251,245,.92) 44%,transparent);
  }
}
