:root {
  color-scheme: dark;
  --bg: #050506;
  --panel: #171019;
  --panel-2: #2f2935;
  --panel-3: #3b3442;
  --line: #716a78;
  --text: #f6f4f8;
  --muted: #b9b2c0;
  --yellow: #f3e861;
  --purple: #765ca5;
  --purple-2: #5b4582;
  --blue: #22a3e8;
  --red: #e63558;
  --green: #3ad46b;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
}

.app {
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(118, 92, 165, 0.12), transparent 28%),
    linear-gradient(135deg, #030304 0%, #08070a 52%, #030304 100%);
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  padding: 24px 44px;
}

.screen.active {
  display: block;
}

.login-screen.active {
  display: grid;
  place-items: center;
}

.login-card {
  display: grid;
  gap: 14px;
  width: min(380px, calc(100% - 34px));
  padding: 34px;
  border: 1px solid #34303a;
  border-radius: 16px;
  background: rgba(18, 13, 23, 0.96);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.46);
}

.login-card h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 1.8rem;
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.login-card input,
.list-search,
.settings-options input,
.settings-options select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0b10;
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

.login-card input:focus,
.list-search:focus,
.settings-options select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(118, 92, 165, 0.22);
}

.login-logo {
  justify-self: center;
}

#loginMessage {
  min-height: 20px;
  margin: 0;
  color: #ff8a9f;
  text-align: center;
  font-size: 0.86rem;
}

.install-popup {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.72));
}

.install-popup-card {
  position: relative;
  display: grid;
  width: min(420px, 100%);
  gap: 12px;
  padding: 24px;
  border: 1px solid #4b4354;
  border-radius: 16px;
  background: #151019;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  text-align: center;
}

.install-popup-logo {
  justify-self: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: var(--yellow);
  transform: none;
}

.install-popup-card strong {
  font-size: 1.35rem;
}

.install-popup-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.install-popup-actions {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 10px;
  margin-top: 4px;
}

.install-popup-actions button {
  min-height: 42px;
  border-radius: 8px;
  background: #2d2733;
  font-weight: 800;
}

.install-popup-actions .primary {
  background: var(--purple);
}

.install-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #2a2530;
  font-size: 1.4rem;
  line-height: 1;
}

.primary,
.preview-actions button,
.pill {
  min-height: 42px;
  border-radius: 4px;
  background: var(--purple);
  color: #fff;
  font-weight: 800;
}

.wide {
  width: 100%;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0 46px 46px;
}

.brand-mark {
  display: grid;
  width: 64px;
  height: 44px;
  place-items: center;
  border: 3px solid #b8b8c0;
  border-radius: 50%;
  color: #ff3d4f;
  font-size: 1.7rem;
  font-weight: 900;
  transform: skewX(-12deg);
}

.brand-row strong,
.brand-row span {
  display: block;
  font-size: 1.55rem;
  font-weight: 400;
}

.playlist-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 54px;
  min-height: 62vh;
}

.playlist-cards {
  display: flex;
  gap: 32px;
  padding-left: 74px;
}

.playlist-card {
  display: grid;
  align-content: start;
  gap: 8px;
  width: 250px;
  height: 132px;
  padding: 18px;
  border-radius: 4px;
  background: #35233f;
  text-align: left;
}

.playlist-card strong,
.playlist-card span {
  font-size: 1.25rem;
  font-weight: 400;
}

.playlist-card small {
  width: fit-content;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #66616d;
}

.playlist-card.connected.ready small {
  background: var(--blue);
}

.playlist-card.add {
  place-items: center;
  text-align: center;
}

.plus {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 2.6rem;
}

.activation-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 40px 0 20px 42px;
  border-left: 2px solid #f3f3f3;
  text-align: center;
}

.activation-panel p,
.activation-panel b {
  margin: 0;
  color: var(--yellow);
  font-size: 1.7rem;
  font-weight: 400;
}

.activation-panel small {
  margin-top: 46px;
  font-size: 1.1rem;
}

