/*
 * 直播列表内容区
 * 所有选择器均以 hl-live 开头，降低与宿主网站样式冲突的概率。
 */
.hl-live,
.hl-live * {
  box-sizing: border-box;
}

.hl-live {
  --hl-accent: #ff3938;
  --hl-text: #222;
  --hl-muted: #8a9099;
  --hl-surface: #fff;
  --hl-gap: 20px;
  width: 100%;
  padding: 92px 0 48px;
  color: var(--hl-text);
  background: #f3f3f3;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

.hl-live a {
  color: inherit;
  text-decoration: none;
}

.hl-live button {
  font: inherit;
}

.hl-live__container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

/* 顶部轮播：截图中为单张通栏大横幅，比例约 10:3。 */
.hl-live-hero {
  position: relative;
  margin: 0 0 10px;
  overflow: hidden;
}

.hl-live-hero__viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.hl-live-hero__track {
  display: flex;
  transition: transform 480ms cubic-bezier(.22, .61, .36, 1);
  will-change: transform;
}

.hl-live-slide {
  flex: 0 0 100%;
  min-width: 0;
}

.hl-live-slide__inner {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 10 / 3;
  background: #dfe3e8;
}

.hl-live-slide__inner::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 25%, rgba(0, 0, 0, .72) 100%);
}

.hl-live-slide__image {
  min-width: 100%;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
  transition: transform 500ms ease;
}

.hl-live-slide__inner:hover .hl-live-slide__image {
  transform: scale(1.035);
}

.hl-live-slide__tag,
.hl-live-card__tag {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 3px 9px;
  color: #fff;
  background: var(--hl-accent);
  font-size: 13px;
  line-height: 1.4;
}

.hl-live-slide__title {
  position: absolute;
  z-index: 2;
  right: 30px;
  bottom: 30px;
  left: 30px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hl-live-hero__arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .34);
  cursor: pointer;
  opacity: .18;
  transform: translateY(-50%);
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}

.hl-live-hero:hover .hl-live-hero__arrow,
.hl-live-hero__arrow:focus-visible {
  opacity: .65;
  transform: translateY(-50%);
}

.hl-live-hero__arrow:hover {
  background: rgba(0, 0, 0, .62);
}

.hl-live-hero__arrow span {
  display: block;
  margin-top: -3px;
  font-size: 35px;
  font-weight: 200;
  line-height: 1;
}

.hl-live-hero__arrow--prev { left: -20px; padding-left: 14px; }
.hl-live-hero__arrow--next { right: -20px; padding-right: 14px; }

.hl-live-hero__dots {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 11px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 6px;
}

.hl-live-hero__dot {
  width: 18px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, .7);
  cursor: pointer;
  transition: width 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.hl-live-hero__dot.is-active {
  width: 18px;
  border-radius: 0;
  background: var(--hl-accent);
}

/* 下方卡片：白色内容面板，桌面端 4 列，封面 480:300。 */
.hl-live-list {
  padding: 25px 20px 34px;
  background: #fff;
}

.hl-live-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.hl-live-card {
  display: flex;
  height: 100%;
  min-width: 0;
  padding-bottom: 14px;
  border: 1px solid #ececec;
  background: #fff;
  flex-direction: column;
  transform: translateY(0);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.hl-live-card:hover,
.hl-live-card:focus-within {
  border-color: #e3e5e8;
  box-shadow: 0 9px 22px rgba(31, 35, 41, .10);
  transform: translateY(-4px);
}

.hl-live-card__cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 480 / 300;
  background: #e7e9ec;
}

.hl-live-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease, filter 420ms ease;
}

.hl-live-card:hover .hl-live-card__image {
  filter: brightness(.9);
  transform: scale(1.04);
}

/*
 * 播放按钮：对应目标站 .post-loop-image .item-video:after。
 * 原站使用 iconbg 字体，这里改为内嵌 SVG，避免依赖目标站字体文件。
 */
.hl-live-card__cover--video::after {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #00000059;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M18 13.5v17l14-8.5z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 44px 44px;
  box-sizing: border-box;
  content: "";
  transform: translate(-50%, -50%) scale(1);
  transition: background-color 200ms ease-out, transform 200ms ease-out;
}

.hl-live-card__cover--video:hover::after,
.hl-live-card__cover--video:focus-visible::after {
  background-color: #00000099;
  transform: translate(-50%, -50%) scale(1.06);
}

