:root {
  color-scheme: dark;
  --bg: #02060a;
  --bg-soft: #061018;
  --panel: rgba(4, 10, 16, 0.84);
  --panel-solid: #07101a;
  --panel-hover: rgba(12, 28, 38, 0.9);
  --line: rgba(88, 234, 255, 0.2);
  --line-bright: rgba(88, 234, 255, 0.56);
  --text: #eefaff;
  --muted: #8ea3b2;
  --faint: #5a6d79;
  --cyan: #43e8ff;
  --cyan-soft: rgba(67, 232, 255, 0.16);
  --green: #35f0a1;
  --violet: #9b6cff;
  --amber: #ffd166;
  --danger: #ff657a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    linear-gradient(180deg, rgba(2, 6, 10, 0.2), rgba(2, 6, 10, 0.96)),
    repeating-linear-gradient(0deg, rgba(67, 232, 255, 0.035) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(67, 232, 255, 0.025) 0 1px, transparent 1px 112px),
    linear-gradient(135deg, #05111b, #02060a 62%, #020305);
}

body::after {
  z-index: -1;
  opacity: 0.62;
  background:
    linear-gradient(118deg, transparent 0 15%, rgba(67, 232, 255, 0.12) 15.2%, transparent 15.6% 36%, rgba(67, 232, 255, 0.08) 36.2%, transparent 36.6%),
    linear-gradient(28deg, transparent 0 22%, rgba(53, 240, 161, 0.08) 22.2%, transparent 22.6% 68%, rgba(67, 232, 255, 0.08) 68.2%, transparent 68.6%),
    linear-gradient(180deg, transparent, rgba(67, 232, 255, 0.035));
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 88%, transparent);
}

body.is-unlocked .lock-screen {
  display: none;
}

button,
input,
select {
  font: inherit;
}

.lucide,
[data-lucide] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.85;
}

button,
.upload-button,
.file-button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    repeating-linear-gradient(0deg, rgba(67, 232, 255, 0.035) 0 1px, transparent 1px 70px),
    linear-gradient(135deg, #041019, #02060a 70%);
}

.lock-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 32px;
  background: rgba(4, 10, 16, 0.94);
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.lock-brand {
  color: var(--text);
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
}

label,
.lock-card label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
select {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: rgba(2, 7, 12, 0.78);
  border: 1px solid rgba(142, 163, 178, 0.22);
  border-radius: 6px;
  outline: none;
  padding: 12px 13px;
}

input:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(67, 232, 255, 0.14);
}

.lock-card button,
.primary-button,
.file-button {
  min-height: 42px;
  color: #031018;
  background: linear-gradient(135deg, var(--cyan), #34b7ff);
  border-radius: 6px;
  font-weight: 900;
}

.secondary-button {
  min-height: 40px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
}

.secondary-button:hover {
  border-color: var(--line-bright);
  background: rgba(67, 232, 255, 0.1);
}

.lock-card p,
.status-message,
.drawer-note {
  margin: 0;
  color: var(--muted);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px 14px;
  background: rgba(3, 7, 12, 0.84);
  border-right: 1px solid rgba(67, 232, 255, 0.16);
  box-shadow: 18px 0 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
}

.sidebar-brand,
.topbar,
.top-actions,
.nav-item,
.playlist-button,
.sidebar-heading,
.section-head,
.epg-head,
.epg-date-row,
.player-info,
.metric-pill,
.switch-row,
.player-actions {
  display: flex;
  align-items: center;
}

.sidebar-brand {
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(67, 232, 255, 0.1);
}

.brand-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(67, 232, 255, 0.08);
  box-shadow: 0 0 26px rgba(67, 232, 255, 0.18);
}

.brand-icon .lucide,
.brand-icon [data-lucide] {
  width: 17px;
  height: 17px;
}