.disclaimer {
  margin: 12px auto 0;
  max-width: 840px;
  color: var(--text);
  text-align: center;
  font-size: 1.05rem;
}

.home-screen {
  position: relative;
}

.quick-menu {
  position: absolute;
  top: 26px;
  left: 44px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.quick-menu button {
  border-right: 1px solid var(--line);
  padding: 0 14px 0 0;
  background: transparent;
  color: var(--muted);
}

.quick-menu button:hover {
  color: var(--yellow);
}

.expiry {
  position: absolute;
  top: 30px;
  right: 46px;
  color: var(--muted);
  font-size: 1.45rem;
}

.home-grid {
  display: grid;
  grid-template-columns: 230px 150px 150px;
  grid-template-rows: repeat(2, 150px);
  gap: 12px 34px;
  width: 650px;
  margin: 170px auto 0;
}

.home-tile {
  display: grid;
  place-items: center;
  gap: 12px;
  background: transparent;
}

.home-tile.main {
  grid-row: span 2;
}

.home-tile strong {
  font-size: 1.3rem;
  font-weight: 400;
}

.home-tile.main strong {
  font-size: 1.85rem;
}

.tile-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 14px;
  background: #202327;
  color: var(--yellow);
  font-size: 2.7rem;
  box-shadow: inset 0 0 0 3px #555b62;
}

.tv-icon {
  width: 108px;
  height: 108px;
  color: #dff1ff;
  font-size: 3.3rem;
  text-transform: lowercase;
  box-shadow: inset 0 0 0 6px #aeb3bd;
}

.home-actions {
  position: absolute;
  top: 176px;
  right: 180px;
  display: grid;
  gap: 42px;
}

.home-actions button {
  display: flex;
  align-items: center;
  gap: 22px;
  background: transparent;
  font-size: 1.35rem;
}

.home-actions span {
  width: 40px;
  color: var(--red);
  font-size: 2rem;
}

.version {
  position: absolute;
  right: 46px;
  bottom: 34px;
  color: var(--muted);
  font-size: 1.35rem;
}

