/* ============================================================
   live.css — Live streaming UI
   Uses the existing design tokens only (--gold, --red-soft,
   --surface, --border2, --muted) so it stays in step with the rest
   of the site and needs no changes if the palette moves.
   ============================================================ */

/* ── The pulse. This is the whole attention mechanic: a red dot
   that breathes reads as "happening right now" from across a
   crowded page. Kept subtle enough not to feel like an advert. ── */
@keyframes hy-live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212,56,42,0.65); }
  70%  { box-shadow: 0 0 0 9px rgba(212,56,42,0); }
  100% { box-shadow: 0 0 0 0 rgba(212,56,42,0); }
}
@keyframes hy-live-sheen {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(220%); }
}

.hy-live-pulse {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--red-soft, #D4382A);
  margin-right: 9px;
  vertical-align: middle;
  animation: hy-live-pulse 2s infinite;
}

/* ── Horizontal rail. Scrolls on mobile, wraps to a grid on
   desktop. Scroll-snap makes the swipe feel deliberate rather
   than loose. ── */
.hy-live-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.hy-live-rail::-webkit-scrollbar { height: 6px; }
.hy-live-rail::-webkit-scrollbar-thumb {
  background: var(--border2, rgba(255,255,255,0.12));
  border-radius: 3px;
}
.hy-live-rail > * { scroll-snap-align: start; }

@media (min-width: 900px) {
  .hy-live-rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    overflow-x: visible;
  }
}

/* ── Card ── */
.hy-live-card {
  display: block;
  text-decoration: none;
  color: var(--text, #F0F2F7);
  background: var(--surface, #161E2E);
  border: 1px solid var(--border2, rgba(255,255,255,0.12));
  border-radius: 14px;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.hy-live-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold, #F1B11B);
  box-shadow: 0 10px 26px rgba(0,0,0,0.36);
}
.hy-live-card:focus-visible {
  outline: 2px solid var(--gold, #F1B11B);
  outline-offset: 2px;
}

.hy-live-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #16203a, #0D1220);
  overflow: hidden;
}
.hy-live-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hy-live-thumb-ph {
  display: flex; align-items: center; justify-content: center;
  height: 100%;
  font-size: 30px;
  opacity: .34;
}

/* ── LIVE badge, with a sheen sweeping across it. The sweep is what
   makes the eye land here first among a page of static cards. ── */
.hy-live-badge {
  position: absolute; top: 8px; left: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--red-soft, #D4382A);
  color: #fff;
  font-size: 10px; font-weight: 800;
  letter-spacing: .08em;
  padding: 3px 8px;
  border-radius: 5px;
  overflow: hidden;
}
.hy-live-badge::after {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  animation: hy-live-sheen 2.6s infinite;
}
.hy-live-badge i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #fff;
  animation: hy-live-pulse 1.6s infinite;
}
.hy-live-badge--replay {
  background: rgba(0,0,0,0.62);
  color: var(--gold, #F1B11B);
}
.hy-live-badge--replay::after { animation: none; }

.hy-live-viewers {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.62);
  color: #fff;
  font-size: 10.5px; font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  backdrop-filter: blur(3px);
}

.hy-live-meta { padding: 10px 11px 12px; }
.hy-live-title {
  font-size: 13.5px; font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 7px;
  min-height: 2.7em;
}
.hy-live-host {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--muted, #8892A4);
}
.hy-live-host img {
  width: 18px; height: 18px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.hy-live-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold, #F1B11B), var(--red, #A31D14));
  flex-shrink: 0;
}
.hy-live-sep { opacity: .5; }

/* ── Go Live button ── */
.hy-go-live-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--red-soft, #D4382A), var(--red, #A31D14));
  color: #fff;
  font-size: 13.5px; font-weight: 800;
  padding: 10px 20px;
  border-radius: 11px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.hy-go-live-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(163,29,20,0.4);
}
.hy-go-live-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #fff;
  animation: hy-live-pulse 1.6s infinite;
}

/* Respect the OS "reduce motion" setting. Pulsing badges are exactly
   the kind of thing that triggers discomfort for motion-sensitive
   users, and this feature puts several on screen at once. */
@media (prefers-reduced-motion: reduce) {
  .hy-live-pulse,
  .hy-live-badge i,
  .hy-live-badge::after,
  .hy-go-live-dot { animation: none; }
  .hy-live-card { transition: none; }
}