.sidebar-brand strong {
  flex: 1;
  overflow: hidden;
  font-size: 1.2rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-menu,
.sidebar-heading button,
.round-button,
.star-button {
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
}

.sidebar-menu,
.sidebar-heading button,
.round-button {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(142, 163, 178, 0.18);
  border-radius: 7px;
}

.sidebar-menu:hover,
.sidebar-heading button:hover,
.round-button:hover,
.round-button.is-on {
  color: var(--cyan);
  border-color: var(--line-bright);
  background: rgba(67, 232, 255, 0.08);
}

.main-nav {
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  gap: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 12px;
  text-align: left;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nav-item .lucide,
.nav-item [data-lucide] {
  width: 18px;
  height: 18px;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--text);
  border-color: rgba(67, 232, 255, 0.22);
  background: linear-gradient(90deg, rgba(67, 232, 255, 0.14), transparent);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.nav-item.is-active .lucide,
.nav-item:hover .lucide {
  color: var(--cyan);
}

.playlist-block {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.sidebar-heading {
  justify-content: space-between;
  padding: 0 8px;
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-heading-sub {
  margin-top: 8px;
  color: var(--muted);
}

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

.playlist-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
}

.playlist-entry.is-merged {
  grid-template-columns: 1fr;
}

.playlist-button {
  width: 100%;
  min-height: 56px;
  gap: 11px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(142, 163, 178, 0.13);
  border-radius: 7px;
  padding: 10px 12px;
  text-align: left;
}

.playlist-button:hover,
.playlist-button.is-active {
  border-color: var(--line-bright);
  background: rgba(67, 232, 255, 0.08);
}

.playlist-button > .lucide,
.playlist-button > [data-lucide] {
  color: var(--cyan);
}

.playlist-button span {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.playlist-button strong,
.playlist-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-button strong {
  font-size: 0.88rem;
}

.playlist-button small,
.playlist-empty {
  color: var(--muted);
  font-size: 0.75rem;
}

.playlist-delete {
  width: 38px;
  min-height: 56px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(142, 163, 178, 0.13);
  border-radius: 7px;
}

.playlist-delete:hover {
  color: var(--danger);
  border-color: rgba(255, 101, 122, 0.48);
  background: rgba(255, 101, 122, 0.08);
}

.playlist-empty {
  padding: 10px 12px;
  border: 1px dashed rgba(142, 163, 178, 0.18);
  border-radius: 7px;
}

.playlist-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 14px rgba(53, 240, 161, 0.7);
}

.playlist-tree {
  display: grid;
  gap: 4px;
  max-height: 30vh;
  overflow: auto;
  margin-left: 16px;
  padding-left: 12px;
  border-left: 1px solid rgba(67, 232, 255, 0.18);
}

.group-tab {
  min-height: 30px;
  overflow: hidden;
  color: var(--muted);
  background: transparent;
  border-radius: 6px;
  padding: 0 9px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-tab:hover,
.group-tab.is-active {
  color: var(--text);
  background: rgba(67, 232, 255, 0.08);
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(67, 232, 255, 0.1);
}

.connection-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(142, 163, 178, 0.14);
  border-radius: 8px;
}

.connection-card span,
.connection-card b,
.connection-card strong {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.connection-card i {
  width: 9px;
  height: 9px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 12px rgba(53, 240, 161, 0.8);
}

.connection-card b {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-shell {
  min-width: 0;
  padding: 14px 22px 36px;
}

.topbar {
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.search-shell {
  position: relative;
  width: min(620px, 48vw);
}

.search-shell input {
  min-height: 42px;
  padding-left: 43px;
  border-color: rgba(142, 163, 178, 0.18);
  background: rgba(5, 12, 20, 0.78);
}

.search-shell span {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-50%);
}

.search-shell span::after {
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg);
  content: "";
}

.top-actions {
  gap: 10px;
}

.upload-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  border: 1px solid rgba(142, 163, 178, 0.18);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.82rem;
  font-weight: 800;
}

.upload-button:hover {
  border-color: var(--line-bright);
  background: rgba(67, 232, 255, 0.08);
}

.upload-button .lucide,
.upload-button [data-lucide] {
  color: var(--cyan);
}

.hidden-input {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.user-bubble {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: rgba(67, 232, 255, 0.1);
  color: var(--cyan);
  font-weight: 900;
}

.hud-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto 16px;
  max-width: 1420px;
}

.hud-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
  min-height: 88px;
  overflow: hidden;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.hud-card span {
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hud-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.38rem;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hud-card small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 34%);
  gap: 18px;
  align-items: start;
  max-width: 1420px;
  margin: 0 auto;
}

.watch-column {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.player-card,
.epg-card,
.channel-tile,
.recent-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.player-card,
.epg-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.player-card::before,
.epg-card::before,
.hud-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 28px rgba(67, 232, 255, 0.05);
  content: "";
}

.video-stage {
  position: relative;
  height: clamp(360px, 49vh, 690px);
  overflow: hidden;
  background: #02060a;
}

.video-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 10, 0.88), rgba(2, 6, 10, 0.1), rgba(2, 6, 10, 0.84)),
    repeating-linear-gradient(0deg, rgba(67, 232, 255, 0.04) 0 1px, transparent 1px 52px),
    linear-gradient(135deg, #081522, #02060a 72%);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.video-logo {
  position: absolute;
  top: 26px;
  left: 26px;
  z-index: 2;
  max-width: calc(100% - 52px);
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.75);
  text-transform: uppercase;
  white-space: nowrap;
}

video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  object-fit: contain;
}

.empty-player {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--muted);
  pointer-events: none;
}

.empty-player.is-hidden {
  display: none;
}

.play-sigil {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  background: rgba(67, 232, 255, 0.08);
  box-shadow: 0 0 38px rgba(67, 232, 255, 0.16);
}

.play-sigil::after {
  margin-left: 4px;
  border-left: 23px solid var(--cyan);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  content: "";
}

.player-info {
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(180deg, rgba(4, 10, 16, 0.86), rgba(4, 10, 16, 0.96));
  border-top: 1px solid rgba(67, 232, 255, 0.11);
}

.player-info div:first-child {
  flex: 1;
  min-width: 0;
}