.home-screen .home-tile {
  min-height: 132px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.home-screen .home-tile:hover,
.home-screen .home-tile:focus-visible {
  background: rgba(255, 255, 255, 0.035);
  color: var(--yellow);
  transform: translateY(-2px);
}

.home-screen .tile-icon {
  position: relative;
  overflow: hidden;
  width: 76px;
  height: 76px;
  border: 5px solid #59616b;
  border-radius: 18px;
  background: linear-gradient(145deg, #22262b, #14171a);
  color: var(--yellow);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    0 10px 26px rgba(0, 0, 0, 0.32);
  font-size: 0;
}

.home-screen .tv-icon {
  width: 112px;
  height: 112px;
  border-color: #aab1bc;
  color: #e9f7ff;
  font-size: 3.2rem;
  box-shadow:
    inset 0 0 18px rgba(107, 190, 255, 0.38),
    0 12px 34px rgba(0, 0, 0, 0.42);
}

.home-screen .home-tile:not(.main) .tile-icon::before,
.home-screen .home-tile:not(.main) .tile-icon::after,
.home-actions span::before,
.home-actions span::after {
  content: "";
  position: absolute;
  display: block;
}

.home-screen .home-tile:nth-child(2) .tile-icon::before {
  inset: 21px 17px 18px;
  border: 3px solid var(--yellow);
  border-top-width: 8px;
  border-radius: 2px;
  box-shadow:
    10px -9px 0 -5px var(--yellow),
    22px -9px 0 -5px var(--yellow),
    -10px -9px 0 -5px var(--yellow);
}

.home-screen .home-tile:nth-child(2) .tile-icon::after {
  width: 22px;
  height: 12px;
  left: 27px;
  bottom: 17px;
  border: 3px solid #bfe9ff;
  border-top: 0;
}

.home-screen .home-tile:nth-child(3) .tile-icon::before {
  left: 28px;
  top: 21px;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 27px solid var(--yellow);
}

.home-screen .home-tile:nth-child(4) .tile-icon::before {
  width: 24px;
  height: 24px;
  left: 22px;
  top: 15px;
  border: 5px solid #f5f7fb;
  border-radius: 50%;
}

.home-screen .home-tile:nth-child(4) .tile-icon::after {
  width: 42px;
  height: 22px;
  left: 17px;
  bottom: 12px;
  border: 5px solid #28b7e8;
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  border-bottom: 0;
}

.home-screen .home-tile:nth-child(5) .tile-icon::before {
  left: 18px;
  top: 22px;
  width: 40px;
  height: 24px;
  border-top: 4px solid var(--yellow);
  border-bottom: 4px solid var(--yellow);
}

.home-screen .home-tile:nth-child(5) .tile-icon::after {
  left: 17px;
  top: 19px;
  width: 42px;
  height: 30px;
  border-right: 4px solid var(--yellow);
  border-left: 4px solid var(--yellow);
}

.home-actions span {
  position: relative;
  height: 42px;
}

.home-actions button:nth-child(1) span::before {
  inset: 8px;
  border: 5px solid #f6f7fb;
  border-radius: 50%;
}

.home-actions button:nth-child(1) span::after {
  left: 18px;
  top: 2px;
  width: 6px;
  height: 38px;
  background: #f6f7fb;
  box-shadow: 0 0 0 4px #050506;
  transform: rotate(45deg);
}

.home-actions button:nth-child(2) span::before {
  inset: 5px;
  border: 5px solid #f3453f;
  border-left-color: transparent;
  border-radius: 50%;
}

.home-actions button:nth-child(2) span::after {
  right: 2px;
  top: 8px;
  width: 13px;
  height: 13px;
  border-top: 5px solid #f3453f;
  border-right: 5px solid #f3453f;
  transform: rotate(22deg);
}

.home-actions button:nth-child(3) span::before {
  left: 11px;
  top: 8px;
  width: 17px;
  height: 26px;
  border-radius: 3px;
  background: #f0a02e;
}

.home-actions button:nth-child(3) span::after {
  left: 2px;
  top: 17px;
  width: 20px;
  height: 0;
  border-top: 5px solid #ff5d50;
  transform: rotate(180deg);
  box-shadow: 6px -6px 0 -1px #ff5d50;
}

.top-nav {
  display: grid;
  grid-template-columns: repeat(4, auto) minmax(220px, 300px) 1fr;
  align-items: center;
  gap: 18px;
  height: 48px;
  border-bottom: 2px solid var(--line);
}

.top-nav button {
  padding: 0 12px;
  border-right: 2px solid var(--line);
  background: transparent;
  color: #dad7de;
  font-size: 1.35rem;
}

.top-nav button.selected {
  color: var(--yellow);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
}

.search input {
  width: 100%;
  min-height: 32px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.small-logo {
  justify-self: end;
  color: #d9dde7;
  font-size: 0.85rem;
}

.live-layout {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(300px, 400px) minmax(360px, 1fr);
  height: calc(100vh - 88px);
  gap: 8px;
  padding-top: 8px;
}

.screen.locked .content-area {
  display: none;
}

.locked-message {
  display: none;
  min-height: calc(100vh - 120px);
  place-items: center;
  align-content: center;
  gap: 18px;
  text-align: center;
}

.screen.locked .locked-message {
  display: grid;
}

.locked-message h2 {
  margin: 0;
  font-size: 2rem;
}

.locked-message p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.locked-message .primary {
  min-width: 220px;
  padding: 0 22px;
}

.category-list,
.channel-list {
  overflow: auto;
  border-right: 2px solid var(--line);
}

.category-row,
.channel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 56px;
  padding: 0 18px;
  border-bottom: 2px solid #080709;
  background: var(--panel-2);
  color: var(--text);
  font-size: 1.02rem;
}

.category-row.selected,
.channel-row.selected {
  color: var(--yellow);
}

.category-row::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, #ff7893, #e20d4a);
  transform: rotate(45deg);
}

.category-row {
  grid-template-columns: 20px 1fr auto;
}

.channel-row {
  grid-template-columns: 58px 42px 1fr;
  gap: 12px;
}

.channel-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 5px;
  background: #e7e8ef;
  color: #222;
  font-size: 0.8rem;
}

