/* LiveMe PC watch room — parity with page-liveroom / tool_content_left_pc layout */

.live-watch-page .page-liveroom.live-content {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background: #0a0a0f;
  overflow: hidden;
}

.live-watch-page .live-switch-room-stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.live-watch-page .live_video_content {
  position: absolute;
  left: 312px;
  right: 284px;
  top: 0;
  bottom: 0;
  min-width: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
  z-index: 1;
  height: 100%;
  overflow: hidden;
}

.live-watch-page .live_video_content.liveme-native-stage .live-room,
.live-watch-page .live_video_content.liveme-native-stage .live-room-stage,
.live-watch-page .live_video_content.liveme-native-stage #video-layout-container,
.live-watch-page .live_video_content.liveme-native-stage .video-layout-stage {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.live-watch-page .live-room,
.live-watch-page .live-room-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-watch-page #video-layout-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.live-watch-page .video-layout-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: min(92vh, 642px);
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #050508;
}

.live-watch-page .video-layout-stage .live__live_video_holder,
.live-watch-page .video-layout-stage .live_vide__holder {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

.live-watch-page .video-layout-stage video,
.live-watch-page .video-layout-stage .klw-video-liveme {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-watch-page .live-switch-room-stage::before {
  content: none;
}

.live-watch-page .anchor_info_wrap {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 12;
  width: 300px;
  max-width: calc(100vw - 340px);
}

.live-watch-page .anchor_nav .anchor-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(24, 24, 30, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
}

.live-watch-page .anchor-card .anchor-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.live-watch-page .anchor-card .anchor-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-watch-page .anchor-card__main {
  flex: 1;
  min-width: 0;
}

.live-watch-page .anchor-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 4px;
}

.live-watch-page .anchor-card__title a {
  color: #fff;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}

.live-watch-page .anchor-card__follow {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(90deg, #9d1dff, #ff526d);
  color: #fff;
  cursor: pointer;
}

.live-watch-page .anchor-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 11px;
  opacity: 0.88;
}

.live-watch-page .im_chat {
  position: absolute;
  left: 24px;
  top: 110px;
  bottom: 88px;
  width: 288px;
  z-index: 11;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.live-watch-page .im_chat .liveme-chat-overlay {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  max-height: none !important;
  flex: 1 1 auto;
  min-height: 0;
  pointer-events: auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.live-watch-page .im_chat .liveme-im-composer {
  pointer-events: auto;
  margin-top: 8px;
}

.live-watch-page .live_tool_bar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 14;
  width: 284px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  pointer-events: none;
}

.live-watch-page .page-liveroom.live-content.clearn_screen .anchor_info_wrap,
.live-watch-page .page-liveroom.live-content.clearn_screen .im_chat {
  opacity: 0;
  pointer-events: none;
}

.live-watch-page .live_tool_bar_show_more_wrap .tool_content_left_pc {
  pointer-events: auto;
  width: 284px;
  height: 100%;
  padding: 16px 12px 20px;
  box-sizing: border-box;
  background: rgba(22, 20, 28, 0.82);
  backdrop-filter: blur(14px);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.live-watch-page .tool_content_left_pc {
  pointer-events: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: linear-gradient(180deg, rgba(48, 38, 34, 0.94), rgba(28, 22, 20, 0.98));
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.live-watch-page .gift_more_wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 10px 0;
  opacity: 0.35;
  max-height: 84px;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  background: rgba(52, 42, 38, 0.55);
  border-radius: 16px 16px 0 0;
  margin: 8px 8px 0;
}

.live-watch-page .live_tool_bar_show_more_wrap .gift_more_wrap.show {
  opacity: 1;
  max-height: 482px;
  background: rgba(58, 46, 40, 0.92);
}

.live-watch-page .gift_title_nav .title_wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.55);
}

.live-watch-page .gift_title_nav .gift_tab {
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}

.live-watch-page .gift_title_nav .gift_tab.is-active {
  color: #fff;
}

.live-watch-page .content_wrap_btn {
  align-self: flex-end;
  margin: 8px 12px 12px auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1) url("./icon_tool_gift.CEnXrBQQ.png") center / 22px no-repeat;
}

.live-watch-page .tool_act_wrap.tool_show_gift_more {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 12px 16px;
  margin-top: auto;
}

.live-watch-page .tool_act_wrap .act {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08) center / 20px no-repeat;
  cursor: pointer;
  font-size: 0;
  color: transparent;
}

.live-watch-page .tool_act_wrap .act.clean {
  background-image: linear-gradient(rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 0 0 0-1.41l-2.34-2.34a1 1 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
}

.live-watch-page .tool_act_wrap .act.share {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z'/%3E%3C/svg%3E");
}

.live-watch-page .live-volume-control .icon-button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z'/%3E%3C/svg%3E")
    center / 20px no-repeat;
  cursor: pointer;
}

.live-watch-page .live-volume-control .icon-button.muted {
  opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4 9.91 6.09 12 8.18V4z'/%3E%3C/svg%3E");
}

.live-watch-page .tool_content_right {
  pointer-events: auto;
  padding: 24px 16px 8px;
  order: -1;
}

