/* H5 desktop/mobile repair for the live-room grid and replay player. */
/* Homepage promotion: keep every close action visible inside the viewport. */
html .gonggao-popup {
  position: relative !important;
  box-sizing: border-box !important;
  width: min(86vw, 420px) !important;
  height: min(82vh, 610px) !important;
  max-width: 420px !important;
  max-height: 610px !important;
  overflow: hidden !important;
  border-radius: 22px !important;
}
html .gonggao-popup .promo-close {
  position: absolute !important;
  z-index: 10020 !important;
  top: 12px !important;
  right: 12px !important;
  display: flex !important;
  width: 48px !important;
  height: 48px !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  background: rgba(20, 5, 18, .82) !important;
  cursor: pointer !important;
}
html .gonggao-popup .promo-close-icon {
  color: #fff !important;
  font-size: 38px !important;
  line-height: 42px !important;
}
html .gonggao-popup .promo-hero,
html .gonggao-popup .promo-hero > div,
html .gonggao-popup .promo-hero img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
html .gonggao-popup .promo-shade { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; }
html .gonggao-popup .promo-content { position: absolute !important; z-index: 5 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; width: 100% !important; }
html .gonggao-popup .promo-primary { margin-top: 16px !important; }
@media (max-height: 620px) {
  html .gonggao-popup { height: calc(100vh - 24px) !important; }
  html .gonggao-popup .promo-content { padding: 24px 20px 18px !important; }
  html .gonggao-popup .promo-title { font-size: 26px !important; }
  html .gonggao-popup .promo-subtitle { margin-top: 5px !important; font-size: 14px !important; }
  html .gonggao-popup .promo-primary,
  html .gonggao-popup .promo-secondary { height: 42px !important; line-height: 42px !important; }
}