.preview-panel {
  display: grid;
  grid-template-rows: 295px auto auto 1fr;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding-left: 4px;
}

.preview-video {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(160deg, #27374c, #131318 60%, #685f3a);
}

.live-preview-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  background: #000;
  object-fit: contain;
}

.field-lines {
  position: absolute;
  z-index: 2;
  inset: 20px;
  border: 2px solid rgba(245, 220, 89, 0.32);
  border-left: 0;
  border-right: 0;
  pointer-events: none;
}

.preview-video strong {
  position: absolute;
  z-index: 2;
  left: 28px;
  bottom: 20px;
  font-size: 2rem;
  pointer-events: none;
}

.preview-video.playing .field-lines,
.preview-video.playing > strong {
  display: none;
}

.preview-panel h2 {
  margin: 0;
  font-size: 1.65rem;
}

.schedule {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  min-height: 0;
  overflow-y: auto;
  list-style: none;
  font-size: 1.05rem;
}

.schedule span {
  color: var(--yellow);
  margin-right: 8px;
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1fr;
  gap: 12px;
  align-self: end;
}

.apk-only {
  display: none !important;
}

body.apk-mode .apk-only {
  display: block !important;
}

body.apk-mode .preview-actions {
  grid-template-columns: 1fr 1.45fr 1fr 1fr;
}

@media (min-width: 1001px) and (max-width: 1350px) {
  .live-layout {
    grid-template-columns: minmax(220px, 0.85fr) minmax(280px, 1fr) minmax(340px, 1.35fr);
  }

  .preview-panel {
    grid-template-rows: minmax(190px, 240px) auto auto minmax(0, 1fr);
  }

  .preview-actions {
    gap: 8px;
  }

  .preview-actions button {
    padding: 0 8px;
    font-size: 0.9rem;
  }
}

.preview-video:fullscreen,
.preview-video:-webkit-full-screen {
  display: grid;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: #000;
}

.preview-video:fullscreen .live-preview-video,
.preview-video:-webkit-full-screen .live-preview-video {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  object-fit: contain;
  background: #000;
}

.preview-video:fullscreen .field-lines,
.preview-video:fullscreen > strong,
.preview-video:-webkit-full-screen .field-lines,
.preview-video:-webkit-full-screen > strong {
  display: none;
}

.preview-video::backdrop {
  background: #000;
}

.media-layout {
  display: grid;
  grid-template-columns: 370px 1fr;
  height: calc(100vh - 88px);
}

.media-sidebar {
  display: grid;
  grid-template-rows: 150px 54px 1fr;
  gap: 8px;
  padding-right: 8px;
  border-right: 2px solid var(--line);
}

