:root {
  --bg: #05060a;
  --bg-2: #090b12;
  --panel: rgba(15, 18, 27, 0.82);
  --panel-strong: rgba(20, 24, 36, 0.96);
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f7f4ed;
  --muted: #a4acba;
  --soft: #dfe5ef;
  --accent: #8c61ff;
  --accent-2: #2ec7ff;
  --gold: #efd08a;
  --danger: #ff647c;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* SLTV-style app layout */
body[data-view] {
  background:
    linear-gradient(110deg, rgba(42, 70, 67, 0.68), rgba(17, 22, 34, 0.96) 45%, rgba(40, 24, 55, 0.9)),
    #111722;
}

body[data-view]::before {
  display: none;
}

body[data-view] .app-shell {
  display: block;
  min-height: 100vh;
  overflow-x: auto;
}

body[data-view] .app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex !important;
  height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 clamp(22px, 5vw, 76px);
  background: linear-gradient(90deg, rgba(21, 34, 36, 0.96), rgba(15, 19, 30, 0.96));
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

body[data-view] .app-brand {
  display: inline-flex;
  min-width: 190px;
  align-items: center;
  gap: 14px;
}

body[data-view] .app-brand span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

body[data-view] .app-brand strong {
  font-size: 1.35rem;
}

body[data-view] .app-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 7vw, 116px);
}

body[data-view] .app-nav button,
body[data-view] .logout-button {
  min-height: 44px;
  padding: 0 8px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 1rem;
  text-align: center;
}

body[data-view] .app-nav button.is-active {
  color: #3c9ddd;
  background: transparent;
  box-shadow: none;
}

body[data-view] .logout-button {
  width: 44px;
  min-width: 44px;
  overflow: hidden;
  color: #45a8e8;
  background: rgba(11, 22, 38, 0.86);
  border: 1px solid rgba(69, 168, 232, 0.35);
  border-radius: 50%;
  text-indent: -999px;
  box-shadow: 0 0 18px rgba(69, 168, 232, 0.18);
}

body[data-view] .logout-button::after {
  content: "T";
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  text-indent: 0;
}

body[data-view] .bottom-nav {
  display: none !important;
}

body[data-view="live"] .app-main,
body[data-view="vod"] .app-main,
body[data-view="series"] .app-main,
body[data-view="favorites"] .app-main,
body[data-view="history"] .app-main {
  display: grid;
  height: calc(100vh - 86px);
  min-height: 620px;
  min-width: 1080px;
  padding: 0;
  overflow: hidden;
}

body[data-view="live"] .app-main {
  grid-template-columns: minmax(300px, 32vw) minmax(370px, 1fr) minmax(310px, 24vw);
}

body[data-view="vod"] .app-main,
body[data-view="series"] .app-main,
body[data-view="favorites"] .app-main,
body[data-view="history"] .app-main {
  grid-template-columns: minmax(310px, 30vw) minmax(0, 1fr);
}

body[data-view="live"] .app-header,
body[data-view="vod"] .app-header,
body[data-view="series"] .app-header,
body[data-view="favorites"] .app-header,
body[data-view="history"] .app-header {
  display: none;
}

body[data-view="live"] .content-area,
body[data-view="live"] .catalog-view,
body[data-view="vod"] .content-area,
body[data-view="vod"] .catalog-view,
body[data-view="series"] .content-area,
body[data-view="series"] .catalog-view,
body[data-view="favorites"] .content-area,
body[data-view="favorites"] .catalog-view,
body[data-view="history"] .content-area,
body[data-view="history"] .catalog-view {
  display: contents;
}

body[data-view="live"] .category-rail,
body[data-view="vod"] .category-rail,
body[data-view="series"] .category-rail,
body[data-view="favorites"] .category-rail,
body[data-view="history"] .category-rail {
  grid-column: 1;
  display: block;
  height: 100%;
  margin: 0;
  padding: 28px 28px 42px;
  overflow-y: auto;
  background: rgba(16, 22, 32, 0.74);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-view="live"] .content-grid,
body[data-view="vod"] .content-grid,
body[data-view="series"] .content-grid,
body[data-view="favorites"] .content-grid,
body[data-view="history"] .content-grid {
  grid-column: 2;
  height: 100%;
  overflow-y: auto;
  background: rgba(15, 20, 31, 0.62);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-view="live"] .now-player {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  margin: 0;
  padding: 18px;
  gap: 14px;
  background: rgba(9, 13, 22, 0.72);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-view="vod"] .now-player,