.player .live-room-heading {
  box-sizing: border-box; flex-shrink: 0; padding: 22px 24px 12px;
  width: 100%; max-width: 1440px; margin: 0 auto;
}
.player .live-room-title { display: block; font-size: 24px; font-weight: 700; color: #20242c; }
.player .live-room-description { display: block; margin-top: 6px; font-size: 14px; color: #6b7280; }
@media (max-width:680px) {
  .player .live-room-heading { padding: 16px 14px 8px; }
  .player .live-room-title { font-size: 21px; }
  .player .live-room-description { font-size: 12px; }
}
.player .replay-state { font-size: 13px !important; line-height: 1.6; color: #e2e8f0; }
.replay-status-banner {
  position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px;
  z-index: 100; padding: 8px 12px; border-radius: 8px;
  background: rgba(0,0,0,.7); color: #fff; font-size: 14px; pointer-events: none;
}
.player,
.player .swiper,
.player .scroll-index,
.player .tab-list,
.player .nav-bar {
  box-sizing: border-box !important;
  width: 100% !important;
}

html.live-list-page,
html.live-list-page body,
html.live-list-page #app,
html.live-list-page uni-app,
html.live-list-page uni-page,
html.live-list-page uni-page-wrapper,
html.live-list-page uni-page-body {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
}

.player .tab-list {
  min-height: 64px !important;
  height: auto !important;
  border-bottom: 1px solid #eee;
}

.player .tab-list .scroll-item {
  margin: 0 18px !important;
  font-size: 18px !important;
  line-height: 64px !important;
}

.player .tab-list .scroll-item .gaoliang {
  font-size: 22px !important;
}

.player .play-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  align-items: stretch !important;
  gap: 20px !important;
  padding: 24px !important;
  max-width: 1440px !important;
  margin: 0 auto !important;
  align-content: start !important;
}

.player .scroll-index .uni-scroll-view-content { display: block !important; }
.player .gg-swiper:not(:has(uni-swiper-item)) { display: none !important; }

html.video-detail-page uni-app,
html.video-detail-page uni-page,
html.video-detail-page uni-page-body {
  width: min(100%, 1120px) !important;
  max-width: 1120px !important;
  margin: 0 auto !important;
  background: #fff !important;
}
html.video-detail-page .video {
  position: relative !important;
  top: 0 !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  max-height: 70vh;
  background: #000;
}
html.video-detail-page .myvideo,
html.video-detail-page .video video,
html.video-detail-page .video-gg,
html.video-detail-page .video-gg-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}
html.video-detail-page .tianchong { display: none !important; }
html.video-detail-page .biaoti,
html.video-detail-page .notice-bar1,
html.video-detail-page .tabbar-list,
html.video-detail-page .cnxh-title,
html.video-detail-page .video-list { box-sizing: border-box; width: 100% !important; }
html.video-detail-page .biaoti { padding: 20px !important; }
html.video-detail-page .biaoti-title { font-size: 22px !important; line-height: 1.5 !important; }
html.video-detail-page .tabbar-list { padding: 16px 20px !important; }
html.video-detail-page .tab-left-text,
html.video-detail-page .tab-right-text { font-size: 15px !important; }
html.video-detail-page .tab-left-img,
html.video-detail-page .tab-right-img { width: 24px !important; height: 24px !important; margin-right: 8px !important; }
html.video-detail-page .back-img { position: fixed !important; width: 32px !important; height: 32px !important; left: max(14px, calc((100vw - 1120px) / 2 + 14px)) !important; z-index: 100; background: rgba(0,0,0,.55); border-radius: 50%; padding: 4px; }
html.video-detail-page .cnxh-text { font-size: 21px !important; }
html.video-detail-page .cnxh-title { padding: 16px 20px !important; }
html.video-detail-page .video-list { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px 16px; padding: 0 20px !important; }
html.video-detail-page .video-item { width: 100% !important; min-width: 0 !important; margin: 0 !important; }
html.video-detail-page .video-image { width: 100% !important; height: auto !important; aspect-ratio: 16/10; background: #eef0f3; }
html.video-detail-page .video-title { width: 100% !important; font-size: 16px !important; line-height: 1.5 !important; }
html.video-detail-page .brand-watermark { width: 42px !important; height: 22px !important; top: 10px !important; right: 12px !important; border-radius: 11px !important; }
html.video-detail-page .brand-watermark-text { font-size: 12px !important; line-height: 22px !important; }
html.video-detail-page .back-img { display: none !important; }
html.video-detail-page #replay-back-button { left: max(14px, calc((100vw - 1120px) / 2 + 14px)); }
html.video-detail-page .xian { width: 100% !important; }
@media (max-width:680px) {
  html.video-detail-page .video-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  html.video-detail-page .biaoti-title { font-size:18px !important; }
  html.video-detail-page .tab-left-text,html.video-detail-page .tab-right-text {font-size:12px !important;}
}

html.short-video-page,
html.short-video-page body { background: #080808 !important; }
html.short-video-page uni-page-body { width: 100% !important; margin: 0 !important; }
html.short-video-page .h5-content { width: 100% !important; }
html.short-video-page .h5-content .uni-scroll-view { scroll-snap-type: y mandatory; }
html.short-video-page .h5-video-cell,
html.short-video-page .small-video-root { width: min(100%, 480px) !important; margin: 0 auto !important; }
html.short-video-page .videolist,
html.short-video-page .fengmian,
html.short-video-page .fengmian-img { width: 100% !important; object-fit: contain !important; }
html.short-video-page .user-view { left: 14px !important; bottom: 70px !important; width: calc(100% - 74px) !important; }
html.short-video-page .jianjie { font-size: 16px !important; line-height: 24px !important; }
html.short-video-page .header-img,
html.short-video-page .dianzan,
html.short-video-page .pinglun,
html.short-video-page .fenxiang { right: 12px !important; width: 42px !important; }
html.short-video-page .header-img { bottom: 310px !important; }
html.short-video-page .dianzan { bottom: 238px !important; }
html.short-video-page .pinglun { bottom: 168px !important; }
html.short-video-page .fenxiang { bottom: 100px !important; }
html.short-video-page .user-img,
html.short-video-page .platform-user-badge,
html.short-video-page .dianzan-img,
html.short-video-page .pinglun-img,
html.short-video-page .fenxiang-img { width: 38px !important; height: 38px !important; }
html.short-video-page .dianzan-text,
html.short-video-page .pinglun-text,
html.short-video-page .fenxiang-text { font-size: 13px !important; }
html.short-video-page .playicon { width: 64px !important; height: 64px !important; left: calc(50% - 32px) !important; }
html.short-video-page .xiangji { width: 30px !important; height: 30px !important; right: 16px !important; }
html.short-video-page .guanzhu-butt { width: 18px !important; height: 18px !important; }
html.short-video-page .platform-user-badge-text { font-size: 14px !important; }
.media-retry {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 10001; padding: 14px 22px; border: 1px solid #aaa; border-radius: 8px;
  color: #fff; background: #222; font-size: 16px; cursor: pointer;
}
.media-retry[hidden] { display: none !important; }

.player .play-list .play-item {
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 10 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: 14px !important;
  background: #171717 !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .12) !important;
}

.player .play-item .lazy,
.player .play-item .lazy-image,
.player .play-item .lazy-load,
.player .play-item uni-image,
.player .play-item uni-image > div,
.player .play-item uni-image img {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 14px !important;
  object-fit: cover !important;
}

.player .play-item .down-detail {
  position: absolute !important;
  z-index: 20 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 78px !important;
  padding: 26px 16px 12px !important;
  border-radius: 0 !important;
  background: linear-gradient(transparent, rgba(0, 0, 0, .88)) !important;
}

.player .play-item .down-detail .name {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  max-height: 48px !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  line-height: 24px !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8) !important;
}

.player .play-item .down-detail .down-tab {
  position: static !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin-top: 7px !important;
  color: rgba(255, 255, 255, .92) !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

@media (max-width: 680px) {
  .player .play-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  .player .play-item .down-detail {
    min-height: 64px !important;
    padding: 18px 10px 8px !important;
  }

  .player .play-item .down-detail .name {
    max-height: 40px !important;
    font-size: 14px !important;
    line-height: 20px !important;
  }

  .player .play-item .down-detail .down-tab {
    margin-top: 3px !important;
    font-size: 12px !important;
  }
}

html.live-replay-page,
html.live-replay-page body,
html.live-replay-page #app,
html.live-replay-page uni-app,
html.live-replay-page uni-page,
html.live-replay-page uni-page-wrapper,
html.live-replay-page uni-page-body {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  background: #000 !important;
}

html.live-replay-page .myvideo {
  position: fixed !important;
  z-index: 9000 !important;
  inset: 0 !important;
  box-sizing: border-box !important;
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  background: #000 !important;
  object-fit: contain !important;
}

html.live-replay-page .myvideo video,
html.live-replay-page .myvideo .uni-video-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

html.live-replay-page.replay-portrait-clockwise .myvideo video,
html.live-replay-page.replay-portrait-clockwise .myvideo .uni-video-video {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 100vh !important;
  height: 100vw !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%) rotate(90deg) !important;
  transform-origin: center center !important;
  object-fit: contain !important;
}

html.live-replay-page.replay-rotate-270 .myvideo video,
html.live-replay-page.replay-rotate-270 .myvideo .uni-video-video {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 100vh !important;
  height: 100vw !important;
  max-width: none !important;
  max-height: none !important;
  transform: translate(-50%, -50%) rotate(270deg) !important;
  transform-origin: center center !important;
  object-fit: contain !important;
}

html.live-replay-page.replay-rotate-180 .myvideo video,
html.live-replay-page.replay-rotate-180 .myvideo .uni-video-video {
  transform: rotate(180deg) !important;
  transform-origin: center center !important;
}

html.live-replay-page.replay-rotation-active video::-webkit-media-controls {
  display: none !important;
}

#portrait-replay-controls {
  position: fixed;
  z-index: 10055;
  bottom: max(6px, env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto;
  box-sizing: border-box;
  align-items: center;
  gap: 8px;
  width: min(calc(100vw - 20px), 960px);
  padding: 6px 8px;
  transform: translateX(-50%);
  border: 0;
  border-radius: 9px;
  background: rgba(0,0,0,.48);
  color: #fff;
  font-size: 12px;
  backdrop-filter: blur(4px);
}
#portrait-replay-controls button {
  min-width: 56px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 15px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 12px;
}
#portrait-replay-controls [data-role="time"] { min-width: 92px; text-align: center; }
#portrait-replay-controls [data-role="progress"] {
  width: 100%;
  min-width: 80px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #f5c565;
}

