@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --surface: #191e28;
  --surface2: #212733;
  --text: #e5e8ed;
  --muted: #a0a5b0;
  --line: #282e39;
  --accent: #69ade3;
  --primary: #72b5e9;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
video:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:hover {
  color: #fff;
  background-color: #1b222e;
}
h1,
h2,
p {
  margin: 0;
}
h1,
h2 {
  line-height: 1.35;
  font-weight: 650;
}
h1 {
  font-size: 27px;
}
h2 {
  font-size: 25px;
}
[hidden] {
  display: none !important;
}
img {
  display: block;
}
.skip-link {
  position: fixed;
  top: -70px;
  left: 16px;
  z-index: 50;
  background: var(--primary);
  color: #081526;
  padding: 10px;
}
.skip-link:focus {
  top: 8px;
}
.header {
  height: 80px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 10px 30px;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  font-size: 29px;
  font-weight: 700;
}
.brand img {
  object-fit: contain;
  width: 48px;
  height: 48px;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
  width: 72%;
  min-width: 0;
}
.main-nav button {
  font-size: 22px;
  color: #a5a8b1;
  min-width: 82px;
  padding: 11px 20px;
  border-radius: 16px;
  white-space: nowrap;
}
.main-nav button:last-child {
  margin-left: auto;
}
.main-nav button.active,
.category-nav button.active {
  background: #1d222c;
  color: var(--accent);
  font-weight: 650;
}
.category-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 30px 14px;
  background: var(--bg);
  position: sticky;
  top: 80px;
  z-index: 9;
  overflow-x: auto;
  scrollbar-width: none;
  scrollbar-color: #333b49 transparent;
}
.category-nav button {
  font-size: 21px;
  padding: 10px 22px;
  border-radius: 16px;
  color: #aaaeb7;
  white-space: nowrap;
  flex: none;
}
main {
  padding: 12px 32px 35px;
  min-height: 68vh;
  max-width: 1800px;
  margin: auto;
}
main:focus {
  outline: none;
}
.collection {
  margin: 0 0 32px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}
