
/* =========================================================
   CHANNELS PAGE – ctv-ch-* components
   ========================================================= */

/* ── Hero ──────────────────────────────────────────────── */
.ctv-channels-page { padding-top: 5rem; }

.ctv-ch-hero {
  position: relative;
  overflow: hidden;
  background: hsl(220,25%,8%);
  padding: 5rem 0 4rem;
}

.ctv-ch-hero__bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.ctv-ch-hero__glow-left {
  position: absolute; top: 0; left: 0;
  width: 50%; height: 100%;
  background: radial-gradient(ellipse at top left, rgba(124,58,237,0.18), transparent 60%);
}
.ctv-ch-hero__glow-right {
  position: absolute; bottom: 0; right: 0;
  width: 40%; height: 70%;
  background: radial-gradient(ellipse at bottom right, rgba(236,72,153,0.12), transparent 60%);
}

.ctv-ch-hero__inner {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 56rem;
  margin: 0 auto;
}

.ctv-ch-hero__title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.1;
}

.ctv-ch-hero__subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.6);
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.ctv-ch-hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* Stats row inside hero */
.ctv-ch-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin: 2.5rem 0 0;
}

.ctv-ch-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 7rem;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  transition: var(--tm-transition);
}
.ctv-ch-stat:hover {
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.3);
}

.ctv-ch-stat__num {
  font-family: var(--tm-font-display);
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--tm-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.ctv-ch-stat__label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.25rem;
  text-align: center;
}

/* ── Marquee section ─────────────────────────────────── */
.ctv-ch-marquee-section {
  background: hsl(220,25%,10%);
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.ctv-ch-marquee-label {
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1rem;
}

.ctv-ch-marquee-wrap {
  position: relative;
  overflow: hidden;
}
.ctv-ch-marquee-wrap::before,
.ctv-ch-marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 6rem;
  z-index: 2;
  pointer-events: none;
}
.ctv-ch-marquee-wrap::before { left: 0; background: linear-gradient(to right, hsl(220,25%,10%), transparent); }
.ctv-ch-marquee-wrap::after  { right: 0; background: linear-gradient(to left, hsl(220,25%,10%), transparent); }

.ctv-ch-marquee-track {
  display: flex;
  width: max-content;
}
.ctv-ch-marquee-fwd { animation: tm-marquee-fwd 35s linear infinite; }

/* ── Filter tabs ─────────────────────────────────────── */
.ctv-ch-grid-section { background: var(--tm-bg); }

.ctv-ch-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.ctv-ch-filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 99px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--tm-font-display);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  transition: var(--tm-transition);
}
.ctv-ch-filter-btn:hover {
  color: #fff;
  background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.3);
}
.ctv-ch-filter-btn.is-active {
  background: linear-gradient(135deg, hsl(250,85%,60%), hsl(280,75%,55%));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,0.35);
}

/* ── Search box ───────────────────────────────────────── */
.ctv-ch-search {
  max-width: 36rem;
  margin: 0 auto 2.5rem;
}
.ctv-ch-search__inner {
  position: relative;
  display: flex;
  align-items: center;
}
.ctv-ch-search__icon {
  position: absolute;
  left: 1rem;
  width: 1.125rem;
  height: 1.125rem;
  color: rgba(255,255,255,0.35);
  pointer-events: none;
  flex-shrink: 0;
}
.ctv-ch-search__input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 3rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.875rem;
  color: #fff;
  font-family: var(--tm-font-body);
  font-size: 0.9375rem;
  outline: none;
  transition: var(--tm-transition);
}
.ctv-ch-search__input::placeholder { color: rgba(255,255,255,0.3); }
.ctv-ch-search__input:focus {
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.07);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}
.ctv-ch-search__clear {
  position: absolute;
  right: 1rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: var(--tm-transition);
}
.ctv-ch-search__clear:hover { color: rgba(255,255,255,0.8); }

/* ── Country Card Grid ────────────────────────────────── */
.ctv-ch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}

.ctv-country-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 0.875rem;
  transition: var(--tm-transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.ctv-country-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.08), transparent);
  opacity: 0;
  transition: var(--tm-transition);
}
.ctv-country-card:hover {
  border-color: rgba(124,58,237,0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.ctv-country-card:hover::before { opacity: 1; }

.ctv-country-card.is-hidden { display: none; }

.ctv-country-card__flag {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.ctv-country-card__body { flex: 1; min-width: 0; }
.ctv-country-card__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.125rem;
}
.ctv-country-card__count {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}

/* Quality badges */
.ctv-badge {
  flex-shrink: 0;
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ctv-badge--4k {
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  color: #c4b5fd;
}
.ctv-badge--hd {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.3);
  color: #6ee7b7;
}

/* No results */
.ctv-ch-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(255,255,255,0.4);
}
.ctv-ch-no-results span { font-size: 3rem; display: block; margin-bottom: 1rem; }
.ctv-ch-no-results p { margin-bottom: 1.5rem; font-size: 1rem; }
.ctv-ch-no-results strong { color: rgba(255,255,255,0.7); }

.ctv-ch-count {
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.35);
}
.ctv-ch-count strong { color: rgba(255,255,255,0.6); }

