

nav a.active-page {
  color: #fff;
}

.tv-page {
  padding-top: 120px;
  min-height: 70vh;
}

.tv-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 24px 8px;
  text-align: center;
}

.tv-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: #ff5b6a;
  background: rgba(255, 60, 80, 0.1);
  border: 1px solid rgba(255, 60, 80, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  text-transform: uppercase;
}
.tv-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3b50;
  box-shadow: 0 0 0 0 rgba(255, 59, 80, 0.7);
  animation: tvPulse 1.6s infinite;
}
@keyframes tvPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 80, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255, 59, 80, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 80, 0); }
}

.tv-hero-title {
  font-family: Outfit, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin: 16px 0 6px;
  color: #fff;
}
.tv-hero-sub {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1rem;
  margin: 0 0 22px;
}

.tv-search-wrap {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.tv-search-icon {
  position: absolute;
  left: 18px;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.tv-search-input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 50px;
  border-radius: 14px;
  border: 1px solid rgba(79, 32, 187, 0.35);
  background: #150c2e80;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 1rem;
  font-family: Outfit, sans-serif;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.tv-search-input::placeholder { color: rgba(255, 255, 255, 0.35); }
.tv-search-input:focus {
  border-color: #4f20bb;
  background: #180e33cc;
  box-shadow: 0 0 0 4px rgba(79, 32, 187, 0.18);
}
.tv-search-clear {
  position: absolute;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.tv-search-clear:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

.tv-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto 26px;
}
.tv-chip {
  font-family: Outfit, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #cfc7e8;
  background: #150c2e80;
  border: 1px solid rgba(79, 32, 187, 0.3);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.tv-chip:hover {
  border-color: #4f20bb;
  color: #fff;
  background: #180e33cc;
}
.tv-chip.active {
  background: #4f20bb;
  border-color: #4f20bb;
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 32, 187, 0.35);
}

.tv-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 34px auto 0;
}
.tv-page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-family: Outfit, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #cfc7e8;
  background: #150c2e80;
  border: 1px solid rgba(79, 32, 187, 0.3);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tv-page-btn:hover:not(:disabled) {
  border-color: #4f20bb;
  color: #fff;
  background: #180e33cc;
}
.tv-page-btn.active {
  background: #4f20bb;
  border-color: #4f20bb;
  color: #fff;
  box-shadow: 0 6px 18px rgba(79, 32, 187, 0.35);
}
.tv-page-btn.nav {
  font-size: 1.2rem;
  line-height: 1;
}
.tv-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.tv-page-ellipsis {
  color: rgba(255, 255, 255, 0.4);
  padding: 0 4px;
  align-self: center;
}

.tv-container {
  max-width: 1400px;
  margin: 30px auto 60px;
  padding: 0 40px;
}

.tv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.tv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 16px 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(130% 80% at 50% -10%, rgba(79, 32, 187, 0.22), transparent 62%),
    linear-gradient(180deg, #191036 0%, #110a24 100%);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.tv-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
}
.tv-card:hover {
  transform: translateY(-5px);
  border-color: rgba(122, 63, 240, 0.6);
  box-shadow: 0 16px 36px rgba(79, 32, 187, 0.34);
}

.tv-card-logo-wrap {
  width: 100%;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.tv-card-logo {
  max-width: 76%;
  max-height: 68%;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.22s ease;
}
.tv-card:hover .tv-card-logo { transform: scale(1.06); }

.tv-card-fallback {
  width: 62px;
  height: 62px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Outfit, sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #4f20bb, #7a3ff0);
  box-shadow: 0 6px 16px rgba(79, 32, 187, 0.4);
}
.tv-card-name {
  font-family: Outfit, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #efeaff;
  text-align: center;
  line-height: 1.25;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tv-card-live {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #ff6b78;
  background: rgba(255, 45, 66, 0.12);
  border: 1px solid rgba(255, 45, 66, 0.3);
  padding: 3px 7px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tv-card-live .tv-live-dot { width: 6px; height: 6px; background: #ff3b50; }

.tv-card.skeleton {
  cursor: default;
  animation: none;
  background: #150c2e;
}
.tv-card.skeleton .tv-card-logo-wrap,
.tv-card.skeleton .tv-card-name {
  background: linear-gradient(90deg, #1e1338 25%, #2a1a4d 50%, #1e1338 75%);
  background-size: 200% 100%;
  animation: tvShimmer 1.3s infinite;
  border-radius: 8px;
}
.tv-card.skeleton .tv-card-name { width: 70%; height: 14px; }
@keyframes tvShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.tv-loader {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: 30px 0;
}
.tv-loader.active { display: flex; }
.tv-loader span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4f20bb;
  animation: tvBounce 1.2s infinite ease-in-out;
}
.tv-loader span:nth-child(2) { animation-delay: 0.15s; }
.tv-loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes tvBounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.tv-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.4);
}
.tv-empty svg { margin-bottom: 14px; }
.tv-empty p { font-size: 1.05rem; margin: 0; }

.tv-sentinel { height: 1px; }

@media (max-width: 768px) {
  .tv-page { padding-top: 80px; }
  .tv-container { padding: 0 16px; }
  .tv-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }
  .tv-card { border-radius: 14px; padding: 14px 10px; gap: 8px; }
  .tv-card-logo-wrap { height: 56px; }
  .tv-card-name { font-size: 0.78rem; }
  .tv-hero { padding: 6px 16px; }
  .tv-pagination { gap: 4px; margin-top: 26px; }
  .tv-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    font-size: 0.82rem;
    border-radius: 9px;
  }
  .tv-page-btn.nav { font-size: 1.05rem; }
}

body.tv-player-body {
  margin: 0;
  background: #000;
  overflow: hidden;
  height: 100dvh;
}

.tvp-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.tvp-reveal {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
}
.tvp-wrap.idle .tvp-reveal {
  pointer-events: auto;
}

.tvp-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 20px;
  background: linear-gradient(to bottom, #000c, #0000);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.tvp-wrap.idle .tvp-header { opacity: 0; transform: translateY(-10px); pointer-events: none; }

.tvp-btn {
  flex-shrink: 0;
  border: none;
  background: none;
  color: #fff;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.tvp-btn:hover { background: #ffffff1a; }
.tvp-btn svg { width: 22px; height: 22px; }

.tvp-btn-labeled { gap: 6px; padding: 8px 12px; }
.tvp-btn-labeled span {
  font-family: Outfit, sans-serif;
  font-size: 13px;
  font-weight: 500;
}

.tvp-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.tvp-title-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  flex-shrink: 0;
}
.tvp-title-text { min-width: 0; }
.tvp-channel-name {
  font-family: Outfit, sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tvp-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #ff5b6a;
  text-transform: uppercase;
}

.tvp-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.tvp-stage {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tvp-stage iframe,
.tvp-stage video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.tvp-stage video { object-fit: contain; }

.tvp-loading {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #05030c;
  color: #fff;
}
.tvp-loading.hidden { display: none; }
.tvp-spinner {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-top-color: #6a34e0;
  animation: tvpSpin 0.9s linear infinite;
}
@keyframes tvpSpin { to { transform: rotate(360deg); } }
.tvp-loading-text { font-family: Outfit, sans-serif; color: rgba(255, 255, 255, 0.6); }
.tvp-loading-text b { color: #fff; }

.tvp-error {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #05030c;
  color: #fff;
  text-align: center;
  padding: 24px;
}
.tvp-error.show { display: flex; }
.tvp-error svg { color: #ff5b6a; }
.tvp-error p { color: rgba(255,255,255,0.65); max-width: 420px; margin: 0; }
.tvp-retry {
  margin-top: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: #4f20bb;
  color: #fff;
  font-family: Outfit, sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.tvp-retry:hover { background: #6a34e0; }

.tvp-channels {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  max-width: 86vw;
  z-index: 40;
  background: #0a0516f2;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(79, 32, 187, 0.3);
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.tvp-channels.open { transform: translateX(0); }
.tvp-channels-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.tvp-channels-head h3 {
  font-family: Outfit, sans-serif;
  font-size: 1.05rem;
  color: #fff;
  margin: 0;
}
.tvp-channels-search {
  margin: 12px 16px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(79, 32, 187, 0.35);
  background: #150c2e80;
  color: #fff;
  padding: 0 14px;
  font-family: Outfit, sans-serif;
  outline: none;
  flex-shrink: 0;
}
.tvp-channels-search:focus { border-color: #4f20bb; }
.tvp-channels-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 20px;
  scrollbar-width: thin;
  scrollbar-color: #4f20bb99 transparent;
  scroll-behavior: smooth;
}
.tvp-channels-list::-webkit-scrollbar { width: 8px; }
.tvp-channels-list::-webkit-scrollbar-track { background: transparent; margin: 4px 0; }
.tvp-channels-list::-webkit-scrollbar-thumb {
  background: linear-gradient(#5a2ecc, #4f20bb);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.tvp-channels-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#6a3ce0, #5a2ecc);
  background-clip: padding-box;
}
.tvp-channel-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s ease;
  content-visibility: auto;
  contain-intrinsic-size: 60px;
}
.tvp-channel-item:hover { background: rgba(255, 255, 255, 0.06); }
.tvp-channel-item.active {
  background: rgba(79, 32, 187, 0.32);
  border: 1px solid rgba(79, 32, 187, 0.6);
}
.tvp-channel-item img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  flex-shrink: 0;
}
.tvp-channel-item .tvp-ci-fallback {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Outfit, sans-serif;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #4f20bb, #7a3ff0);
  flex-shrink: 0;
}
.tvp-channel-item span {
  font-family: Outfit, sans-serif;
  font-size: 0.9rem;
  color: #e9e4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tvp-channels-overlay {
  position: absolute;
  inset: 0;
  z-index: 35;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.tvp-channels-overlay.show { opacity: 1; pointer-events: auto; }

@media (max-width: 600px) {
  .tvp-btn { width: 40px; height: 40px; }
  .tvp-title-logo { width: 36px; height: 36px; }
  .tvp-channel-name { font-size: 0.95rem; }
}
