/* ===== 江豚直播页 ===== */

.live-main {
  padding-top: 0;
  padding-bottom: 30px;
  padding-bottom: var(--space);
}

/* ----- 标题 ----- */
.live-hero {
  text-align: center;
  /* 与下一板块间距由 .page-block 统一控制 */
  margin-bottom: 0;
}

/* ----- 频道标签（五等分） ----- */
/* 外层居中，内层保持 float 栅格，不取消 float:left */
.live-channels-wrap {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.live-channel-col {
  margin-bottom: 12px;
  opacity: 0;
  -webkit-transform: translateX(28px);
  transform: translateX(28px);
}

.live-channel-col.is-in {
  -webkit-animation: live-channel-in 0.5s ease-out forwards;
  animation: live-channel-in 0.5s ease-out forwards;
}

@-webkit-keyframes live-channel-in {
  from {
    opacity: 0;
    -webkit-transform: translateX(28px);
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
}

@keyframes live-channel-in {
  from {
    opacity: 0;
    -webkit-transform: translateX(28px);
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
}

@media (min-width: 992px) {
  /* 覆盖 grid.js 注入的 .col-sm-6（五等分） */
  .live-channels > .live-channel-col.col-sm-6 {
    width: 20%;
    float: left;
  }
}

/* 中屏两列时，末行单列用 margin 居中（仍保留 float） */
@media (min-width: 768px) and (max-width: 991px) {
  .live-channels > .live-channel-col:last-child:nth-child(odd) {
    margin-left: 25%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-channel-col,
  .live-channel-col.is-in {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
    -webkit-animation: none;
    animation: none;
  }
}

.live-channel {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 28px;
  border-radius: 22px;
  background: #fff;
  color: #4a5560;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  -webkit-box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: var(--shadow);
  -webkit-transition: color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  transition: color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.live-channel:hover,
.live-channel:focus {
  color: #2f8fd4;
  outline: none;
}

.live-channel.is-active {
  border-color: transparent;
  background-color: transparent;
  background-image: -webkit-linear-gradient(left, #08C686 4%, #05A3F5 100%);
  background-image: linear-gradient(270deg, #05A3F5 0%, #08C686 96%);
  color: #fff;
  position: relative;
}
.live-channel.is-active::before{
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: url("../images/bg-live-channel-active.png") no-repeat center bottom;
  background-size: auto 50px;
  position: absolute;
  bottom: -9px;
  left: 0;
  z-index: -1;
}
.live-channel.is-active:hover,
.live-channel.is-active:focus {
  color: #fff;
}

.live-channel__label {
  position: relative;
  z-index: 1;
}

.live-channel__deco {
  display: none;
}

/* ----- 播放器 ----- */
.live-player {
  margin-bottom: 30px;
  margin-bottom: var(--space);
}

.live-player__frame {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border-radius: var(--radius);
  background: #0a2a3a;
  -webkit-box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  min-height: 280px;
  opacity: 1;
  -webkit-transform: scale(0.9);
  transform: scale(0.9);
  -webkit-transform-origin: center center;
  transform-origin: center center;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .live-player__frame {
    -webkit-transform: none;
    transform: none;
    will-change: auto;
  }
}

.live-player__video {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  -o-object-fit: cover !important;
  object-fit: cover !important;
  z-index: 1;
  display: block !important;
}

.live-player__video[src] ~ .live-player__poster {
  display: none;
}

.live-player__poster {
  display: block;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  vertical-align: top;
}

.live-player__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: flex-start;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  padding: 16px 18px;
  pointer-events: none;
}

.live-player__meta {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  max-width: 70%;
  gap: 10px;
}

.live-player__badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 2px;
  background: #e53935;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.live-player__channel-title {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-player__viewers {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 5px 12px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.live-player__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #3ddc84;
  -webkit-box-shadow: 0 0 0 2px rgba(61, 220, 132, 0.16);
  box-shadow: 0 0 0 2px rgba(61, 220, 132, 0.16);
}

.live-player__comments {
  position: absolute;
  left: 16px;
  top: 58px;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 52%;
  pointer-events: none;
}

.live-player__comment {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  margin-bottom: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
}

.live-player__avatar {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: #8a9aa8;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.live-player__avatar-img {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
  object-fit: cover;
}

.live-player__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  min-height: 48px;
  padding: 8px 14px;
  background: rgba(10, 18, 28, 0.72);
  color: #fff;
  border-radius: 0 0 2px 2px;
}

.live-player__controls-left,
.live-player__controls-right {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-flex: 0;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.live-player__btn {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: 0.92;
}

.live-player__btn:hover,
.live-player__btn:focus {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  opacity: 1;
}

.live-player__controls-right .live-player__btn {
  margin-right: 0;
  margin-left: 4px;
}

.live-player__time {
  margin-left: 8px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0.95;
}

.live-player__progress {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  margin: 0 16px;
  min-width: 40px;
}

.live-player__progress-track {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
}

.live-player__comment-input {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(10, 18, 28, 0.72);
}

.live-player__comment-field {
  flex: 1;
  height: 32px;
  padding: 0 12px;
  border: none;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 13px;
  outline: none;
}

.live-player__comment-field::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.live-player__comment-btn {
  margin-left: 8px;
  padding: 0 16px;
  height: 32px;
  border: none;
  border-radius: 16px;
  background: #08C686;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.live-player__comment-btn:hover {
  background: #06b378;
}

@media (max-width: 767px) {
  .live-player__comment-input {
    bottom: 44px;
    padding: 6px 8px;
  }

  .live-player__comment-field {
    height: 28px;
    font-size: 12px;
  }

  .live-player__comment-btn {
    padding: 0 12px;
    height: 28px;
    font-size: 12px;
  }
}

/* ----- 更多直播（间距见 .page-block） ----- */
.live-more__title {
  margin: 0 0 30px;
  margin-bottom: var(--space);
  font-size: 24px;
  font-weight: 700;
  color: #1e3a5f;
}

.live-more__grid > [class*="col-"] {
  margin-bottom: 30px;
  margin-bottom: var(--space);
}

.live-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  text-decoration: none;
  color: inherit;
  -webkit-box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: var(--shadow);
  -webkit-transition: -webkit-box-shadow 0.2s ease, -webkit-transform 0.2s ease;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.live-card:hover,
.live-card:focus {
  -webkit-box-shadow: 0 8px 24px rgba(30, 70, 100, 0.09);
  box-shadow: 0 8px 24px rgba(30, 70, 100, 0.09);
  box-shadow: var(--shadow-hover);
  -webkit-transform: translateY(-2px);
  -ms-transform: translateY(-2px);
  transform: translateY(-2px);
  outline: none;
}

.live-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #d8e6ef;
}

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

.live-card__live {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  padding: 3px 8px;
  border-radius: 2px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.live-card__live i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: #fff;
}

.live-card__play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: #1e3a5f;
  -webkit-box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: 0 4px 16px rgba(30, 70, 100, 0.05);
  box-shadow: var(--shadow);
}

.live-card__title {
  margin: 0;
  padding: 12px 14px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: #1e3a5f;
}

/* ----- object-fit 降级 ----- */
.no-object-fit .live-player__frame,
.no-object-fit .live-card__media {
  position: relative;
}

.no-object-fit .live-player__poster,
.no-object-fit .live-card__media img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  -o-object-fit: none;
  object-fit: none;
  font-family: "object-fit: cover;";
}

/* ----- IE 降级 ----- */
html.is-ie .live-channel-col {
  opacity: 1;
  -webkit-transform: none;
  transform: none;
}

html.is-ie .live-channel {
  border-radius: 22px;
}

html.is-ie .live-player__frame {
  height: 480px;
}

html.is-ie .live-card__media {
  height: 160px;
}

html.is-ie .live-player__meta,
html.is-ie .live-player__top,
html.is-ie .live-player__controls,
html.is-ie .live-player__controls-left,
html.is-ie .live-player__controls-right,
html.is-ie .live-player__comment,
html.is-ie .live-player__viewers,
html.is-ie .live-channel {
  display: block;
  zoom: 1;
}

html.is-ie .live-player__badge,
html.is-ie .live-player__channel-title,
html.is-ie .live-player__btn,
html.is-ie .live-player__time,
html.is-ie .live-player__dot,
html.is-ie .live-player__avatar {
  display: inline-block;
  vertical-align: middle;
}

html.is-ie .live-player__badge {
  margin-right: 10px;
}

html.is-ie .live-player__progress {
  display: inline-block;
  width: 40%;
  vertical-align: middle;
}

html.is-ie .live-player__controls-right {
  float: right;
}

html.is-ie .live-player__viewers {
  float: right;
}

/* ----- 响应式 ----- */
@media (max-width: 1199px) {
  .live-hero__title.title-1,
  .live-hero__title.title-2 {
    font-size: 34px;
  }

  .live-hero__title.title-1::before,
  .live-hero__title.title-2::before {
    width: 300px;
    height: 46px;
  }

  html.is-ie .live-player__frame {
    height: 400px;
  }
}

@media (max-width: 991px) {
  .live-main {
    padding-top: 0;
    padding-bottom: 30px;
    padding-bottom: var(--space);
  }

  .live-hero__title.title-1,
  .live-hero__title.title-2 {
    font-size: 32px;
  }

  .live-hero__title.title-1::before,
  .live-hero__title.title-2::before {
    width: 280px;
    height: 42px;
  }

  .live-player__comments {
    max-width: 70%;
  }

  .live-player__channel-title {
    font-size: 13px;
  }

  html.is-ie .live-player__frame {
    height: 320px;
  }
}

@media (max-width: 767px) {
  .live-hero__title.title-1,
  .live-hero__title.title-2 {
    font-size: 28px;
  }

  .live-hero__title.title-1::before,
  .live-hero__title.title-2::before {
    width: 240px;
    height: 36px;
  }

  .live-channel {
    font-size: 15px;
    min-height: 40px;
    padding: 8px 24px;
  }

  .live-player {
    margin-bottom: 32px;
  }

  .live-player__frame {
    border-radius: var(--radius);
    min-height: 200px;
  }

  .live-player__controls {
    border-radius: 0 0 2px 2px;
    padding: 6px 8px;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .live-player__progress {
    -webkit-box-ordinal-group: 4;
    -ms-flex-order: 3;
    order: 3;
    width: 100%;
    margin: 6px 0 2px;
  }

  .live-player__comments {
    display: none;
  }

  .live-player__top {
    padding: 10px 12px;
  }

  .live-player__viewers {
    font-size: 11px;
    padding: 4px 8px;
  }

  .live-player__time {
    font-size: 11px;
    margin-left: 4px;
  }

  .live-more__title {
    font-size: 20px;
    margin-bottom: 14px;
  }

  .live-card__title {
    font-size: 13px;
    padding: 10px 12px 12px;
  }

  html.is-ie .live-player__frame {
    height: 220px;
  }
}

/* 无 aspect-ratio 时的高度兜底 */
@supports not (aspect-ratio: 16 / 9) {
  .live-player__frame {
    height: 0;
    padding-bottom: 56.25%;
  }

  .live-player__poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .live-card__media {
    height: 0;
    padding-bottom: 62.5%;
  }

  .live-card__media img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}
