@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  color-scheme: dark;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: #070a12;
  color: #eef2ff;
  --bg: #070a12;
  --panel: rgba(12, 18, 32, 0.92);
  --panel-strong: rgba(16, 24, 42, 0.96);
  --accent: #f36d3d;
  --accent-2: #4a7dff;
  --muted: rgba(238, 242, 255, 0.65);
  --line: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #1a233d, #070a12 60%);
  min-height: 100svh;
  overflow-x: hidden;
  overscroll-behavior: none;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 22, 0.92);
  backdrop-filter: blur(8px);
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

body.logged-out .search-wrap,
body.logged-out .session {
  display: none;
}

.brand-block {
  display: grid;
  gap: 4px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.subtitle {
  font-size: 12px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex: 1 1 auto;
  justify-content: flex-end;
}

.search-wrap {
  display: grid;
  gap: 6px;
  min-width: 260px;
  position: relative;
}

.search {
  border-radius: 999px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(9, 14, 26, 0.85);
  color: #eef2ff;
}

.search-hint {
  display: none;
  font-size: 11px;
  color: rgba(238, 242, 255, 0.4);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: rgba(12, 18, 32, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 15;
  box-shadow: 0 20px 45px rgba(5, 10, 20, 0.5);
}

.search-results[data-loading="1"]::before {
  content: "Searching catch-up…";
  display: block;
  padding: 8px 12px;
  font-size: 12px;
  color: rgba(230, 235, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search-debug {
  font-size: 11px;
  color: rgba(230, 235, 255, 0.5);
  margin-bottom: 6px;
}
.search-result {
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result strong {
  font-size: 14px;
}

.search-result small {
  color: var(--muted);
}

.search-result:hover {
  background: rgba(74, 125, 255, 0.2);
}
.search-result.disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.session {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  flex-wrap: wrap;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--accent-2);
  color: white;
  font-weight: 600;
}

button.ghost {
  background: transparent;
  color: rgba(230, 235, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

button.active {
  background: #4a7dff;
  color: white;
}

main.content {
  flex: 1;
  padding: 24px;
}

.panel {
  max-width: 1200px;
  margin: 0 auto;
}

.login {
  max-width: 420px;
  background: var(--panel);
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.login-warning {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 120, 80, 0.15);
  border: 1px solid rgba(255, 120, 80, 0.5);
  color: #ffd1c1;
  font-size: 12px;
  line-height: 1.4;
}

.login form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: rgba(230, 235, 255, 0.75);
}

input, select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  color: #eef2ff;
}

.login input,
.login select,
.login button {
  font-size: 16px;
}

.error {
  color: #ff8b8b;
  margin-top: 12px;
}

.dashboard {
  display: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.tabs {
  display: none;
}

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

.workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: calc(100svh - 180px);
}

.sidebar {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  max-height: calc(100dvh - 220px);
  overflow-y: auto;
}

.main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.quick-rows {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.quick-rail {
  background: var(--panel);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  min-width: 0;
}

.quick-rail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 10px;
}

.quick-rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  min-width: 0;
}

.quick-card {
  background: rgba(12, 18, 32, 0.92);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  cursor: pointer;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.quick-thumb {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.quick-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quick-card.type-live .quick-thumb img,
.quick-card.type-catchup .quick-thumb img {
  object-fit: contain;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.quick-meta {
  display: grid;
  gap: 4px;
}

.quick-title {
  font-weight: 600;
  font-size: 14px;
}

.quick-sub {
  color: var(--muted);
  font-size: 12px;
}

.fav-btn {
  margin-left: auto;
  border: none;
  background: rgba(12, 18, 32, 0.7);
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  cursor: pointer;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.fav-btn.active {
  color: #f7b04c;
}

.player-card, .list-card, .epg-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
}


#playerCard {
  position: relative;
  overflow: hidden;
  background: var(--panel-strong);
}

#playerCard::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--backdrop);
  background-size: cover;
  background-position: center;
  filter: blur(20px);
  opacity: 0.35;
  transform: scale(1.1);
}

#playerCard::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.2), rgba(7, 10, 18, 0.85));
}

.player-card video {
  width: 100%;
  height: clamp(200px, 45vh, 420px);
  aspect-ratio: 16 / 9;
  background: black;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

.player-meta {
  margin-top: 12px;
  position: relative;
  z-index: 1;
}

.player-note {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(230, 235, 255, 0.65);
}

.now {
  font-weight: 600;
}

.info {
  color: rgba(230, 235, 255, 0.6);
  font-size: 13px;
}

.section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(230, 235, 255, 0.45);
  margin-bottom: 10px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.list-actions button {
  font-weight: 700;
}

.catchup-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.list-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.list-actions .ghost {
  white-space: nowrap;
}

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

.episodes-nav {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
  grid-column: 1 / -1;
}

.list[data-view="grid"] {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.list[data-view="rails"] {
  display: grid;
  gap: 20px;
}

.list[data-view="tiles"] {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.list-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.item-row .fav-btn {
  margin-left: auto;
}

.tile {
  background: rgba(12, 18, 32, 0.92);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 12px;
  cursor: pointer;
  position: relative;
  min-height: 150px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.rail {
  display: grid;
  gap: 10px;
}

.rail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.rail-title {
  color: #eef2ff;
}

.rail-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 190px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.rail-card {
  background: rgba(12, 18, 32, 0.92);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rail-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(5, 10, 20, 0.45);
}

.rail-thumb {
  width: 100%;
  height: 220px;
  background: rgba(255, 255, 255, 0.05);
}

.rail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rail-meta {
  padding: 10px;
  display: grid;
  gap: 6px;
}

.rail-name {
  font-weight: 600;
}

.rail-sub {
  color: var(--muted);
  font-size: 12px;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 125, 255, 0.4);
  box-shadow: 0 18px 40px rgba(5, 10, 20, 0.5);
}

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

.tile-logo {
  width: 88px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.tile-meta {
  display: grid;
  gap: 4px;
}

.tile-title {
  font-weight: 700;
  font-size: 15px;
}

.tile-sub {
  color: var(--muted);
  font-size: 12px;
}

.tile-epg {
  display: grid;
  gap: 8px;
}

.tile-epg-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.tile-epg-row.muted {
  opacity: 0.7;
}

.tile-epg-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-epg-time {
  color: var(--muted);
  font-size: 11px;
}

.tile-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(243, 109, 61, 0.14);
  border: 1px solid rgba(243, 109, 61, 0.5);
  color: #f7b04c;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(74, 125, 255, 0.2);
  border: 1px solid rgba(74, 125, 255, 0.5);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pill.ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--muted);
}

.item-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.item-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.item-icon.logo {
  width: 78px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.06);
}

.item-icon.placeholder {
  background: rgba(255, 255, 255, 0.05);
}

.item-text {
  display: grid;
  gap: 4px;
}

.list-item:hover {
  background: rgba(74, 125, 255, 0.2);
  border-color: rgba(74, 125, 255, 0.35);
}

.list[data-view="grid"] .list-item {
  padding: 0;
  overflow: hidden;
  background: rgba(12, 18, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.list[data-view="grid"] .item-row {
  flex-direction: column;
  align-items: stretch;
}

.list[data-view="grid"] .item-icon {
  width: 100%;
  height: 220px;
  border-radius: 0;
}

.list[data-view="grid"] .item-text {
  padding: 10px;
}

.list[data-view="grid"] .item-text strong {
  font-size: 14px;
}

.list[data-view="grid"] .list-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.list[data-view="grid"] .list-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(5, 10, 20, 0.6);
}

.list-item small {
  color: rgba(230, 235, 255, 0.6);
}
.list-item.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.season-header {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(230, 235, 255, 0.45);
  padding: 8px 4px 2px;
  grid-column: 1 / -1;
}


.epg-item {
  display: grid;
  gap: 10px;
}

.epg-text {
  display: grid;
  gap: 6px;
}

.epg-text strong {
  font-size: 16px;
}

.epg-text small {
  font-size: 13px;
}

.epg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 60px;
}

.epg-summary {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}

.epg-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.badge.live {
  background: var(--accent);
  color: #0b0f1a;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
}

.epg-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.epg-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f7b04c);
}

.detail-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: start;
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
}

.detail-card img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
}