.section-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}
.text-button {
  font-size: 17px;
  color: var(--muted);
  padding: 6px;
  white-space: nowrap;
}
.empty-line {
  font-size: 16px;
  color: #888f9e;
  padding: 10px 0 16px;
}
.poster-rail {
  display: grid;
  grid-template-columns: repeat(var(--poster-count, 5), minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 22px;
  overflow: visible;
  scrollbar-width: none;
  scrollbar-color: #343a46 transparent;
  padding: 2px 1px 10px;
}
.poster-card {
  text-align: left;
  min-width: 0;
  padding: 0;
  scroll-snap-align: start;
  background: transparent;
}
.poster-card:hover {
  background: transparent;
}
.poster-card:hover .poster {
  outline: 2px solid #71a6d0;
}
.poster {
  position: relative;
  display: block;
  aspect-ratio: 2/2.65;
  background: #181c25;
  border-radius: 3px;
  overflow: hidden;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-fallback {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #7a8598;
  font-size: 32px;
}
.poster-shade {
  position: absolute;
  inset: 75% 0 0;
  background: linear-gradient(transparent, #0009);
  pointer-events: none;
}
.poster-note {
  position: absolute;
  bottom: 7px;
  right: 8px;
  font-size: 12px;
  color: #fff;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  font-size: 19px;
  font-weight: 500;
  margin-top: 9px;
  min-height: 26px;
}
.card-meta {
  display: block;
  color: #a3a8b3;
  font-size: 13px;
  margin-top: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  height: 4px;
  background: #4b4d58;
}
.progress i {
  display: block;
  height: 100%;
  background: #bbb9ca;
}
.poster-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 26px 22px;
}
.image-failed {
  visibility: hidden;
}
.results-label {
  font-size: 13px;
  color: #8c95a5;
  margin: 13px 0 18px;
}
.page-heading {
  margin: 10px 0 22px;
}
.page-heading h1 {
  font-size: 27px;
}
.page-heading p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 7px;
}
.filter-bar {
  margin: 0 0 15px;
  padding: 0 0 8px;
}
.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 5px 0;
  min-width: 0;
}
.filter-row > span {
  width: 48px;
  flex: none;
  padding: 7px 0;
  color: #858e9e;
  font-size: 15px;
}
.filter-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  overflow: visible;
  min-width: 0;
  scrollbar-width: none;
  scrollbar-color: #343c4b transparent;
  padding: 0 3px 5px;
}
.filter-options button {
  padding: 6px 13px;
  border-radius: 9px;
  white-space: nowrap;
  font-size: 15px;
  color: #b3bac8;
  flex: none;
}
.filter-options button.active {
  background: #202b3d;
  color: #8ac5f1;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  min-height: 42px;
  font-size: 14px;
  white-space: nowrap;
}
.button.primary {
  background: var(--primary);
  color: #0b1b2d;
  font-weight: 650;
}
.button.secondary {
  border: 1px solid #3a4353;
  background: #212936;
  color: #d2d9e3;
}
.button.secondary:hover {
  background: #2a3545;
}
.load-more {
  display: flex;
  margin: 28px auto 0;
}
.search-dock {
  padding: 15px 32px 0;
  max-width: 1800px;
  margin: auto;
}
.search-form {
  display: flex;
  gap: 12px;
  max-width: 760px;
}
.search-form input {
  background: #191f2a;
  color: var(--text);
  border: 1px solid #3a4659;
  border-radius: 8px;
  min-width: 0;
  flex: 1;
  padding: 13px 17px;
  font-size: 17px;
}
.search-form button {
  background: #23334a;
  color: #91c3ec;
  border-radius: 8px;
  padding: 10px 27px;
  flex: none;
  font-size: 17px;
}
.search-history {
  margin: 12px 0 25px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search-history h2 {
  font-size: 19px;
  margin-right: 12px;
}
.search-history button {
  background: #1e2634;
  color: #b6c1d3;
  border-radius: 7px;
  padding: 7px 13px;
  font-size: 14px;
}
.settings-layout,
.live-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}
.settings-groups,
.live-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: start;
}
.settings-groups button,
.live-groups button {
  text-align: left;
  color: #a6afbd;
  padding: 12px 18px;
  font-size: 17px;
  border-radius: 9px;
}
.settings-groups button.active,
.live-groups button.active {
  background: #202c3d;
  color: #91c6f0;
}
.settings-list {
  padding: 8px 25px;
  max-width: 900px;
}
.settings-list h2 {
  font-size: 22px;
  margin-bottom: 18px;
}
.settings-list p {
  font-size: 14px;
  color: var(--muted);
  margin: 17px 0;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid #202733;
  font-size: 16px;
}
.setting-row span + span {
  color: #a6b1c3;
  text-align: right;
}
.setting-row select {
  border: 1px solid #414d60;
  color: #dce5f2;
  background: #202a38;
  border-radius: 6px;
  padding: 7px 15px;
}
.setting-row input[type="checkbox"] {
  width: 21px;
  height: 21px;
  accent-color: var(--accent);
}
.setting-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.danger {
  color: #dda0a0;
}
.live-groups {
  max-height: 68vh;
  overflow-y: auto;
  scrollbar-width: none;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.channel-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 1px 9px;
  background: #161c27;
  border: 1px solid #30394a;
  border-radius: 7px;
  min-height: 72px;
  padding: 12px;
  text-align: left;
}
.channel-card:hover {
  background: #21314a;
  border-color: #77aada;
}
.channel-number {
  grid-row: 1/3;
  font-size: 13px;
  color: #758197;
  align-self: center;
}
.channel-card strong {
  font-size: 16px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.channel-card span:last-child {
  font-size: 11px;
  color: #8c9ab0;
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #596273;
  font-size: 11px;
  padding: 15px 32px 26px;
}
.empty-state {
  padding: 55px 10px;
  color: #9aa4b4;
  text-align: center;
}
.empty-state > span {
  font-size: 22px;
}
.empty-state p {
  margin: 13px auto;
  max-width: 520px;
  font-size: 14px;
}
.initial-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40vh;
  color: #9aa6bb;
}
.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #33435c;
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error {
  color: #e7b39c;
}
.eyebrow {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
@media (max-width: 1050px) {
  .header {
    padding: 10px 24px;
    gap: 25px;
  }
  .brand {
    font-size: 26px;
  }
  .brand img {
    width: 44px;
    height: 44px;
  }
  .main-nav {
    width: 76%;
    gap: 10px;
  }
  .main-nav button {
    font-size: 19px;
    padding: 10px 16px;
    min-width: 65px;
  }
  .category-nav {
    padding-left: 24px;
    gap: 8px;
  }
  .category-nav button {
    font-size: 18px;
    padding: 10px 19px;
  }
  main {
    padding-left: 24px;
    padding-right: 24px;
  }
  .poster-rail {
    gap: 18px;
  }
  .poster-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 25px 18px;
  }
  .card-title {
    font-size: 17px;
  }
  .card-meta {
    font-size: 12px;
  }
  .settings-layout,
  .live-layout {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 18px;
  }
  .channel-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .channel-card strong {
    font-size: 14px;
  }
}
@media (max-width: 700px) {
  .header {
    height: 115px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 8px 16px;
  }
  .brand {
    font-size: 24px;
    gap: 8px;
    height: 43px;
  }
  .brand img {
    width: 40px;
    height: 40px;
  }
  .main-nav {
    width: 100%;
    margin: 0;
    justify-content: space-between;
    gap: 5px;
  }
  .main-nav button {
    min-width: 0;
    padding: 8px 12px;
    font-size: 15px;
    border-radius: 12px;
  }
  .main-nav button:last-child {
    margin-left: 0;
  }
  .category-nav {
    top: 115px;
    padding: 4px 16px 9px;
    gap: 6px;
  }
  .category-nav button {
    font-size: 15px;
    padding: 8px 15px;
    border-radius: 11px;
  }
  main {
    padding: 12px 16px 25px;
  }
  .section-heading {
    margin-bottom: 12px;
  }
  .section-heading h2 {
    font-size: 22px;
  }
  .section-heading p {
    font-size: 11px;
  }
  .text-button {
    font-size: 13px;
  }
  .collection {
    margin-bottom: 25px;
  }
  .empty-line {
    font-size: 13px;
    padding: 6px 0 12px;
  }
  .poster-rail {
    gap: 12px;
  }
  .poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 12px;
  }
  .card-title {
    font-size: 13px;
    line-height: 1.4;
    min-height: 19px;
    margin-top: 7px;
  }
  .card-meta {
    font-size: 10px;
    margin-top: 4px;
  }
  .poster-note {
    font-size: 9px;
    right: 5px;
    bottom: 5px;
  }
  .page-heading {
    margin: 8px 0 18px;
  }
  .page-heading h1 {
    font-size: 23px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .filter-row {
    gap: 8px;
    padding: 4px 0;
  }
  .filter-row > span {
    width: 34px;
    font-size: 12px;
    padding: 6px 0;
  }
  .filter-options {
    gap: 5px;
  }
  .filter-options button {
    font-size: 12px;
    padding: 6px 10px;
  }
  .results-label {
    font-size: 11px;
    margin: 10px 0 16px;
  }
  .search-dock {
    padding: 15px 16px 0;
  }
  .search-form {
    gap: 9px;
  }
  .search-form input {
    font-size: 14px;
    padding: 11px 12px;
  }
  .search-form button {
    font-size: 14px;
    padding: 9px 18px;
  }
  .search-history h2 {
    font-size: 17px;
  }
  .search-history button {
    font-size: 12px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .settings-groups {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 5px;
  }
  .settings-groups button {
    white-space: nowrap;
    padding: 8px 13px;
    font-size: 14px;
  }
  .settings-list {
    padding: 5px;
  }
  .settings-list h2 {
    font-size: 20px;
  }
  .settings-list p {
    font-size: 12px;
  }
  .setting-row {
    font-size: 13px;
    padding: 13px 0;
  }
  .setting-row span + span {
    font-size: 12px;
    max-width: 62%;
  }
  .setting-buttons .button {
    font-size: 12px;
  }
  .live-layout {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 12px;
  }
  .live-groups button {
    font-size: 12px;
    padding: 10px 8px;
  }
  .channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .channel-card {
    grid-template-columns: 19px minmax(0, 1fr);
    gap: 1px 5px;
    padding: 10px 7px;
    min-height: 65px;
  }
  .channel-number {
    font-size: 10px;
  }
  .channel-card strong {
    font-size: 12px;
  }
  .channel-card span:last-child {
    font-size: 9px;
  }
  .footer {
    padding: 10px 16px 22px;
    font-size: 9px;
  }
  .button {
    font-size: 13px;
    padding: 10px 15px;
  }
  .empty-state p {
    font-size: 12px;
  }
}
@media (max-width: 370px) {
  .main-nav button {
    padding: 8px 10px;
    font-size: 14px;
  }
  .category-nav button {
    font-size: 14px;
    padding: 8px 12px;
  }
  .card-title {
    font-size: 12px;
  }
  .poster-rail {
    gap: 10px;
  }
  .poster-grid {
    gap: 18px 10px;
  }
  .live-layout {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}

/* Hide bars without disabling normal page, gesture or keyboard scrolling. */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
*::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