.web-media-sidebar {
  grid-template-rows: 54px minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.web-media-sidebar .category-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.large-section-icon {
  display: grid;
  place-items: center;
  color: var(--yellow);
  font-size: 4.5rem;
}

.side-actions {
  display: flex;
  justify-content: space-between;
}

.side-actions button {
  background: transparent;
  font-size: 1.05rem;
}

.poster-area {
  min-width: 0;
  padding: 30px 22px;
}

.poster-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.poster-toolbar strong {
  margin-left: auto;
  font-size: 1.45rem;
  font-weight: 400;
}

.pill {
  padding: 0 20px;
  color: #e9e2ef;
  font-weight: 500;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 16px 22px;
  overflow: auto;
  max-height: calc(100vh - 178px);
  padding-right: 8px;
}

.poster-card {
  overflow: hidden;
  border-radius: 4px;
  background: var(--panel-2);
}

.poster-open {
  display: block;
  width: 100%;
  background: transparent;
  text-align: left;
}

.poster-art {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 14px;
  color: #fff;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 900;
  text-transform: uppercase;
}

.poster-card span {
  display: block;
  overflow: hidden;
  padding: 10px 8px;
  color: #eee;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.settings-screen {
  padding: 42px 78px;
  background: #21182a;
  border-radius: 34px;
}

.back-button {
  position: absolute;
  top: 42px;
  left: 78px;
  background: transparent;
  font-size: 2.2rem;
}

.settings-screen h1,
.add-list-screen h1,
.account-screen h1 {
  margin: 0 0 42px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 400;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.settings-grid button {
  min-height: 72px;
  padding: 0 24px;
  border-radius: 4px;
  background: #120d17;
  text-align: left;
  font-size: 1rem;
}

.settings-options {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-top: 24px;
  padding: 16px;
  border-radius: 8px;
  background: #120d17;
}

.settings-options label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.settings-options .check-option {
  grid-auto-flow: column;
  align-items: center;
}

.settings-options input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
}

.mac-footer {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  font-size: 1.45rem;
}

.add-list-screen {
  position: relative;
  padding-top: 48px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-bottom: 28px;
}

.tabs button {
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 800;
}

.tabs button.active {
  color: var(--text);
}

.add-list-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  width: min(1010px, calc(100% - 180px));
  margin: 0 auto;
  padding: 40px;
  background: var(--panel-2);
}

.mac-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
}

.add-list-form label {
  display: grid;
  gap: 14px;
  color: var(--text);
}

.add-list-form input {
  min-height: 48px;
  border: 0;
  border-radius: 3px;
  background: #5a5660;
  color: #fff;
  padding: 0 14px;
}

.submit-list {
  grid-column: 1 / -1;
  justify-self: center;
  width: 250px;
  margin-top: 22px;
}

.account-screen {
  position: relative;
  display: none;
  place-items: center;
}

.account-screen.active {
  display: grid;
}

.account-card {
  display: grid;
  gap: 12px;
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 12px;
  background: var(--panel-2);
  text-align: center;
}

.account-card strong,
.account-card b {
  color: var(--yellow);
  font-size: 1.3rem;
}

.list-screen {
  position: relative;
  padding: 48px 78px;
}

.list-screen h1 {
  margin: 0 0 24px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 400;
}

.list-search {
  display: block;
  width: min(420px, 100%);
  margin-bottom: 24px;
}

.list-grid {
  max-height: calc(100vh - 170px);
}

.empty-list {
  display: none;
  margin-top: 80px;
  color: var(--muted);
  text-align: center;
  font-size: 1.2rem;
}

.empty-list.visible {
  display: block;
}

.poster-card {
  position: relative;
}

.poster-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  padding: 0 8px 8px;
}

.poster-actions button {
  min-height: 30px;
  border-radius: 5px;
  background: #17131d;
  color: var(--text);
  font-size: 0.78rem;
}

.poster-actions button.primary-action {
  background: var(--purple);
}

.player-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.84);
}

.player-modal:fullscreen,
.player-modal:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  background: #000;
}

.player-modal:fullscreen .player-box,
.player-modal:-webkit-full-screen .player-box {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
}

.player-modal:fullscreen .player-video,
.player-modal:-webkit-full-screen .player-video {
  min-height: 100%;
}

.player-modal:fullscreen .player-video video,
.player-modal:-webkit-full-screen .player-video video {
  width: 100vw;
  height: 100vh;
  min-height: 0;
}

.player-modal:fullscreen .player-controls,
.player-modal:fullscreen .player-close,
.player-modal:-webkit-full-screen .player-controls,
.player-modal:-webkit-full-screen .player-close {
  display: none;
}

#playerModal[hidden],
.player-modal[hidden] {
  display: none !important;
}

.player-box {
  position: relative;
  width: min(900px, calc(100% - 40px));
  border: 1px solid #3d3546;
  border-radius: 12px;
  background: #0a080c;
  overflow: hidden;
}