.detail-sub {
  color: var(--muted);
  margin-top: 4px;
}

.detail-desc {
  margin-top: 8px;
  color: rgba(230, 235, 255, 0.7);
  font-size: 13px;
}

#seriesBack {
  margin-top: 10px;
  width: fit-content;
}


.detail-warning {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.18);
  border: 1px solid rgba(255, 107, 107, 0.55);
  color: #ffb3b3;
  font-weight: 600;
  font-size: 13px;
}

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 11px;
}

.epg-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.epg-actions button {
  background: rgba(243, 109, 61, 0.12);
  border: 1px solid rgba(243, 109, 61, 0.7);
  color: #f7b04c;
}

.dashboard.epg-only .player-card,
.dashboard.epg-only .detail-card,
.dashboard.epg-only .list-card,
.dashboard.epg-only .epg-card {
  display: none;
}

.epg-grid-card {
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
}

.epg-grid-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.epg-grid-controls {
  display: flex;
  gap: 8px;
}

.epg-grid-wrapper {
  max-height: 60vh;
  overflow: auto;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.epg-grid {
  display: grid;
  gap: 12px;
  min-width: 900px;
}

.epg-grid-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(12, 18, 32, 0.95);
  padding-bottom: 8px;
}

.epg-grid-times {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.epg-grid-time {
  text-align: center;
}

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

.epg-grid-channel {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  position: sticky;
  left: 0;
  background: rgba(12, 18, 32, 0.98);
  z-index: 1;
  padding-right: 8px;
}

.epg-grid-channel img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.epg-grid-track {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  height: 84px;
  overflow: hidden;
}

.epg-grid-program {
  position: absolute;
  top: 10px;
  bottom: 10px;
  background: rgba(88, 132, 255, 0.35);
  border: 1px solid rgba(120, 160, 255, 0.65);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #eef2ff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  position: absolute;
}

.epg-grid-program.is-live {
  background: rgba(243, 109, 61, 0.28);
  border-color: rgba(243, 109, 61, 0.7);
  box-shadow: 0 0 0 1px rgba(243, 109, 61, 0.4), 0 10px 22px rgba(243, 109, 61, 0.2);
}

.epg-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(243, 109, 61, 0.2);
  border: 1px solid rgba(243, 109, 61, 0.6);
  color: #f7b04c;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 720px) {
  .epg-grid-wrapper {
    max-height: 70vh;
  }

  .epg-grid-header,
  .epg-grid-row {
    grid-template-columns: 84px 1fr;
  }

  .epg-grid-channel {
    font-size: 11px;
  }

  .epg-grid-program {
    padding: 8px 10px;
    font-size: 12px;
  }

  .epg-grid-program-title {
    font-size: 12px;
  }

  .epg-grid-program-time {
    font-size: 11px;
  }

  .epg-grid-track {
    height: 72px;
  }
}