body[data-view="series"] .now-player,
body[data-view="favorites"] .now-player,
body[data-view="history"] .now-player {
  display: none;
}

body[data-view="live"] .video-stage {
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
}

body[data-view="live"] .video-stage video {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

body[data-view="live"] .now-details {
  min-height: 0;
  align-content: start;
  padding: 16px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.side-panel-head {
  display: grid;
  gap: 22px;
  margin-bottom: 24px;
}

.side-panel-head strong {
  font-size: 1.15rem;
}

.side-panel-head label {
  gap: 0;
}

.side-panel-head label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.side-panel-head input {
  min-height: 54px;
  padding: 0 0 0 12px;
  color: #d5e3f4;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #2f8ece;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 800;
}

.side-panel-head input::placeholder {
  color: #9db0cc;
}

.side-shortcuts,
.category-list {
  display: grid;
}

.side-shortcuts button,
.category-list button {
  min-height: 58px;
  padding: 0 8px;
  color: #fff;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 800;
}

.side-shortcuts button.is-active,
.category-list button.is-active {
  color: #3c9ddd;
}

body[data-view="live"] .category-list button.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 4px 0 0 #3c9ddd;
}

.content-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  color: #9db0cc;
  background: rgba(16, 22, 32, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.content-head div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-head strong {
  color: #fff;
}

.content-grid.is-channel-view {
  display: block;
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  min-height: 82px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-row.is-playing {
  background: linear-gradient(90deg, rgba(47, 142, 206, 0.18), rgba(47, 142, 206, 0.04));
}

.channel-main {
  display: grid;
  grid-template-columns: 62px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  color: #fff;
  background: transparent;
  border: 0;
  text-align: left;
}

.channel-index {
  color: #8fa1bd;
  font-weight: 900;
}

.channel-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
}

.channel-logo img {
  max-width: 54px;
  max-height: 42px;
  object-fit: contain;
}

.channel-logo span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: linear-gradient(135deg, #8c61ff, #2ec7ff);
  border-radius: 50%;
  font-weight: 900;
}

.channel-title {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-quality {
  color: #cbd7e8;
  font-size: 0.72rem;
  font-weight: 900;
}

.channel-row .fav-button {
  align-self: center;
  justify-self: center;
}

.content-grid.is-poster-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  align-content: start;
  gap: 28px 20px;
  padding: 28px;
}

.content-grid.is-poster-view .content-head {
  grid-column: 1 / -1;
  margin: -28px -28px 0;
}

.media-card {
  min-width: 0;
}

.media-poster {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 2 / 3;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  border-radius: 0;
}

.media-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-poster > span:not(.poster-initial) {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  background: rgba(5, 6, 10, 0.76);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.media-meta {
  display: grid;
  gap: 7px;
  padding-top: 10px;
}

.media-meta span,
.media-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta span {
  color: #9db0cc;
}

.media-meta strong {
  color: #fff;
}

.media-meta div {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
}

@media (max-width: 860px) {
  body[data-view] .app-sidebar {
    min-width: 1080px;
    padding: 0 32px;
  }

  body[data-view] .app-main {
    min-width: 1080px;
  }

  body[data-view="live"] .app-main,
  body[data-view="vod"] .app-main,
  body[data-view="series"] .app-main,
  body[data-view="favorites"] .app-main,
  body[data-view="history"] .app-main {
    height: calc(100dvh - 86px);
  }
}

/* Persistent player layout overrides */
body[data-view] .app-shell {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

body[data-view] .app-main {
  display: grid;
  height: calc(100vh - 86px);
  min-height: 620px;
  min-width: 1180px;
  padding: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr);
}

body[data-view="dashboard"] .app-main {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 25vw);
}

body[data-view="live"] .app-main {
  grid-template-columns: minmax(290px, 29vw) minmax(380px, 1fr) minmax(320px, 25vw);
}

body[data-view="vod"] .app-main,
body[data-view="series"] .app-main,
body[data-view="favorites"] .app-main,
body[data-view="history"] .app-main {
  grid-template-columns: minmax(290px, 27vw) minmax(420px, 1fr) minmax(320px, 25vw);
}

body[data-view] .app-header {
  display: none;
}

body[data-view="dashboard"] .content-area {
  grid-column: 1;
  height: 100%;
  padding: 28px;
  overflow-y: auto;
  background: rgba(15, 20, 31, 0.62);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-view="dashboard"] .dashboard-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  max-width: 860px;
}

body[data-view="live"] .content-area,
body[data-view="live"] .catalog-view,
body[data-view="vod"] .content-area,
body[data-view="vod"] .catalog-view,
body[data-view="series"] .content-area,
body[data-view="series"] .catalog-view,
body[data-view="favorites"] .content-area,
body[data-view="favorites"] .catalog-view,
body[data-view="history"] .content-area,
body[data-view="history"] .catalog-view {
  display: contents;
}

body[data-view] .now-player {
  grid-column: 3;
  grid-row: 1;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  margin: 0;
  padding: 18px;
  gap: 14px;
  background: rgba(9, 13, 22, 0.76);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-view="dashboard"] .now-player {
  grid-column: 2;
}

body[data-view] .video-stage {
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
}

body[data-view] .video-stage video {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

body[data-view] .now-details {
  min-height: 0;
  align-content: start;
  padding: 16px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body[data-view="series"] .series-detail:not(.is-hidden) {
  grid-column: 1 / 3;
  grid-row: 1;
  height: 100%;
  overflow-y: auto;
  margin: 0;
  border-radius: 0;
}

body[data-device="ios"] .app-shell {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

body[data-device="ios"] .app-sidebar {
  padding-left: max(32px, env(safe-area-inset-left));
  padding-right: max(32px, env(safe-area-inset-right));
}

body[data-device="ios"] .app-main {
  height: calc(100dvh - 86px);
  min-width: 1120px;
}

body[data-device="ios"].is-landscape .app-main {
  min-width: 100vw;
}

body[data-device="ios"] .channel-row {
  min-height: 76px;
}

body[data-device="ios"] .channel-main,
body[data-device="ios"] .side-shortcuts button,
body[data-device="ios"] .category-list button {
  min-height: 58px;
}

@media (max-width: 860px) {
  body[data-view] .app-sidebar {
    min-width: 1120px;
    padding: 0 32px;
  }

  body[data-view] .app-main {
    min-width: 1120px;
    height: calc(100dvh - 86px);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(156, 108, 255, 0.26), transparent 34%),
    radial-gradient(circle at 100% 6%, rgba(46, 199, 255, 0.14), transparent 26%),
    linear-gradient(180deg, #05060a 0%, #090b12 48%, #05060a 100%);
  font-family: "Manrope", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, #000, transparent 76%);
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
video {
  display: block;
  max-width: 100%;
}

.is-hidden {
  display: none !important;
}

.player-app {
  min-height: 100vh;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
strong {
  font-family: "Sora", system-ui, sans-serif;
  letter-spacing: 0;
}

.player-login {
  display: grid;
  min-height: 100vh;
  align-items: center;
  gap: 26px;
  padding: clamp(18px, 4vw, 42px);
}

.login-brand {
  position: fixed;
  top: 18px;
  left: clamp(18px, 4vw, 42px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
}

.login-mark,
.app-brand span {
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 0 28px rgba(156, 108, 255, 0.24);
}

.login-mark img,
.app-brand img,
.video-watermark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-brand div,
.app-brand {
  display: grid;
  gap: 1px;
}

.login-brand span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.7fr);
  width: min(1080px, 100%);
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 0%, rgba(46, 199, 255, 0.16), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(156, 108, 255, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(21, 25, 38, 0.92), rgba(8, 10, 16, 0.96));
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.login-copy,
.login-form {
  padding: clamp(24px, 4vw, 42px);
}

.login-copy {
  display: grid;
  align-content: end;
  min-height: 540px;
  background:
    linear-gradient(180deg, rgba(5, 6, 10, 0.12), rgba(5, 6, 10, 0.68)),
    url("/assets/vs-logo.jpeg") center 34% / min(52%, 300px) auto no-repeat,
    linear-gradient(135deg, rgba(18, 28, 43, 0.98), rgba(8, 10, 16, 0.98));
}

.login-copy h1 {
  max-width: 620px;
  margin: 0 0 16px;
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  line-height: 0.96;
}

.login-copy p:last-child {
  max-width: 580px;
  margin: 0;
  color: var(--soft);
  font-size: 1.02rem;
}

.login-form {
  display: grid;
  align-content: center;
  gap: 18px;
  background: rgba(5, 6, 10, 0.36);
  backdrop-filter: blur(18px);
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.login-tabs button,
.app-nav button,
.bottom-nav button,
.category-rail button,
.ghost-action,
.logout-button,
.favorite-now,
.custom-controls button {
  color: var(--text);
  background: transparent;
  border: 0;
}

.login-tabs button {
  min-height: 42px;
  border-radius: 11px;
  font-weight: 900;
}

.login-tabs button.is-active,
.primary-action,
.app-nav button.is-active,
.bottom-nav button.is-active,
.category-rail button.is-active,
.content-card .play-button {
  color: #fff;
  background: linear-gradient(135deg, #8c61ff, #5e73ff 58%, #2ec7ff);
  box-shadow: 0 16px 34px rgba(94, 115, 255, 0.24);
}

.login-server-pill {
  width: fit-content;
  padding: 8px 11px;
  color: #fff;
  background: rgba(46, 199, 255, 0.12);
  border: 1px solid rgba(46, 199, 255, 0.34);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.field-stack {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  padding: 0 13px;
}

input:focus {
  border-color: rgba(46, 199, 255, 0.52);
  box-shadow: 0 0 0 4px rgba(46, 199, 255, 0.08);
}

.login-actions {
  display: flex;
  gap: 10px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  padding: 0 16px;
  font-weight: 900;
}

.primary-action {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.ghost-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-message.is-error {
  color: var(--danger);
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  height: 100vh;
  padding: 18px;
  background: rgba(5, 6, 10, 0.72);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.app-brand {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 11px;
}

.app-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.app-nav button,
.logout-button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  text-align: left;
  font-weight: 900;
}

.app-nav button:not(.is-active),
.logout-button {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--line);
}

.logout-button {
  text-align: center;
}

.app-main {
  min-width: 0;
  padding: 20px 22px 34px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.app-header h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.global-search {
  width: min(360px, 100%);
}

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

.now-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  margin-bottom: 18px;
}

.video-stage,
.now-details,
.dashboard-card,
.content-card,
.series-detail {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 130%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 52px rgba(0, 0, 0, 0.24);
}

.video-stage {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  background: #030409;
}

.player-back {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  left: calc(env(safe-area-inset-left, 0px) + 12px);
  z-index: 8;
  min-height: 42px;
  padding: 0 14px;
  color: #fff;
  background: rgba(5, 6, 10, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.video-stage video {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: contain;
  background: #030409;
}

.video-stage:fullscreen,
.video-stage:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
}

.video-stage:fullscreen video,
.video-stage:-webkit-full-screen video {
  height: 100vh;
  min-height: 100vh;
}

body.ios-player-mode {
  position: fixed;
  inset: 0;
  width: 100%;
  overflow: hidden;
  background: #000;
}

body.ios-player-mode .app-sidebar,
body.ios-player-mode .app-header,
body.ios-player-mode .now-details,
body.ios-player-mode .content-area,
body.ios-player-mode .bottom-nav {
  display: none !important;
}

body.ios-player-mode .app-shell,
body.ios-player-mode .app-main {
  display: block;
  min-height: 100dvh;
  padding: 0;
}

body.ios-player-mode .now-player {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: block;
  margin: 0;
  padding: 0;
  background: #000;
}

body.ios-player-mode .video-stage {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.ios-player-mode .video-stage video {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  object-fit: contain;
}

body.ios-player-mode .video-watermark {
  top: calc(env(safe-area-inset-top, 0px) + 12px);
  right: calc(env(safe-area-inset-right, 0px) + 12px);
}

body.ios-player-mode .video-status {
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  left: calc(env(safe-area-inset-left, 0px) + 12px);
}

body.ios-player-mode .custom-controls {
  left: calc(env(safe-area-inset-left, 0px) + 10px);
  right: calc(env(safe-area-inset-right, 0px) + 10px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  opacity: 0.18;
}

body.ios-player-mode .custom-controls:focus-within,
body.ios-player-mode .video-stage:hover .custom-controls {
  opacity: 1;
}

@media (orientation: landscape) and (max-width: 940px) {
  body.ios-player-mode .custom-controls {
    max-width: 560px;
    margin: 0 auto;
  }
}

.video-watermark {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  opacity: 0.72;
}

.video-status {
  position: absolute;
  top: 14px;
  left: 14px;
  max-width: calc(100% - 86px);
  padding: 7px 10px;
  color: var(--soft);
  background: rgba(5, 6, 10, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
}

.custom-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(5, 6, 10, 0.76);
  border: 1px solid var(--line);
  border-radius: 15px;
  backdrop-filter: blur(16px);
}

.seek-row,
.control-row {
  display: grid;
  align-items: center;
  gap: 10px;
}

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

.control-row {
  grid-template-columns: auto auto auto minmax(0, 1fr) 120px auto auto;
}

.custom-controls button,
.favorite-now {
  min-height: 38px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 11px;
  font-weight: 900;
}

.custom-controls [data-fullscreen] {
  min-width: 78px;
  color: #fff;
  border-color: rgba(46, 199, 255, 0.34);
  background: rgba(46, 199, 255, 0.12);
}

.custom-controls [hidden] {
  display: none !important;
}

.custom-controls button:disabled,
.custom-controls input:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.seek-row span {
  min-width: 92px;
  color: var(--muted);
  text-align: right;
  font-size: 0.76rem;
  font-weight: 900;
}

.seek-row input,
.custom-controls input[type="range"] {
  min-height: 28px;
  accent-color: var(--accent-2);
  padding: 0;
}

.playback-meta {
  min-width: 0;
}

.playback-meta strong,
.playback-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playback-meta span {
  color: var(--muted);
  font-size: 0.78rem;
}

.now-details {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 20px;
}

.now-details span {
  width: fit-content;
  padding: 6px 9px;
  color: #fff;
  background: linear-gradient(135deg, #8c61ff, #5e73ff 58%, #2ec7ff);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.now-details h3 {
  margin: 0;
  font-size: 1.22rem;
}

.now-details p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.favorite-now.is-active,
.fav-button.is-active {
  color: #17110a;
  background: var(--gold);
}

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

.dashboard-card {
  display: grid;
  gap: 11px;
  min-height: 134px;
  padding: 16px;
  text-align: left;
  color: var(--text);
}

.dashboard-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.dashboard-card strong {
  font-size: 1.75rem;
}

.category-rail {
  display: flex;
  gap: 8px;
  margin-bottom: 13px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-rail button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.content-grid.is-list-view {
  grid-template-columns: 1fr;
}

.catalog-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.catalog-summary div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.catalog-summary strong {
  color: var(--text);
  font-size: 0.92rem;
}

.catalog-summary span {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.skeleton-chip {
  flex: 0 0 92px;
  height: 38px;
  border-radius: 999px;
}

.skeleton-chip,
.skeleton-card .poster,
.skeleton-card h3,
.skeleton-card p,
.skeleton-card .card-meta,
.skeleton-card .card-topline span,
.skeleton-summary span,
.skeleton-card .card-actions button {
  color: transparent;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  background-size: 220% 100%;
  animation: skeletonPulse 1.2s var(--ease) infinite;
}

.skeleton-card h3,
.skeleton-card p,
.skeleton-card .card-meta {
  min-height: 16px;
  border-radius: 999px;
}

.skeleton-card .card-actions button {
  border-color: transparent;
}

@keyframes skeletonPulse {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

.content-card {
  position: relative;
  overflow: hidden;
  color: var(--text);
  text-align: left;
}

.content-grid.is-list-view .content-card {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr);
  align-items: center;
  min-height: 96px;
}

.load-more-card {
  display: grid;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(46, 199, 255, 0.14), transparent 50%),
    rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.load-more-card strong {
  font-size: 1.8rem;
}

.load-more-card span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
}

.channel-number {
  display: none;
}

.content-grid.is-list-view .channel-number {
  display: grid;
  height: 100%;
  min-height: 96px;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  border-right: 1px solid var(--line);
  font-family: "Sora", system-ui, sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
}

.poster {
  position: relative;
  display: grid;
  min-height: 160px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(140, 97, 255, 0.22), transparent 48%),
    #0c0f18;
}

.poster img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}

.poster .logo-fit {
  width: 78%;
  height: 78%;
  min-height: 0;
  object-fit: contain;
  padding: 18px;
}

.content-grid.is-list-view .poster {
  min-height: 78px;
  margin: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.content-grid.is-list-view .poster img {
  min-height: 78px;
}

.content-grid.is-list-view .poster .logo-fit {
  width: 82%;
  height: 82%;
  padding: 10px;
}

.poster-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  color: #fff;
  background: rgba(5, 6, 10, 0.76);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
}

.poster-initial {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #8c61ff, #2ec7ff);
  border-radius: 16px;
  font-family: "Sora", system-ui, sans-serif;
  font-weight: 800;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 13px;
}

.content-grid.is-list-view .card-body {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 11px 12px 11px 2px;
}

.card-topline {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-topline span {
  padding: 4px 7px;
  color: #fff;
  background: rgba(140, 97, 255, 0.2);
  border: 1px solid rgba(140, 97, 255, 0.34);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
}

.card-body h3 {
  min-height: 40px;
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.content-grid.is-list-view .card-body h3 {
  grid-column: 1;
  min-height: 0;
  overflow: hidden;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body p {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.content-grid.is-list-view .card-body p {
  grid-column: 1;
  min-height: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-grid.is-list-view .card-meta {
  grid-column: 1;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.content-grid.is-list-view .card-topline {
  grid-column: 1;
  grid-row: 1;
}

.content-grid.is-list-view .card-actions {
  grid-column: 2;
  grid-row: 1 / span 4;
  align-self: center;
  min-width: 126px;
}

.content-card button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 900;
}

.play-button {
  border-color: rgba(255, 255, 255, 0.34) !important;
}

.fav-button {
  width: 40px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.series-detail {
  padding: 16px;
}

.series-head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.series-head img {
  width: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.season-block {
  margin-top: 14px;
}

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

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

.episode-row strong,
.episode-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.episode-row span {
  color: var(--muted);
  font-size: 0.8rem;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 26px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.bottom-nav {
  display: none;
}

@media (max-width: 1120px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .now-player {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-copy {
    min-height: 360px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: 72px;
  }

  .app-sidebar {
    display: none;
  }

  .app-main {
    padding: 16px;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .global-search {
    width: 100%;
  }

  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 6px;
    background: rgba(5, 6, 10, 0.86);
    border: 1px solid var(--line);
    border-radius: 17px;
    backdrop-filter: blur(18px);
  }

  .bottom-nav button {
    min-height: 42px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
  }
}

@media (max-width: 640px) {
  .player-login {
    align-items: start;
    padding: 82px 12px 16px;
  }

  .login-brand {
    top: 14px;
    left: 14px;
  }

  .login-copy,
  .login-form {
    padding: 20px;
  }

  .login-copy {
    min-height: 300px;
  }

  .field-row,
  .login-actions,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .login-actions {
    display: grid;
  }

  .video-stage,
  .video-stage video {
    min-height: 240px;
  }

  .custom-controls {
    gap: 7px;
    padding: 9px;
  }

  .control-row {
    grid-template-columns: 46px 56px 46px minmax(64px, 1fr);
    gap: 8px;
  }

  .control-row > input[type="range"] {
    display: none;
  }

  .control-row [data-skip-back] {
    grid-column: 1;
    grid-row: 1;
  }

  .control-row [data-play-toggle] {
    grid-column: 2;
    grid-row: 1;
  }

  .control-row [data-skip-forward] {
    grid-column: 3;
    grid-row: 1;
  }

  .control-row [data-fullscreen] {
    grid-column: 4;
    grid-row: 1;
    min-width: 0;
    padding: 0 8px;
    font-size: 0;
  }

  .control-row [data-fullscreen]::before {
    content: "Vollbild";
    font-size: 0.76rem;
  }

  .playback-meta {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .control-row [data-external-open] {
    grid-column: 1 / -1;
    grid-row: 3;
    display: block;
    width: 100%;
    min-height: 42px;
    color: #17110a;
    background: var(--gold);
  }

  .now-details {
    padding: 16px;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .catalog-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-summary div {
    width: 100%;
    justify-content: space-between;
  }

  .content-card {
    display: grid;
    grid-template-columns: 44px 70px minmax(0, 1fr);
    align-items: center;
    min-height: 92px;
  }

  .channel-number {
    display: grid;
    height: 100%;
    min-height: 92px;
    place-items: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.035);
    border-right: 1px solid var(--line);
    font-size: 0.68rem;
    font-weight: 900;
  }

  .poster,
  .content-grid.is-list-view .poster {
    min-height: 70px;
    margin: 8px;
    border: 1px solid var(--line);
    border-radius: 13px;
  }

  .poster img,
  .content-grid.is-list-view .poster img {
    min-height: 70px;
  }

  .poster .logo-fit,
  .content-grid.is-list-view .poster .logo-fit {
    padding: 9px;
  }

  .card-body h3 {
    min-height: 0;
    font-size: 0.9rem;
  }

  .card-body,
  .content-grid.is-list-view .card-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 9px 10px 9px 0;
  }

  .card-topline {
    grid-column: 1;
  }

  .card-body h3,
  .card-body p,
  .card-meta {
    grid-column: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .card-body p {
    min-height: 0;
  }

  .card-actions,
  .content-grid.is-list-view .card-actions {
    grid-column: 1;
    grid-row: auto;
    min-width: 0;
  }

  .series-head {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .series-head img {
    width: 86px;
  }
}

/* Final SLTV-style layout overrides */
body[data-view] {
  background: linear-gradient(110deg, rgba(42, 70, 67, 0.68), rgba(17, 22, 34, 0.96) 45%, rgba(40, 24, 55, 0.9)), #111722;
}

body[data-view]::before {
  display: none;
}

body[data-view] .app-shell {
  display: block;
  min-height: 100vh;
  overflow-x: auto;
  padding-bottom: 0;
}

body[data-view] .app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex !important;
  height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 clamp(22px, 5vw, 76px);
  background: linear-gradient(90deg, rgba(21, 34, 36, 0.96), rgba(15, 19, 30, 0.96));
  border-right: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

body[data-view] .app-brand {
  display: inline-flex;
  min-width: 190px;
  align-items: center;
  gap: 14px;
}

body[data-view] .app-brand span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
}

body[data-view] .app-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 7vw, 116px);
}

body[data-view] .app-nav button,
body[data-view] .logout-button {
  min-height: 44px;
  padding: 0 8px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: center;
  font-size: 1rem;
}

body[data-view] .app-nav button.is-active {
  color: #3c9ddd;
  background: transparent;
  box-shadow: none;
}

body[data-view] .logout-button {
  width: 44px;
  min-width: 44px;
  overflow: hidden;
  color: #45a8e8;
  background: rgba(11, 22, 38, 0.86);
  border: 1px solid rgba(69, 168, 232, 0.35);
  border-radius: 50%;
  text-indent: -999px;
}

body[data-view] .logout-button::after {
  content: "T";
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  text-indent: 0;
}

body[data-view] .bottom-nav {
  display: none !important;
}

body[data-view="live"] .app-main,
body[data-view="vod"] .app-main,
body[data-view="series"] .app-main,
body[data-view="favorites"] .app-main,
body[data-view="history"] .app-main {
  display: grid;
  height: calc(100vh - 86px);
  min-height: 620px;
  min-width: 1080px;
  padding: 0;
  overflow: hidden;
}

body[data-view="live"] .app-main {
  grid-template-columns: minmax(300px, 32vw) minmax(370px, 1fr) minmax(310px, 24vw);
}

body[data-view="vod"] .app-main,
body[data-view="series"] .app-main,
body[data-view="favorites"] .app-main,
body[data-view="history"] .app-main {
  grid-template-columns: minmax(310px, 30vw) minmax(0, 1fr);
}

body[data-view="live"] .app-header,
body[data-view="vod"] .app-header,
body[data-view="series"] .app-header,
body[data-view="favorites"] .app-header,
body[data-view="history"] .app-header {
  display: none;
}

body[data-view="live"] .content-area,
body[data-view="live"] .catalog-view,
body[data-view="vod"] .content-area,
body[data-view="vod"] .catalog-view,
body[data-view="series"] .content-area,
body[data-view="series"] .catalog-view,
body[data-view="favorites"] .content-area,
body[data-view="favorites"] .catalog-view,
body[data-view="history"] .content-area,
body[data-view="history"] .catalog-view {
  display: contents;
}

body[data-view="live"] .category-rail,
body[data-view="vod"] .category-rail,
body[data-view="series"] .category-rail,
body[data-view="favorites"] .category-rail,
body[data-view="history"] .category-rail {
  grid-column: 1;
  display: block;
  height: 100%;
  margin: 0;
  padding: 28px 28px 42px;
  overflow-y: auto;
  background: rgba(16, 22, 32, 0.74);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-view="live"] .content-grid,
body[data-view="vod"] .content-grid,
body[data-view="series"] .content-grid,
body[data-view="favorites"] .content-grid,
body[data-view="history"] .content-grid {
  grid-column: 2;
  height: 100%;
  overflow-y: auto;
  background: rgba(15, 20, 31, 0.62);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-view="live"] .now-player {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  margin: 0;
  padding: 18px;
  gap: 14px;
  background: rgba(9, 13, 22, 0.72);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

body[data-view="vod"] .now-player,
body[data-view="series"] .now-player,
body[data-view="favorites"] .now-player,
body[data-view="history"] .now-player {
  display: none;
}

body[data-view="live"] .video-stage {
  min-height: 0;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
}

body[data-view="live"] .video-stage video {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

body[data-view="live"] .now-details {
  min-height: 0;
  align-content: start;
  padding: 16px 0 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.side-panel-head {
  display: grid;
  gap: 22px;
  margin-bottom: 24px;
}

.side-panel-head strong {
  font-size: 1.15rem;
}

.side-panel-head label {
  gap: 0;
}

.side-panel-head label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.side-panel-head input {
  min-height: 54px;
  padding: 0 0 0 12px;
  color: #d5e3f4;
  background: transparent;
  border: 0;
  border-bottom: 2px solid #2f8ece;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 800;
}

.side-panel-head input::placeholder {
  color: #9db0cc;
}

.side-shortcuts,
.category-list {
  display: grid;
}

.side-shortcuts button,
.category-list button {
  min-height: 58px;
  padding: 0 8px;
  color: #fff;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  text-align: left;
  font-size: 1rem;
  font-weight: 800;
}

.side-shortcuts button.is-active,
.category-list button.is-active {
  color: #3c9ddd;
}

body[data-view="live"] .category-list button.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 4px 0 0 #3c9ddd;
}

.content-head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 28px;
  color: #9db0cc;
  background: rgba(16, 22, 32, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.content-head div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-head strong {
  color: #fff;
}

.content-grid.is-channel-view {
  display: block;
}

.channel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  min-height: 82px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.channel-row.is-playing {
  background: linear-gradient(90deg, rgba(47, 142, 206, 0.18), rgba(47, 142, 206, 0.04));
}

.channel-main {
  display: grid;
  grid-template-columns: 62px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  color: #fff;
  background: transparent;
  border: 0;
  text-align: left;
}

.channel-index {
  color: #8fa1bd;
  font-weight: 900;
}

.channel-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
}

.channel-logo img {
  max-width: 54px;
  max-height: 42px;
  object-fit: contain;
}

.channel-logo span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: linear-gradient(135deg, #8c61ff, #2ec7ff);
  border-radius: 50%;
  font-weight: 900;
}

.channel-title {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-quality {
  color: #cbd7e8;
  font-size: 0.72rem;
  font-weight: 900;
}

.channel-row .fav-button {
  align-self: center;
  justify-self: center;
}

.content-grid.is-poster-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  align-content: start;
  gap: 28px 20px;
  padding: 28px;
}

.content-grid.is-poster-view .content-head {
  grid-column: 1 / -1;
  margin: -28px -28px 0;
}

.media-card {
  min-width: 0;
}

.media-poster {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 2 / 3;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  border-radius: 0;
}

.media-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-poster > span:not(.poster-initial) {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 7px;
  background: rgba(5, 6, 10, 0.76);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
}

.media-meta {
  display: grid;
  gap: 7px;
  padding-top: 10px;
}

.media-meta span,
.media-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-meta span {
  color: #9db0cc;
}

.media-meta strong {
  color: #fff;
}

.media-meta div {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
}

.skeleton-line {
  display: block;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  background-size: 220% 100%;
  animation: skeletonPulse 1.2s var(--ease) infinite;
}

.skeleton-line.wide {
  width: 70%;
}

.skeleton-line.category {
  height: 52px;
  border-radius: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 860px) {
  body[data-view] .app-sidebar {
    min-width: 1080px;
    padding: 0 32px;
  }

  body[data-view] .app-main {
    min-width: 1080px;
  }

  body[data-view="live"] .app-main,
  body[data-view="vod"] .app-main,
  body[data-view="series"] .app-main,
  body[data-view="favorites"] .app-main,
  body[data-view="history"] .app-main {
    height: calc(100dvh - 86px);
  }
}