.player-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.6rem;
}

.player-video {
  display: grid;
  min-height: 470px;
  place-items: center;
  align-content: center;
  gap: 18px;
  background:
    linear-gradient(145deg, rgba(118, 92, 165, 0.2), transparent),
    #020203;
}

.player-video video {
  width: 100%;
  height: min(56vw, 500px);
  min-height: 360px;
  background: #000;
  object-fit: contain;
}

.player-video strong {
  padding: 0 18px;
  font-size: 1.4rem;
}

#playerStatus {
  min-height: 22px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.95rem;
}

.player-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  background: #141018;
}

.player-controls button,
.player-controls a {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  border-radius: 5px;
  background: var(--purple);
  color: #fff;
  padding: 0 18px;
  font-weight: 800;
  text-decoration: none;
}

.detail-screen,
.episodes-screen {
  position: relative;
  overflow: hidden;
  background: #0b0910;
}

.detail-back,
.episodes-screen .detail-back {
  position: absolute;
  top: 24px;
  left: 34px;
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 2rem;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.22;
  filter: blur(1px);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 12, 27, 0.98), rgba(30, 20, 38, 0.82), rgba(13, 9, 17, 0.94));
}

.detail-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  width: min(1100px, calc(100% - 120px));
  height: 100%;
  margin: 0 auto;
}

.detail-poster {
  width: 100%;
  max-height: 72vh;
  border-radius: 5px;
  background: #221a29;
  object-fit: cover;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.5);
}

.detail-info {
  min-width: 0;
}

.detail-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.detail-actions button {
  min-height: 44px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 18px;
  font-size: 1.05rem;
}

.detail-actions button.primary {
  background: var(--purple);
}

.detail-info h1,
.episodes-screen h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 400;
}

.detail-meta,
.detail-rating,
.detail-description {
  color: #e1dbe6;
  font-size: 1.05rem;
  line-height: 1.45;
}

.detail-rating {
  color: var(--yellow);
}

.detail-description {
  max-width: 900px;
}

.episodes-screen h1 {
  margin: 18px 30px 20px 34%;
  text-align: right;
}

.episodes-layout {
  display: grid;
  grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
  height: calc(100% - 90px);
  gap: 20px;
}

.season-list {
  display: grid;
  align-content: start;
  gap: 8px;
  border-right: 2px solid var(--line);
  padding: 48px 28px 20px 70px;
  overflow-y: auto;
}

.season-button {
  min-height: 52px;
  background: transparent;
  text-align: left;
  font-size: 1.35rem;
}

.season-button.selected {
  color: var(--yellow);
}

.episode-list {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 0 28px 24px 0;
  overflow-y: auto;
}

.episode-card {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(0, 1fr);
  min-height: 126px;
  background: rgba(75, 69, 78, 0.88);
  text-align: left;
}

.episode-card img {
  width: 100%;
  height: 100%;
  min-height: 126px;
  object-fit: cover;
  background: #1d1722;
}

.episode-card div {
  padding: 12px 18px;
}

.episode-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.12rem;
  font-weight: 400;
}

.episode-card p {
  margin: 0;
  color: #eeeaf0;
  line-height: 1.35;
}

@media (max-width: 1000px) {
  body {
    overflow: auto;
  }

  .app,
  .screen {
    min-height: 100vh;
    height: auto;
  }

  .home-actions,
  .expiry,
  .version {
    position: static;
  }

  .home-grid,
  .playlist-layout,
  .live-layout,
  .media-layout,
  .settings-grid,
  .add-list-form {
    grid-template-columns: 1fr;
    width: 100%;
    margin-top: 28px;
  }

  .playlist-cards {
    padding-left: 0;
    flex-wrap: wrap;
  }

  .activation-panel,
  .media-sidebar,
  .category-list,
  .channel-list {
    border: 0;
  }

  .top-nav {
    grid-template-columns: repeat(2, auto);
    height: auto;
    padding-bottom: 12px;
  }

  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
