.tv-live-hint {
  display: inline-block;
  color: #fb7185;
  font-size: 11px;
  vertical-align: middle;
  margin-left: 8px;
  animation: tv-pulse 1.6s ease-in-out infinite;
}

@keyframes tv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}

.tv-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.tv-search-wrap {
  flex: 1;
  min-width: 240px;
  max-width: 380px;
  position: relative;
}

.tv-search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-15);
  font-family: var(--font-ui);
}

.tv-search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.tv-search-wrap::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  transform: translateY(-60%);
  pointer-events: none;
}

.tv-search-wrap::after {
  content: "";
  position: absolute;
  left: 24px;
  top: 50%;
  width: 7px;
  height: 2px;
  background: var(--muted);
  transform: rotate(45deg) translate(3px, -2px);
  pointer-events: none;
}

#tv-country-pills {
  margin: 0;
}

.tv-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: var(--fs-14, 14px);
  font-weight: 600;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s, transform .15s;
}

.tv-pill:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.tv-pill.active {
  border-color: transparent;
  background: var(--gradient);
  color: #fff;
}

.tv-pill .tv-pill__count {
  font-size: var(--fs-12);
  opacity: .75;
  font-weight: 400;
}

.tv-sec {
  margin-bottom: 30px;
}

.tv-sec__head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: none;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}

.tv-sec__head:hover .tv-sec__title {
  color: var(--accent-2);
}

.tv-sec__title {
  font-size: var(--fs-24);
  font-weight: 700;
  letter-spacing: var(--tr-tight);
  transition: color .15s;
  font-family: var(--font-ui);
}

.tv-sec__sub {
  color: var(--muted);
  font-size: var(--fs-13);
  font-weight: 500;
  margin-right: auto;
}

.tv-sec__chev {
  display: inline-flex;
  color: var(--muted);
  transition: transform .2s;
  flex-shrink: 0;
}

.tv-sec.open .tv-sec__chev {
  transform: rotate(180deg);
}

.tv-sec__hint {
  color: var(--muted);
  font-size: var(--fs-12);
  margin-right: auto;
  font-family: var(--font-ui);
}

.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.tv-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s, border-color .15s, background .15s, box-shadow .15s;
}

.tv-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--surface-2);
  box-shadow: var(--glow);
}

.tv-tile__logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, .92);
  padding: 5px;
}

.tv-tile__logo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(139, 92, 246, .16);
}

.tv-tile__name {
  font-size: var(--fs-14, 14px);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  color: var(--text);
  margin-top: auto;
  font-family: var(--font-ui);
}

.tv-tile__live {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  color: #fff;
  background: #e11d48;
  border-radius: 6px;
  padding: 2px 6px;
  text-transform: uppercase;
}

.tv-tile__cat {
  font-size: var(--fs-12);
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: var(--font-ui);
}

.tv-empty {
  color: var(--muted);
  padding: 30px 0;
  text-align: center;
  font-family: var(--font-ui);
}

.tv-loadmore {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

/* ---------- Player overlay ---------- */
.tv-player {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #000;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.tv-player[hidden] {
  display: none;
}

.tv-player__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(12, 12, 16, .96);
  border-bottom: 1px solid var(--border);
}

.tv-player__bar img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, .92);
  padding: 3px;
}

.tv-player__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tv-player__meta b {
  color: var(--text);
  font-size: var(--fs-16);
  font-family: var(--font-ui);
}

.tv-player__meta span {
  color: var(--muted);
  font-size: var(--fs-12);
  font-family: var(--font-ui);
}

.tv-player__actions {
  display: flex;
  gap: 8px;
}

.tv-player__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, color .15s, transform .15s;
}

.tv-player__btn:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.tv-player__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #000;
}

.tv-player__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.tv-player__hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  background: rgba(17, 17, 22, .9);
  color: var(--muted);
  font-size: var(--fs-13);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: var(--font-ui);
  white-space: nowrap;
}

.tv-player__hint.hidden {
  display: none;
}

.tv-player__src {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(12, 12, 16, .96);
  border-top: 1px solid var(--border);
}

.tv-player__src .tv-pill.active {
  background: var(--gradient);
}

@media (max-width: 720px) {
  .tv-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 10px;
  }
  .tv-tile {
    padding: 12px 8px;
  }
  .tv-search-wrap {
    max-width: none;
  }
  .tv-player__bar {
    padding: 8px 12px;
  }
}