html.live-replay-page .fengmian-image,
html.live-replay-page .header,
html.live-replay-page .chat-scroll,
html.live-replay-page .add-box,
html.live-replay-page .gift-box,
html.live-replay-page .pinglun-box,
html.live-replay-page .down-tab,
html.live-replay-page .input-down,
html.live-replay-page .guanggaobox,
html.live-replay-page .guanggaobox1 {
  display: none !important;
}

#replay-back-button {
  position: fixed;
  z-index: 10050;
  top: max(16px, env(safe-area-inset-top));
  left: 16px;
  min-width: 82px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 22px;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 16px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

@media (max-width: 680px) {
  #portrait-replay-controls {
    grid-template-columns: auto minmax(70px, 1fr) auto auto;
    gap: 5px;
    width: calc(100vw - 10px);
    padding: 5px;
  }
  #portrait-replay-controls button { min-width: 48px; padding: 0 7px; }
  #portrait-replay-controls [data-role="time"] { min-width: 78px; font-size: 11px; }
  #replay-back-button {
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    min-width: 68px;
    height: 36px;
    padding: 0 13px;
    font-size: 14px;
    line-height: 34px;
  }
}

/* Recommendation feed fills the remaining page after the removed sort toolbar. */
.index-tips .recommend-feed {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
}
.index-tips .recommend-feed > uni-scroll-view {
  flex: 1 1 0 !important;
  height: 0 !important;
  min-height: 0;
  width: 100% !important;
}

