:root {
  color-scheme: dark;
  --bg: #101215;
  --panel: #181c21;
  --panel-2: #20262d;
  --text: #f2f5f7;
  --muted: #9aa6b2;
  --line: #313944;
  --accent: #19b88a;
  --accent-2: #f4b942;
  --danger: #e76060;
  --cinema: #6d1f7c;
  --cinema-2: #d84f34;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 68% 24%, rgba(216, 79, 52, .34), transparent 34%),
    linear-gradient(135deg, #111629 0%, #491454 52%, #160d24 100%);
  color: var(--text);
  font-family: Segoe UI, Arial, sans-serif;
  display: grid;
  grid-template-columns: 280px 1fr;
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-view {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(216, 79, 52, .34), transparent 34%),
    linear-gradient(135deg, #111629 0%, #491454 52%, #160d24 100%);
}

.login-panel {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(18, 22, 29, .92);
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
  display: grid;
  gap: 16px;
}

.login-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
}

.login-brand {
  margin-bottom: 8px;
}

#loginError {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
}

body.auth-open .sidebar,
body.auth-open .app {
  filter: blur(4px);
  pointer-events: none;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(15, 18, 24, .88);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .10) 0 34%, transparent 35%),
    linear-gradient(135deg, #22c58e, #1887d7);
  display: grid;
  place-items: center;
  position: relative;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .28);
}

.brand-mark::before {
  content: "";
  width: 25px;
  height: 25px;
  border: 3px solid rgba(255, 255, 255, .92);
  border-right-color: transparent;
  border-radius: 50%;
}

.brand-mark span {
  position: absolute;
  left: 18px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
}

.brand strong, .brand small {
  display: block;
}

.brand small, .status-card small, .eyebrow {
  color: var(--muted);
}

.tabs {
  display: grid;
  gap: 8px;
}

.tab {
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  padding: 12px 14px;
  text-align: left;
}

.tab.active, .tab:hover {
  background: var(--panel-2);
  color: var(--text);
}

.status-card, .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.status-card {
  margin-top: auto;
}

.status-card span, .status-card small {
  display: block;
}

.sidebar-logout {
  width: 100%;
  margin-top: 12px;
}

.app {
  min-width: 0;
  position: relative;
  min-height: 100vh;
}

.player-shell {
  position: relative;
  padding: 22px;
  border-bottom: 1px solid var(--line);
  background: #0c0f12;
}

body[data-view="movies"] .player-shell,
body[data-view="series"] .player-shell,
body[data-view="favorites"] .player-shell,
body.detail-open .player-shell,
body.detail-open .browser-shell {
  display: none;
}

body.playing .player-shell {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 15;
  min-height: 100vh;
  padding: 0;
  background: #000;
}

body.playing .browser-shell {
  display: none;
}

body.playing .sidebar {
  display: none;
}

body.playing {
  grid-template-columns: 1fr;
}

.player-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 14px;
}

.player-back {
  display: none;
}

.player-close {
  display: none;
}

body.playing .player-top {
  position: absolute;
  z-index: 3;
  inset: 0 0 auto;
  height: 76px;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  margin: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent);
}

body.playing .player-back {
  display: block;
  position: absolute;
  left: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
}

body.playing .player-top .eyebrow {
  display: none;
}

body.playing .player-top h1 {
  font-size: 26px;
  text-align: center;
}

body.playing .player-actions {
  position: absolute;
  right: 28px;
}

body.playing .player-close {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 50%;
  background: rgba(16, 18, 21, .86);
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

body.playing .player-close:hover {
  background: rgba(231, 96, 96, .9);
}

h1, h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

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

.icon-btn, .soft-btn, .primary-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 14px;
}

.icon-btn {
  width: 44px;
  padding: 10px 0;
}

.primary-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #06130f;
  font-weight: 700;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

video {
  width: 100%;
  height: calc(100% - 66px);
  min-height: 250px;
  background: #050607;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
}

body.playing #video {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

body.playing .player-hint {
  z-index: 4;
}

.player-hint {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  color: var(--muted);
  pointer-events: none;
}

.browser-shell {
  min-height: 0;
  padding: 18px 22px 24px;
  overflow: auto;
}

body[data-view="movies"] .browser-shell,
body[data-view="series"] .browser-shell,
body[data-view="favorites"] .browser-shell {
  min-height: 100vh;
}

body[data-view="live"] .player-shell,
body[data-view="live"] .catalog-layout {
  display: none;
}

body[data-view="settings"] .player-shell,
body[data-view="settings"] .toolbar,
body[data-view="settings"] .catalog-layout,
body[data-view="settings"] .live-layout {
  display: none;
}

body[data-view="settings"] .browser-shell {
  min-height: 100vh;
  padding-top: 24px;
}

body[data-view="users"] .player-shell,
body[data-view="users"] .toolbar,
body[data-view="users"] .catalog-layout,
body[data-view="users"] .live-layout,
body[data-view="users"] .settings {
  display: none;
}