.live-watch-page .number-of-viewers {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.live-watch-page .number-of-viewers .avatar-wrap img.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.live-watch-page .number-of-viewers .number {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  min-width: 2ch;
  text-align: center;
}

.live-watch-page .anchor-card .anchor-main {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.live-watch-page .anchor-card .left .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.live-watch-page .anchor-card .middle p {
  margin: 0;
  font-weight: 700;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-watch-page .anchor-card button.right {
  margin-left: auto;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.live-watch-page .anchor-card .follow {
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(90deg, #9d1dff, #ff526d);
  color: #fff;
}

.live-watch-page .anchor-metrics {
  width: 100%;
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.85;
}

.live-watch-page .im_wrap_chat {
  flex: 1 1 auto;
  min-height: 0;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

.live-watch-page #pscroll.im-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  pointer-events: auto;
}

.live-watch-page .im-section__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.live-watch-page .im_chat .msg_wrap {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.live-watch-page .im_chat .msgbox {
  flex: 1;
  height: 43px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 0 16px;
  font-size: 14px;
}

.live-watch-page .im_chat .btn_send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4d8d, #b347ff)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 24 24'%3E%3Cpath d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/%3E%3C/svg%3E")
    center / 18px no-repeat;
  cursor: pointer;
}

.live-watch-page .live-change-btn {
  position: absolute;
  right: calc(50% - min(364px, 34vw) / 2 - 52px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.live-watch-page .live-change-btn .icon-top,
.live-watch-page .live-change-btn .icon-bottom {
  width: 40px;
  height: 50px;
  background: url("./icon_live_change_btn.CS-Da2Fq.png") center / contain no-repeat;
  opacity: 0.8;
}

.live-watch-page .live-change-btn .icon-bottom {
  transform: rotate(180deg);
}

.live-watch-page .grid-item,
.live-watch-page .stream-tile,
.live-watch-page .video-container {
  width: 100%;
  height: 100%;
}

/* LiveMe: .video-player.player = full stage (~1066×642); layer ≈ 364px centered */
.live-watch-page .video-player.player {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: min(92vh, 642px);
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0f;
}

.live-watch-page .video-wing {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  display: block;
}

.live-watch-page .video-wing--ambient {
  left: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.live-watch-page .video-wing--left {
  left: 0;
  width: max(0px, calc((100% - min(364px, 34vw)) / 2));
}

.live-watch-page .video-wing--right {
  right: 0;
  width: max(0px, calc((100% - min(364px, 34vw)) / 2));
}

.live-watch-page .video-player__layer--ambient[priority="0"] {
  display: none;
}

.live-watch-page .video-player-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.live-watch-page .lm-video-player {
  position: relative;
  width: min(364px, 34vw);
  max-width: 420px;
  height: 100%;
  flex: 0 0 auto;
}

.live-watch-page .video-player__layer--main {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  position: relative;
}

.live-watch-page .video-player__layer--main .live__live_video_holder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.live-watch-page .video-player__layer--main .live_vide__holder,
.live-watch-page .video-player__layer--main .live_stage_main,
.live-watch-page .video-player__layer--main .filtvid.player,
.live-watch-page .video-player__layer--main .live_main_video_mount {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
}

.live-watch-page .lm-pc-video-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(160deg, #1a1a2e, #16213e 45%, #0f3460);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.live-watch-page .live_vide__holder.is-playing .lm-pc-video-poster {
  opacity: 0;
}

.live-watch-page .video-player__layer--main .klw-video-liveme {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #050505;
}

.live-watch-page .video-player__layer--main .live__live_video_holder,
.live-watch-page .video-player__layer--main .live_vide__holder {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
}

.live-watch-page .video-player__layer--main .klw-video-liveme,
.live-watch-page .video-player__layer--main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.live-watch-page .video-player__layer--main .klw-hint {
  display: none;
}

/* PK / dual inside narrow column (LiveMe split) */
.live-watch-page .video-player__layer--main .live_stage_active.live_stage_layout--dual {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
}

.live-watch-page .video-player__layer--main .live_stage_layout--dual .live_stage_main,
.live-watch-page .video-player__layer--main .live_stage_layout--dual .live_stage_remote_strip {
  width: 50%;
  height: 100%;
  min-height: 0;
}

.live-watch-page .video-player__layer--main .live_stage_layout--dual .live_stage_remote_strip {
  display: flex;
  flex-direction: column;
}

.live-watch-page .video-player__layer--main .live_stage_pane,
.live-watch-page .video-player__layer--main .live_stage_hls,
.live-watch-page .video-player__layer--main .live_stage_webrtc {
  max-height: none;
  height: 100%;
  min-height: 0;
}

.live-watch-page .klw-audience-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}

.live-watch-page .klw-audience-avatars {
  display: flex;
  align-items: center;
}

.live-watch-page .klw-audience-avatars span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-left: -8px;
  border: 2px solid #1a1a22;
  background: linear-gradient(135deg, #444, #222);
  display: inline-block;
}

.live-watch-page .klw-audience-avatars span:first-child {
  margin-left: 0;
}

.live-watch-page .tool_content_left_pc .liveme-gift-panel--embedded {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  color: #fff;
}

.live-watch-page .tool_content_left_pc .liveme-gift-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: none;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.live-watch-page .tool_content_left_pc .liveme-gift-grid::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.live-watch-page .tool_content_left_pc .liveme-gift-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}

.live-watch-page .gift_title_nav .gift_tab {
  text-transform: capitalize;
}

.live-watch-page .klw-pc-tool-footer {
  position: absolute;
  right: 24px;
  bottom: 20px;
  z-index: 16;
  display: flex;
  gap: 14px;
  align-items: center;
  pointer-events: auto;
}

.live-watch-page .klw-pc-tool-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.live-watch-page .klw-pc-tool-btn--gift {
  background: linear-gradient(135deg, #ff4d8d, #b347ff);
}

.live-watch-page .live_pk_overlay_bar {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

/* Mobile: fall back to TikTok shell */
@media (max-width: 768px) {
  .live-watch-page .page-liveroom--pc {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .live-watch-page .page-liveroom--mobile,
  .live-watch-page .liveme-native-root.klr-liveme-shell--mobile-only {
    display: none !important;
  }

  body.liveme-native-body.live_stream_tiktok_lock {
    overflow: hidden;
  }
}