.epg-grid-program-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.epg-grid-program-time {
  color: rgba(238, 242, 255, 0.75);
  font-size: 12px;
}

.dashboard.epg-mode .main {
  grid-template-rows: auto auto 1fr;
}

.dashboard.epg-mode .player-card {
  order: 1;
}

.dashboard.epg-mode .epg-card {
  order: 2;
  border-color: rgba(243, 109, 61, 0.35);
  box-shadow: 0 18px 40px rgba(7, 10, 18, 0.45);
}

.dashboard.epg-mode .list-card {
  order: 3;
}

.dashboard.epg-mode .epg-card .list-item {
  padding: 14px;
  background: rgba(12, 18, 32, 0.98);
}

.hidden {
  display: none !important;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 20;
}

.loading-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px 28px;
  border-radius: 16px;
  min-width: 320px;
  text-align: center;
}

.loading-title {
  font-size: 18px;
  font-weight: 700;
}

.loading-sub {
  color: var(--muted);
  margin-top: 8px;
  font-size: 13px;
}

.loading-bar {
  margin-top: 16px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.loading-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.3s ease;
}

@media (max-width: 960px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .player-card video {
    height: clamp(200px, 38vh, 320px);
  }

  .detail-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 16px;
  }

  main.content {
    padding: 16px;
  }

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

  .top-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .tabs {
    flex-wrap: wrap;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .options {
    width: 100%;
  }

  .options input,
  .options select {
    width: 100%;
  }

  .search {
    font-size: 16px;
  }

  .search-wrap {
    width: 100%;
  }

  .quick-rail-track {
    grid-auto-columns: minmax(140px, 165px);
  }

  .hero-text h2 {
    font-size: 24px;
  }

  .epg-grid-header,
  .epg-grid-row {
    grid-template-columns: 120px 1fr;
  }

  .sidebar {
    max-height: 40vh;
  }

  .player-card video {
    height: clamp(180px, 32vh, 240px);
  }

  .list-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .list-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 18px;
  }

  button {
    width: 100%;
  }

  .tabs button {
    flex: 1 1 45%;
  }

  .player-card video {
    height: 180px;
  }
}
.tile .fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  margin-left: 0;
}