body[data-view="users"] .browser-shell {
  min-height: 100vh;
  padding-top: 24px;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 12px;
  margin-bottom: 16px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}

.live-layout {
  height: calc(100vh - 102px);
  display: grid;
  grid-template-columns: 300px 380px 1fr;
  gap: 8px;
  min-height: 520px;
}

.live-categories {
  overflow: auto;
  padding-right: 4px;
}

.live-channel-panel {
  min-width: 0;
  overflow: auto;
  border-left: 2px solid rgba(255, 255, 255, .8);
  border-right: 2px solid rgba(255, 255, 255, .8);
}

.live-channel-list {
  display: grid;
  gap: 6px;
}

.live-channel-row {
  min-height: 62px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(100deg, rgba(67, 51, 145, .78), rgba(214, 73, 54, .46));
  color: white;
  display: grid;
  grid-template-columns: 46px 54px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-align: left;
}

.live-channel-row.active {
  border-color: #ffc400;
  box-shadow: inset 0 0 0 1px #ffc400;
}

.live-number {
  color: rgba(255, 255, 255, .88);
  text-align: right;
}

.live-logo {
  width: 42px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: rgba(255, 255, 255, .7);
}

.live-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.live-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
}

.live-preview {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(300px, 58vh) 1fr;
  background: rgba(0, 0, 0, .22);
}

.live-preview video {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border-radius: 0;
  border: 0;
  background: #000;
}

.live-info {
  padding: 26px 28px;
  background: linear-gradient(135deg, rgba(232, 131, 61, .92), rgba(101, 14, 75, .92));
}

.live-info h2 {
  font-size: 28px;
  margin: 0 0 8px;
}

.live-info p {
  color: rgba(255, 255, 255, .82);
  margin: 0 0 28px;
}

.live-player-message {
  min-height: 24px;
  font-weight: 700;
}

.live-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.catalog-main {
  min-width: 0;
}

.continue-section {
  margin-bottom: 28px;
}

.continue-section h2 {
  font-size: 22px;
  margin-bottom: 14px;
}

.continue-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 170px;
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-width: thin;
}

.continue-card .item-title {
  min-height: 52px;
  font-size: 14px;
}

.category-rail {
  display: grid;
  align-content: start;
  gap: 6px;
}

.category-row {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 0;
  background: rgba(18, 21, 28, .68);
  color: var(--text);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
}

.category-row:hover,
.category-row.active {
  background: rgba(122, 42, 131, .72);
  border-color: rgba(255, 255, 255, .18);
}

.category-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.item-card {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 12px;
  text-align: left;
  display: grid;
  gap: 7px;
}

.poster-card {
  min-height: 0;
  background: rgba(38, 22, 31, .72);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .34);
}

.poster-card:hover {
  border-color: #ffba1f;
  box-shadow: 0 0 0 2px rgba(255, 186, 31, .55), 0 14px 24px rgba(0, 0, 0, .42);
}

.poster-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, #2a1630, #473327);
  overflow: hidden;
}

.poster-img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .72);
  font-size: 42px;
  font-weight: 800;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .10), transparent 30%),
    linear-gradient(145deg, #412138, #2b1728 48%, #533126);
}

.poster-card .item-title {
  min-height: 58px;
  display: grid;
  align-items: center;
  padding: 10px 12px;
  text-align: center;
}

.rating-badge {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  border-radius: 5px;
  background: #229bec;
  color: white;
  padding: 3px 6px;
  font-size: 12px;
}

.watch-progress {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: rgba(0, 0, 0, .72);
}

.watch-progress span {
  display: block;
  height: 100%;
  background: #23c997;
}

.load-more {
  display: block;
  min-width: 230px;
  margin: 28px auto 6px;
}

.item-card:hover {
  border-color: var(--accent);
}

.item-title {
  font-weight: 700;
  line-height: 1.25;
}

.item-meta {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  width: fit-content;
  color: #07120f;
  background: var(--accent-2);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
}

.poster-frame .badge {
  position: absolute;
  z-index: 2;
  left: 8px;
  top: 8px;
}

.detail-view {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #160d24;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(2px);
  transform: scale(1.04);
  opacity: .58;
}

.detail-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .62) 0 28%, rgba(94, 22, 105, .82) 28% 60%, rgba(45, 9, 58, .96) 100%);
}

.back-btn {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 28px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 24px;
}

.detail-content {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
  padding: 150px 7vw 90px;
}

.detail-poster {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .58);
}

.detail-info {
  max-width: 980px;
}

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