/* 暖夜里主导航：所有页面保持同一套高对比视觉，避免页面切换后变回浅灰。 */
html uni-tabbar .uni-tabbar {
  min-height: 66px !important;
  height: 66px !important;
  padding: 7px 5px max(7px, env(safe-area-inset-bottom)) !important;
  border-top: 1px solid rgba(220, 155, 144, .34) !important;
  background: rgba(36, 22, 30, .98) !important;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .34) !important;
  backdrop-filter: blur(18px) !important;
}
html uni-tabbar .uni-tabbar__item {
  position: relative !important;
  min-width: 0 !important;
  border-radius: 13px !important;
  color: #ecd3c9 !important;
}
html uni-tabbar .uni-tabbar__item .uni-tabbar__label {
  margin-top: 3px !important;
  color: #ecd3c9 !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 16px !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .45) !important;
}
html uni-tabbar .uni-tabbar__item .uni-tabbar__icon {
  width: 23px !important;
  height: 23px !important;
}
html uni-tabbar .uni-tabbar__item .uni-tabbar__icon img {
  opacity: .84 !important;
  filter: grayscale(1) brightness(0) invert(1) !important;
}
html uni-tabbar .uni-tabbar__item.uni-tabbar__item--active {
  color: #f3b68a !important;
  background: linear-gradient(180deg, rgba(216, 132, 126, .23), rgba(216, 132, 126, .05)) !important;
}
html uni-tabbar .uni-tabbar__item:has(.uni-tabbar__label[style*="243, 182, 138"]) {
  color: #f3b68a !important;
  background: linear-gradient(180deg, rgba(216, 132, 126, .23), rgba(216, 132, 126, .05)) !important;
}
html uni-tabbar .uni-tabbar__item.uni-tabbar__item--active::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 20%;
  right: 20%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #efb48f;
  box-shadow: 0 0 12px rgba(239, 180, 143, .55);
}
html uni-tabbar .uni-tabbar__item:has(.uni-tabbar__label[style*="243, 182, 138"])::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 20%;
  right: 20%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #efb48f;
  box-shadow: 0 0 12px rgba(239, 180, 143, .55);
}
html uni-tabbar .uni-tabbar__item.uni-tabbar__item--active .uni-tabbar__label {
  color: #fff1e7 !important;
  font-weight: 900 !important;
}
html uni-tabbar .uni-tabbar__item:has(.uni-tabbar__label[style*="243, 182, 138"]) .uni-tabbar__label {
  color: #fff1e7 !important;
  font-weight: 900 !important;
}
html uni-tabbar .uni-tabbar__item.uni-tabbar__item--active .uni-tabbar__icon img {
  opacity: 1 !important;
  filter: brightness(0) saturate(100%) invert(77%) sepia(26%) saturate(619%) hue-rotate(328deg) brightness(103%) contrast(96%) !important;
}
html uni-tabbar .uni-tabbar__item:has(.uni-tabbar__label[style*="243, 182, 138"]) .uni-tabbar__icon img {
  opacity: 1 !important;
  filter: brightness(0) saturate(100%) invert(77%) sepia(26%) saturate(619%) hue-rotate(328deg) brightness(103%) contrast(96%) !important;
}