/* ── Channel Categories Showcase ─────────────────────── */
.ctv-ch-categories-section { background: hsl(220,25%,8%); }

.ctv-ch-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
}

.ctv-cat-card {
  padding: 1.75rem 1.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1.25rem;
  transition: var(--tm-transition);
  position: relative;
  overflow: hidden;
}
.ctv-cat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, #7c3aed);
  border-radius: 1.25rem 1.25rem 0 0;
  opacity: 0;
  transition: var(--tm-transition);
}
.ctv-cat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.ctv-cat-card:hover::after { opacity: 1; }

.ctv-cat-card__icon {
  font-size: 2.25rem;
  margin-bottom: 0.875rem;
  display: block;
  line-height: 1;
}
.ctv-cat-card__name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}
.ctv-cat-card__desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.ctv-cat-card__count {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* ── Device compatibility grid ───────────────────────── */
.ctv-ch-devices-section {
  background: linear-gradient(180deg, hsl(230,25%,10%) 0%, hsl(220,25%,8%) 100%);
}

.ctv-ch-devices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1rem;
  max-width: 56rem;
  margin: 0 auto 2rem;
}

.ctv-device-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 1.5rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  transition: var(--tm-transition);
  text-align: center;
}
.ctv-device-card:hover {
  background: rgba(124,58,237,0.08);
  border-color: rgba(124,58,237,0.25);
  transform: translateY(-3px);
}

.ctv-device-card__icon {
  font-size: 2rem;
  line-height: 1;
}
.ctv-device-card__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  line-height: 1.3;
}

.ctv-ch-compat-note {
  text-align: center;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.45);
  max-width: 44rem;
  margin: 0 auto;
  line-height: 1.7;
}
.ctv-ch-compat-note strong { color: rgba(255,255,255,0.75); }

/* ── Bottom CTA card ─────────────────────────────────── */
.ctv-ch-cta-section {
  background: linear-gradient(135deg, hsl(270,30%,12%) 0%, hsl(240,30%,10%) 50%, hsl(270,30%,12%) 100%);
}

.ctv-ch-cta-card {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2rem;
  padding: 3.5rem 2.5rem;
  box-shadow: 0 8px 60px rgba(124,58,237,0.15);
  position: relative;
  overflow: hidden;
}

.ctv-ch-cta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--tm-gradient-primary);
}

.ctv-ch-cta-card__icon {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, #7c3aed, #9333ea, #ec4899);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 24px rgba(124,58,237,0.35);
}
.ctv-ch-cta-card__icon svg { width: 1.75rem; height: 1.75rem; color: #fff; }

.ctv-ch-cta-card__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 1rem;
}
.ctv-ch-cta-card__desc {
  color: rgba(255,255,255,0.55);
  max-width: 32rem;
  margin: 0 auto 2rem;
  line-height: 1.7;
  font-size: 1rem;
}
.ctv-ch-cta-card__btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .ctv-ch-hero { padding: 4rem 0 3rem; }
  .ctv-ch-stats { gap: 0.5rem; }
  .ctv-ch-stat { min-width: 6rem; padding: 0.75rem 1rem; }
  .ctv-ch-stat__num { font-size: 1.4rem; }
  .ctv-ch-grid { grid-template-columns: 1fr 1fr; gap: 0.625rem; }
  .ctv-country-card { padding: 0.75rem; gap: 0.625rem; }
  .ctv-country-card__flag { font-size: 1.5rem; }
  .ctv-ch-cats-grid { grid-template-columns: 1fr 1fr; }
  .ctv-ch-devices-grid { grid-template-columns: repeat(4, 1fr); }
  .ctv-ch-cta-card { padding: 2.5rem 1.5rem; border-radius: 1.5rem; }
}

@media (max-width: 480px) {
  .ctv-ch-grid { grid-template-columns: 1fr; }
  .ctv-ch-cats-grid { grid-template-columns: 1fr; }
  .ctv-ch-devices-grid { grid-template-columns: repeat(3, 1fr); }
  .ctv-ch-filters { gap: 0.375rem; }
  .ctv-ch-filter-btn { padding: 0.4rem 0.875rem; font-size: 0.8125rem; }
}