.player-info h1 {
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-info p,
.player-info small {
  display: block;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-info p span {
  color: var(--cyan);
  font-weight: 900;
}

.player-actions {
  gap: 9px;
}

.star-button {
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  font-size: 1.5rem;
}

.star-button:hover,
.star-button.is-on {
  color: var(--amber);
  border-color: rgba(255, 209, 102, 0.42);
  background: rgba(255, 209, 102, 0.08);
}

.rail-section {
  min-width: 0;
}

.rail-section h2,
.section-head h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.recent-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.recent-tile {
  min-height: 106px;
  display: grid;
  align-content: end;
  gap: 4px;
  overflow: hidden;
  border-radius: 7px;
  padding: 13px;
  color: var(--text);
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.recent-tile:hover {
  border-color: var(--line-bright);
  transform: translateY(-2px);
  background-color: var(--panel-hover);
}

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

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

.section-head {
  justify-content: space-between;
  gap: 12px;
}

.metric-pill {
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  background: rgba(67, 232, 255, 0.07);
  border: 1px solid rgba(67, 232, 255, 0.18);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-pill strong {
  color: var(--cyan);
}

.status-message {
  min-height: 22px;
  margin-bottom: 9px;
  color: var(--muted);
}

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

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 9px;
}

.channel-tile {
  min-height: 74px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: var(--text);
  border-radius: 7px;
  padding: 11px;
  text-align: left;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.channel-tile:hover,
.channel-tile.is-active {
  border-color: var(--line-bright);
  background: var(--panel-hover);
  transform: translateY(-2px);
}

.tile-logo {
  width: 58px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(67, 232, 255, 0.14);
  border-radius: 6px;
  background: rgba(67, 232, 255, 0.055);
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 950;
}

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

.tile-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

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

.tile-copy strong {
  font-size: 0.92rem;
}

.tile-copy span {
  color: var(--muted);
  font-size: 0.76rem;
}

.tile-star {
  color: var(--faint);
  font-size: 1.1rem;
}

.epg-card {
  position: sticky;
  top: 14px;
  min-height: 560px;
  padding: 18px 0 14px;
}

.epg-head,
.epg-date-row {
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
}

.epg-head {
  margin-bottom: 18px;
}

.epg-head strong {
  color: var(--text);
  font-size: 0.98rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.epg-date-row {
  min-height: 40px;
  color: var(--muted);
  border-top: 1px solid rgba(67, 232, 255, 0.08);
  border-bottom: 1px solid rgba(67, 232, 255, 0.08);
  font-size: 0.82rem;
}

.epg-grid {
  display: grid;
  max-height: 58vh;
  overflow: auto;
}

.epg-row {
  display: grid;
  grid-template-columns: 34px 104px minmax(0, 1fr) minmax(0, 1fr);
  min-height: 66px;
  border-bottom: 1px solid rgba(67, 232, 255, 0.08);
}

.epg-cell {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 9px 10px;
  color: var(--muted);
  border-left: 1px solid rgba(67, 232, 255, 0.07);
}

.epg-cell:first-child {
  border-left: 0;
  color: var(--text);
  text-align: center;
}

.epg-channel {
  justify-items: center;
  gap: 4px;
  color: var(--text);
  font-size: 0.7rem;
}

.epg-channel span:last-child {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.epg-channel-logo {
  width: 52px;
  height: 27px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-weight: 950;
}

.epg-program.is-now {
  background: rgba(67, 232, 255, 0.1);
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--cyan);
}

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

.epg-program strong {
  font-size: 0.82rem;
}

.epg-program span {
  font-size: 0.74rem;
}

.full-guide-button {
  width: calc(100% - 36px);
  min-height: 44px;
  margin: 14px 18px 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  font-weight: 850;
}

.full-guide-button:hover {
  background: rgba(67, 232, 255, 0.08);
}

.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  width: min(410px, 100vw);
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
  background: rgba(3, 7, 12, 0.96);
  border-right: 1px solid var(--line-bright);
  box-shadow: var(--shadow);
  transform: translateX(-105%);
  transition: transform 180ms ease;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-right {
  right: 0;
  left: auto;
  border-right: 0;
  border-left: 1px solid var(--line-bright);
  transform: translateX(105%);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-head strong {
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.control-stack {
  display: grid;
  gap: 10px;
}

.file-button {
  display: grid;
  place-items: center;
}

.switch-row {
  gap: 10px;
  color: var(--text);
}

.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 256px minmax(0, 1fr);
  }

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

  .epg-card {
    position: relative;
    top: 0;
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    grid-template-rows: auto;
  }

  .main-nav,
  .playlist-tree,
  .sidebar-footer {
    display: none;
  }

  .main-shell {
    padding: 14px;
  }

  .topbar,
  .content-grid,
  .hud-strip {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-shell {
    width: 100%;
  }

  .top-actions {
    justify-content: space-between;
  }

  .video-stage {
    height: 42vh;
    min-height: 270px;
  }

  .epg-row {
    grid-template-columns: 32px 90px minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .player-info,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .player-actions {
    align-self: stretch;
    justify-content: flex-end;
  }

  .channel-grid,
  .recent-row {
    grid-template-columns: 1fr;
  }

  .channel-tile {
    grid-template-columns: 52px minmax(0, 1fr) auto;
  }
}
