@keyframes youtubeLivePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.3; transform: scale(0.6); } }

.youtube-live-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  animation: youtubeLivePulse 1.4s ease-in-out infinite;
}

.youtube-live-button {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 16px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.youtube-live-description {
  white-space: pre-line;
}

.youtube-live-thumb {
  margin-bottom: 12px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface-alt);
  aspect-ratio: 16 / 9;
}

.youtube-live-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.youtube-live-section {
  --youtube-live-red: var(--live);
  --youtube-live-red-dark: #B42318;
  --youtube-live-text: #ffffff;
}

.youtube-live-section .youtube-live-head p {
  color: var(--youtube-live-red);
}

.youtube-live-section .youtube-live-dot {
  border-color: color-mix(in srgb, var(--youtube-live-red) 14%, var(--surface));
  background: var(--youtube-live-red);
}

.youtube-live-section .youtube-live-button {
  background: var(--primary);
  color: var(--primary-text);
}

.youtube-live-channel,
.youtube-live-time-text {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.youtube-live-time-text {
  color: var(--text);
  font-weight: 600;
}

.youtube-live-error {
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

/* ---------- YouTube live: broadcast card ---------- */
.yt-live-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #161d27;
  cursor: pointer;
}

div.yt-live-media {
  cursor: default;
}

.yt-live-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.yt-live-scrim {
  position: absolute;
  inset: 0;
  background: rgba(12, 17, 24, 0.26);
}

.yt-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--youtube-live-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.yt-live-badge .youtube-live-pulse-dot { background: #fff; }

.yt-live-clock {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(12, 17, 24, 0.55);
  color: #fff;
  font-size: 11px;
}

.yt-live-playicon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #141b26;
  display: flex;
  align-items: center;
  justify-content: center;
}

.yt-live-playicon svg { margin-left: 3px; }

.yt-live-caption {
  position: absolute;
  left: 12px;
  bottom: 11px;
  z-index: 2;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
}

.yt-live-body { padding-top: 13px; }

.yt-live-title {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.yt-live-sub {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.youtube-live-section .youtube-live-button {
  margin-top: 12px;
}

.youtube-live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--live) 9%, var(--modal, #fff));
  color: var(--text);
}

.youtube-live-status[hidden] { display: none; }
.youtube-live-status .youtube-live-pulse-dot { background: var(--live); }
.youtube-live-status b { font-size: 12.5px; font-weight: 500; }
.youtube-live-status span:last-child { margin-left: auto; color: var(--muted); font-size: 11.5px; }

.youtube-live-schedules {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.youtube-live-schedules div {
  display: block;
  padding: 8px 0;
  border: 0;
  border-top: 1px dashed var(--line);
  border-radius: 0;
  background: transparent;
}

.youtube-live-schedules div.is-active strong {
  color: var(--primary);
}

.youtube-live-schedules strong {
  display: block;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

.youtube-live-schedules span {
  display: block;
  min-width: 0;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

/* The scheduled badge pulses only while the program is airing. */
.youtube-live-card:not(.is-live) .yt-live-badge .youtube-live-pulse-dot {
  animation: none;
}

.youtube-live-card:not(.is-live) .yt-live-badge {
  background: color-mix(in srgb, var(--text) 12%, var(--surface));
  color: var(--muted);
}

.youtube-live-card:not(.is-live) .yt-live-badge .youtube-live-pulse-dot {
  background: currentColor;
}

@media (prefers-reduced-motion: reduce) {
  .youtube-live-pulse-dot { animation: none !important; }
}

@media (max-width: 420px) {
  .youtube-live-button {
    min-height: 42px;
    font-size: 13px;
  }
}