.hl-live-card__title {
  display: -webkit-box;
  height: 52px;
  margin: 13px 14px 7px;
  overflow: hidden;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  /*
   * 直播标题允许在中文标点相邻处充分使用行宽。
   * 全局标题使用 strict 禁则，会把“汉字+引号/连接符”整体挪到下一行，
   * 在卡片右侧留下仍可容纳汉字的空白，因此仅在直播列表解除该限制。
   */
  line-break: anywhere;
  overflow-wrap: normal;
  text-wrap: wrap;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hl-live-card__title a {
  line-break: inherit;
  overflow-wrap: inherit;
  text-wrap: inherit;
  word-break: inherit;
  transition: color 160ms ease;
}

.hl-live-card__title a:hover {
  color: #0052d9;
}

.hl-live-card__title-prefix {
  font-weight: 700;
}

.hl-live-card__meta {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-height: 27px;
  margin: 0 14px;
  color: var(--hl-muted);
  font-size: 14px;
}

.hl-live-card__time strong {
  color: #555b65;
  font-weight: 600;
}

.hl-live-card__status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 24px;
  margin-top: 6px;
  padding: 0 8px;
  border-radius: 3px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.hl-live-card__status--live { background: #ff3938; }
.hl-live-card__status--upcoming { background: #f59e0b; }
.hl-live-card__status--ended { background: #86909c; }

.hl-live-list__footer {
  margin-top: 34px;
  text-align: center;
}

.hl-live-more {
  min-width: 168px;
  height: 42px;
  padding: 0 24px;
  border: 1px solid #e4e6e9;
  color: #555b65;
  background: #fff;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.hl-live-more:hover,
.hl-live-more:focus-visible {
  border-color: var(--hl-accent);
  color: var(--hl-accent);
}

.hl-live-more__icon {
  display: inline-block;
  margin-left: 5px;
  transform: translateY(-1px);
}

.hl-live-list__end {
  margin: 0;
  color: #a1a6ad;
  font-size: 14px;
}

@media (max-width: 1023px) {
  .hl-live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .hl-live { padding-top: 92px; padding-bottom: 32px; }
  .hl-live__container { width: min(100% - 24px, 1200px); }
  .hl-live-hero { margin-bottom: 8px; }
  .hl-live-slide__inner { aspect-ratio: 16 / 7; }
  .hl-live-slide__title { right: 12px; bottom: 10px; left: 12px; font-size: 16px; }
  .hl-live-hero__arrow { width: 34px; height: 48px; opacity: .75; transform: translateY(-50%); }
  .hl-live-list { padding: 12px 10px 26px; }
  .hl-live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .hl-live-card__title { height: 44px; margin: 9px 10px 6px; font-size: 15px; line-height: 1.48; }
  .hl-live-card__meta { margin: 0 10px; }
  .hl-live-card__cover--video::after {
    width: 36px;
    height: 36px;
    background-size: 36px 36px;
  }
  .hl-live-card__meta { font-size: 13px; }
  .hl-live-card__time strong { display: none; }
  .hl-live-card__status { min-width: 46px; height: 22px; margin-top: 5px; padding: 0 7px; font-size: 12px; }
}

@media (max-width: 560px) {
  .hl-live { padding-top: 84px; }
}

@media (max-width: 359px) {
  .hl-live-grid { grid-template-columns: 1fr; }
}

.hl-live-empty {
  min-height: 320px;
  display: grid;
  place-content: center;
  padding: 40px 24px;
  border: 1px solid #e8eaed;
  background: #fff;
  text-align: center;
}

.hl-live-empty h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

.hl-live-empty p {
  margin: 0;
  color: var(--hl-muted);
  font-size: 15px;
}

.hl-live-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.hl-live-pagination a {
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #e4e6e9;
  background: #fff;
  color: #555b65;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.hl-live-pagination a:hover,
.hl-live-pagination a:focus-visible,
.hl-live-pagination a.is-active {
  border-color: var(--hl-accent);
  background: var(--hl-accent);
  color: #fff;
}

@media (max-width: 767px) {
  .hl-live-empty { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .hl-live-hero__track,
  .hl-live-slide__image,
  .hl-live-card,
  .hl-live-card__image,
  .hl-live-card__cover--video::after { transition: none; }

  .hl-live-card:hover,
  .hl-live-card:focus-within { transform: none; }
}