.watch-btn {
  border: 0;
  border-radius: 28px;
  background: #229bec;
  color: white;
  padding: 14px 28px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

.detail-fav {
  border: 0;
  background: transparent;
  color: white;
  font-size: 42px;
  line-height: 1;
}

.detail-info h2 {
  font-size: 34px;
  margin: 10px 0 12px;
}

.detail-info p {
  font-size: 20px;
  line-height: 1.45;
  color: rgba(255, 255, 255, .88);
}

.series-browser {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.series-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.series-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 220px;
  color: rgba(255, 255, 255, .78);
}

.series-toolbar select {
  background: rgba(14, 18, 24, .92);
}

.series-toolbar span {
  color: rgba(255, 255, 255, .72);
  font-weight: 700;
}

.episode-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.episode-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 6px;
  background: rgba(13, 17, 23, .82);
  color: white;
  padding: 11px 13px;
  text-align: left;
}

.episode-row:hover,
.episode-row.active {
  border-color: #f2c94c;
  background: rgba(64, 40, 94, .92);
}

.episode-row span {
  color: #8fd7ff;
  font-weight: 800;
}

.episode-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.series-error {
  border: 1px solid rgba(255, 180, 180, .42);
  border-radius: 6px;
  background: rgba(90, 20, 28, .72);
  color: #ffe1e1;
  padding: 12px;
}

.settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.list-message {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 14px 16px;
  background: rgba(25, 184, 138, .18);
  color: #dffcf3;
  font-weight: 700;
}

.list-message[data-type="error"] {
  background: rgba(231, 96, 96, .18);
  color: #ffdcdc;
}

.playlist-panel {
  grid-column: 1 / -1;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title-row h2 {
  margin-bottom: 0;
}

.playlist-list {
  display: grid;
  gap: 10px;
}

.playlist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, auto);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #13181d;
  padding: 10px;
}

.playlist-edit {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.playlist-share {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.playlist-share-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.playlist-share-title span {
  color: var(--muted);
  font-size: 14px;
}

.share-user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
}

.share-user-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 0;
}

.share-user-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.playlist-share-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.shared-tag {
  color: #9cd9c6;
  font-size: 14px;
  white-space: nowrap;
}

.playlist-edit label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.playlist-edit-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.playlist-row.active {
  border-color: var(--accent);
  background: #13211d;
}

.playlist-main {
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 4px;
}

.playlist-main strong, .playlist-main span {
  display: block;
}

.playlist-main span, .empty-inline, .field-label {
  color: var(--muted);
}

.field-label {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.users-view {
  display: grid;
  gap: 18px;
}

.user-create-form {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr .8fr auto auto;
  align-items: end;
  gap: 12px;
}

.user-create-form label,
.user-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  min-width: 0;
}

.check-field {
  display: flex !important;
  flex-direction: row;
  align-items: center;
  gap: 8px !important;
  min-height: 44px;
  color: var(--text) !important;
}

.check-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.user-list {
  display: grid;
  gap: 12px;
}

.user-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #13181d;
  padding: 14px;
}

.user-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.user-row-head strong,
.user-row-head span {
  display: block;
}

.user-row-head > div:first-child > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.user-badges,
.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.user-badge {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 700;
}

.user-badge.admin {
  color: #ffeab0;
  border-color: #9b7620;
  background: rgba(244, 185, 66, .14);
}

.user-badge.online {
  color: #c8ffed;
  border-color: #168c6b;
  background: rgba(25, 184, 138, .16);
}

.user-badge.blocked,
.user-badge.expired {
  color: #ffd7d7;
  border-color: #984545;
  background: rgba(231, 96, 96, .16);
}

.user-badge.active,
.user-badge.sessions {
  color: #d7e8f7;
  background: rgba(34, 155, 236, .10);
}

.user-fields {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr .8fr .7fr auto auto;
  align-items: end;
  gap: 10px;
}

.user-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

@media (max-width: 1450px) {
  .user-create-form,
  .user-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .user-create-form .primary-btn {
    min-height: 44px;
  }
}

.file-drop {
  display: block;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 10px;
  color: var(--muted);
}

.file-drop input {
  display: none;
}

.grid-form {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.grid-form label {
  color: var(--muted);
  display: grid;
  gap: 5px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 46px 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tabs {
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  }

  .tab {
    text-align: center;
    padding: 10px 6px;
  }

  .toolbar, .settings, .catalog-layout, .detail-content,
  .user-create-form, .user-fields {
    grid-template-columns: 1fr;
  }

  .live-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .playlist-row {
    grid-template-columns: 1fr;
  }

  .playlist-edit {
    grid-template-columns: 1fr;
  }

  .playlist-share-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-row-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-rail {
    display: none;
  }

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

  .detail-content {
    padding: 100px 22px 48px;
  }

  .detail-poster {
    max-width: 260px;
  }

  .series-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .series-toolbar label {
    min-width: 0;
    width: 100%;
  }

  .episode-row {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  body.playing .player-top {
    height: 64px;
    padding: 0 12px;
  }

  body.playing .player-back {
    left: 12px;
  }

  body.playing .player-top h1 {
    max-width: calc(100vw - 150px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
  }

  body.playing .player-actions {
    right: 12px;
  }

  body.playing #favoriteBtn,
  body.playing #externalBtn {
    display: none;
  }
}
