.live-view {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 36px 80px;
}

.live-heading {
  padding: 16px 4px 28px;
}

.live-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
}

.live-sub {
  font-size: 14px;
  color: var(--text2);
}

.live-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.live-cat-btn {
  padding: 6px 16px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text2);
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-cat-btn:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.live-cat-btn:focus-visible,
.ch-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.live-cat-btn.active {
  background: var(--accent);
  color: #0c0e0d;
  font-weight: 600;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(150, 167, 141, 0.3);
}

.live-cat-btn.cat-sports.active {
  background: #e63946;
  color: #fff;
  border-color: #e63946;
  box-shadow: 0 2px 8px rgba(230, 57, 70, 0.4);
}

.live-cat-btn.cat-news.active {
  background: #4a90d9;
  color: #fff;
  border-color: #4a90d9;
  box-shadow: 0 2px 8px rgba(74, 144, 217, 0.4);
}

.live-cat-btn.cat-entertainment.active {
  background: #9b59b6;
  color: #fff;
  border-color: #9b59b6;
  box-shadow: 0 2px 8px rgba(155, 89, 182, 0.4);
}

.live-cat-btn.cat-movies.active {
  background: #e2a308;
  color: #0c0e0d;
  border-color: #e2a308;
  box-shadow: 0 2px 8px rgba(226, 163, 8, 0.4);
}

.live-cat-btn.cat-music.active {
  background: #e84393;
  color: #fff;
  border-color: #e84393;
  box-shadow: 0 2px 8px rgba(232, 67, 147, 0.4);
}

.live-ch-area {
  min-height: 200px;
}

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

.ch-card {
  cursor: pointer;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
  transition:
    transform var(--ease),
    box-shadow var(--ease),
    border-color var(--ease),
    opacity var(--ease);
  content-visibility: auto;
  contain-intrinsic-size: auto 170px;
}

.ch-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(
      circle at 30% 20%,
      hsl(var(--h) 55% 38% / 0.55),
      transparent 60%
    ),
    linear-gradient(
      135deg,
      hsl(var(--h) 40% 24%),
      hsl(calc(var(--h) + 40) 45% 11%)
    );
}

.ch-thumb img {
  max-width: 58%;
  max-height: 58%;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
  transition: transform var(--ease);
}

.ch-initial {
  font-size: 34px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ch-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  opacity: 0;
  transition: opacity var(--ease);
}

.ch-play svg {
  width: 40px;
  height: 40px;
  padding: 11px;
  border-radius: 50%;
  background: var(--accent);
  color: #0c0e0d;
  box-sizing: border-box;
}

.ch-card:focus-visible .ch-play {
  opacity: 1;
}

.ch-name {
  padding: 10px 12px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ch-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6b7280;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45);
}

.ch-dot[data-state='pending'] {
  animation: ch-pulse 1.2s ease-in-out infinite;
}

.ch-dot[data-state='up'] {
  background: #22c55e;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.45),
    0 0 8px rgba(34, 197, 94, 0.7);
}

.ch-dot[data-state='down'] {
  background: #ef4444;
}

.ch-card[data-state='down'] {
  opacity: 0.55;
}

@keyframes ch-pulse {
  50% {
    opacity: 0.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ch-dot[data-state='pending'] {
    animation: none;
  }
}

@media (hover: hover) {
  .ch-card:hover {
    border-color: rgba(150, 167, 141, 0.4);
    transform: translateY(-4px);
    box-shadow:
      0 12px 30px rgba(0, 0, 0, 0.6),
      0 0 16px rgba(150, 167, 141, 0.15);
  }

  .ch-card[data-state='down']:hover {
    opacity: 0.85;
  }

  .ch-card:hover .ch-play {
    opacity: 1;
  }

  .ch-card:hover .ch-thumb img {
    transform: scale(1.06);
  }
}

.ch-card:active {
  transform: scale(0.98);
}

@media (max-width: 768px) {
  .live-view {
    padding: 16px 16px 80px;
  }

  .live-title {
    font-size: 26px;
  }

  .live-cats {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -16px;
    padding-inline: 16px;
    scrollbar-width: none;
  }

  .live-cats::-webkit-scrollbar {
    display: none;
  }

  .ch-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .ch-name {
    padding: 8px 10px 10px;
    font-size: 12.5px;
  }
}

.player-overlay video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.live-fs-info {
  transition: opacity 0.6s;
}

.live-fs-info.hide {
  opacity: 0;
  pointer-events: none;
}
