/* ===== 世界杯直播弹幕 & 聊天室 ===== */

body.card #archive {
  padding-top: 3.875rem;
}

body.world-cup-live-body #body > .container.pt125 > .row > .sp_breadcrumb_nav {
  display: none !important;
}

body.world-cup-live-body #body > .container.pt125 > .row > .world-cup-live-page {
  flex: 0 0 100%;
  max-width: 100%;
  margin-top: 1.5rem;
}

.world-cup-live-page .world-cup-live-container {
  margin-top: 1.25rem;
}

.world-cup-live-page.container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 外层容器：position:relative 建立包含块，允许 overflow visible 避免裁剪 LIVE 徽标 */
.world-cup-live-player-block {
  position: relative;
  overflow: visible !important;
}
/* 播放器容器裁剪弹幕，防止溢出到右侧边缘 */
.wc-player-outer,
.wc-player-outer .world-cup-live-dplayer,
.wc-player-outer .dplayer,
.wc-player-outer .dplayer-video-wrap,
.wc-player-outer .dplayer-danmaku {
  overflow: hidden !important;
}

/* LIVE 徽标信息栏 */
.wc-player-infobar {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 0.5rem;
  flex-wrap: nowrap;
}
.wc-live-badge-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.wc-live-badge {
  background: #FF0000;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  padding: 0 8px;
  border-radius: 4px;
  height: 24px;
  line-height: 24px;
  display: inline-block;
}
.wc-viewer-count {
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
}
.wc-match-title {
  color: #fff;
  font-size: 14px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* 弹幕始终流动，不随视频暂停而冻结 */
.wc-player-outer .dplayer-danmaku-right,
.wc-player-outer .dplayer-danmaku-top,
.wc-player-outer .dplayer-danmaku-bottom {
  animation-play-state: running !important;
}

/* 播放器外层包装 */
.wc-player-outer {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0E0E0E;
  min-height: 220px;
  aspect-ratio: 16 / 9;
}

/* 直播状态覆盖层 (未开始/已结束) */
/* z-index:2：覆盖视频画面即可，低于导航栏，避免 H5 压住 logo/顶部 bar */
.wc-live-status-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #0E0E0E;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  pointer-events: none;
  transition: background-image 0.5s ease;
}
/* 背景图切换动画：用伪元素交叉淡入 */
.wc-live-status-overlay::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}
.wc-live-status-overlay.bg-fade-in::before {
  opacity: 1;
}
/* 背景图上叠 70% 黑色蒙版 */
.wc-live-status-overlay::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
/* 文字内容在蒙版之上 */
.wc-live-status-tip,
.wc-live-status-title,
.wc-live-status-desc {
  position: relative;
  z-index: 1;
}
.wc-live-status-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.5);
  border: 1px solid #FF9000;
  border-radius: 5px;
  padding: 4px 12px 6px;
  color: #F7931D;
  font-size: 16px;
  font-weight: 450;
  pointer-events: none;
}
.wc-live-status-title {
  color: #FF9000;
  font-size: 32px;
  font-weight: 600;
}
.wc-live-status-desc {
  color: #fff;
  font-size: 16px;
}

/* 确保DPlayer控制栏显示在状态覆盖层上方 */
.wc-player-outer .dplayer-controller {
  z-index: 20 !important;
}
/* 全屏按钮垂直居中对齐弹幕控制栏 */
.wc-player-outer .dplayer-icons-right {
  display: flex !important;
  align-items: center !important;
  top: 0 !important;
  bottom: 0 !important;
  height: auto !important;
}

/* DPlayer 弹幕控件样式对齐 Figma */
/* comment-box：弹按钮 + 统一输入容器（Figma Frame 148: gap 15px）*/
/* pointer-events:none 防止 padding 区域遮挡左侧播放/音量按钮的点击 */
/* z-index:5 确保「弹」渲染在 icons-left（直播）上层 */
.wc-player-outer .dplayer-comment-box {
  display: flex !important;
  align-items: center !important;
  gap: 15px !important;
  z-index: 5 !important;
  padding-left: 162px !important;
  /* 只保留全屏按钮（约44px）的位置，其余已隐藏 */
  padding-right: 50px !important;
  overflow: visible !important;
  height: 44px !important;
  pointer-events: none !important;
}
/* 子元素恢复可点击 */
.wc-player-outer .dplayer-comment-box > *,
.wc-player-outer .wc-danmu-input-wrap > * {
  pointer-events: auto !important;
}
.wc-player-outer .wc-danmu-input-wrap {
  pointer-events: auto !important;
}
/* 隐藏右侧控制栏自带的弹幕切换按钮（用我们自己的） */
.wc-player-outer .dplayer-comment-icon {
  display: none !important;
}
/* 隐藏多余控件：设置齿轮、弹幕颜色齿轮、画中画、网页全屏 */
.wc-player-outer .dplayer-setting,
.wc-player-outer .dplayer-setting-icon,
.wc-player-outer .dplayer-comment-setting-icon,
.wc-player-outer .dplayer-comment-setting-box,
.wc-player-outer .dplayer-full-in-icon,
.wc-player-outer .dplayer-web-fullscreen-icon {
  display: none !important;
}
/* 「弹」切换按钮：图片开关，ON/OFF 切换 img src */
.wc-player-outer .wc-danmu-toggle-btn {
  flex-shrink: 0;
  width: 64px;
  height: 36px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wc-player-outer .wc-danmu-toggle-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* 非直播状态：弹幕控件整体禁用 */
.wc-player-outer.danmu-disabled .wc-danmu-toggle-btn {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
.wc-player-outer.danmu-disabled .dplayer-comment-input {
  color: rgba(255,255,255,0.3) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
.wc-player-outer.danmu-disabled .dplayer-comment-input::placeholder {
  color: rgba(255,255,255,0.25) !important;
}
.wc-player-outer.danmu-disabled .dplayer-send-icon {
  opacity: 0.3 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
.wc-player-outer.danmu-disabled .wc-danmu-input-wrap {
  background: rgba(255,255,255,0.15) !important;
}
/* 输入框 + 发送按钮统一容器（Figma Frame 146: 274×36px, rgba(255,255,255,0.4)）*/
.wc-player-outer .wc-danmu-input-wrap {
  flex: 1 !important;
  height: 36px !important;
  position: relative !important;
  background: rgba(255,255,255,0.4) !important;
  border-radius: 4px !important;
  overflow: hidden !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
}
/* 弹幕输入框：全宽，右侧留 60px 给发送按钮 */
.wc-player-outer .dplayer-comment-input {
  flex: 1 !important;
  background: transparent !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  height: 36px !important;
  padding: 0 68px 0 11px !important;
  outline: none !important;
  min-width: 0 !important;
  position: relative !important;
  z-index: 1 !important;
}
.wc-player-outer .dplayer-comment-input::placeholder {
  color: rgba(255,255,255,0.8) !important;
  font-size: 12px !important;
}
/* 发送按钮：在容器右侧叠加（Figma: 60×36px, #FF9000, 文字 #000, fontSize 15）*/
.wc-player-outer .dplayer-send-icon {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  flex-shrink: 0 !important;
  background: #FF9000 !important;
  color: #000 !important;
  border: none !important;
  border-radius: 0 4px 4px 0 !important;
  height: 36px !important;
  width: 60px !important;
  padding: 0 !important;
  cursor: pointer !important;
  z-index: 2 !important;
}
.wc-player-outer .dplayer-send-icon:hover {
  background: #e0820f !important;
}
.wc-player-outer .dplayer-send-icon::before,
.wc-player-outer .dplayer-send-icon::after {
  display: none !important;
}
.wc-player-outer .dplayer-send-icon .dplayer-icon-content {
  font-size: 15px !important;
  font-weight: 600 !important;
  width: 60px !important;
  height: 36px !important;
  line-height: 36px !important;
  display: block !important;
  text-align: center !important;
}
/* PC 弹幕文字样式（Figma: 20px, #FFF, PingFang SC, 400） */
.wc-player-outer .dplayer-danmaku-item {
  font-family: "PingFang SC", sans-serif !important;
  font-size: 20px !important;
  font-weight: 400 !important;
  font-style: normal !important;
  color: #FFFFFF !important;
  text-align: center !important;
  text-shadow:
    1px 1px 2px rgba(0,0,0,0.8),
    -1px -1px 2px rgba(0,0,0,0.8) !important;
}
/* 自己发送的弹幕：DPlayer 将 border 属性渲染到内层 span */
.wc-player-outer .dplayer-danmaku-item span[style*="border"] {
  border-radius: 5px !important;
  background: rgba(0,0,0,0.5) !important;
  padding: 2px 8px !important;
  display: inline-block;
}

/* 聊天室 */
.wc-chat-room {
  background: #0E0E0E;
  border-radius: 8px;
  margin-top: 0.75rem;
  overflow: hidden;
}
.wc-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
.wc-chat-title {
  color: #FF9000;
  font-size: 24px;
  font-weight: 600;
}
.wc-chat-history-btn {
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  user-select: none;
}
.wc-chat-divider {
  height: 1px;
  background: #3E3E3E;
  margin: 12px 0 0;
}
.wc-chat-messages {
  padding: 12px 20px;
  height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}
.wc-chat-messages::-webkit-scrollbar {
  width: 4px;
}
.wc-chat-messages::-webkit-scrollbar-thumb {
  background: #3E3E3E;
  border-radius: 2px;
}
.wc-chat-msg {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 20px;
  line-height: 1.5;
  flex-wrap: wrap;
}
.wc-chat-msg-nick {
  color: #FF9000;
  flex-shrink: 0;
  font-weight: 500;
}
.wc-chat-msg-text {
  color: #fff;
  word-break: break-all;
}
.wc-chat-input-bar {
  padding: 12px 20px;
  border-top: 1px solid #3E3E3E;
}
.wc-chat-input-wrap {
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  height: 60px;
  min-width: 0;
  padding: 6px 6px 6px 0;
}
.wc-chat-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: 19px;
  opacity: 0.7;
}
.wc-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 20px;
  padding: 0 8px;
  min-width: 0;
}
.wc-chat-input::placeholder {
  color: rgba(255,255,255,0.3);
}
.wc-chat-count {
  color: rgba(255,255,255,0.3);
  font-size: 20px;
  padding: 0 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.wc-chat-send-btn {
  background: #FF9000;
  color: #242424;
  border: none;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 500;
  height: 48px;
  padding: 0 18px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}
.wc-chat-send-btn:hover {
  background: #e0820f;
}
/* 未登录时输入栏整体替换为登录提示层 */
.wc-chat-guest-bar {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 60px;
}
.wc-chat-guest-tip {
  color: rgba(255,255,255,0.4);
  font-size: 20px;
}
.wc-chat-guest-login-btn {
  background: #FF9000;
  color: #242424;
  border: none;
  border-radius: 6px;
  font-size: 20px;
  font-weight: 500;
  height: 48px;
  padding: 0 24px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.wc-chat-guest-login-btn:hover {
  background: #e0820f;
}

/* ===== H5 适配 (≤767px，画布 375px 1×) ===== */
@media (max-width: 767px) {

  /* H5：外层块裁剪，防止 overlay 背景图逃出播放器区域压住顶部导航 */
  .world-cup-live-player-block {
    overflow: hidden !important;
  }
  /* H5：确保播放器及 overlay 不超出自身包含块 */
  .wc-player-outer {
    overflow: hidden !important;
    isolation: isolate;
  }

  /* LIVE 行 H5：对齐 Figma H5（badge 62×24px/12px，信息文字 14px） */
  .wc-live-badge {
    font-size: 12px;
    height: 24px;
    line-height: 24px;
    padding: 0 10px;
  }
  .wc-viewer-count,
  .wc-match-title {
    font-size: 14px;
  }
  .wc-player-infobar {
    margin-bottom: 0.35rem;
    gap: 7px;
  }

  /* 直播状态覆盖层：大标题 17px，副标题 9px（Figma 1× 实测） */
  .wc-live-status-tip {
    font-size: 12px;
    padding: 3px 8px 4px;
    gap: 4px;
  }
  .wc-live-status-title { font-size: 17px; }
  .wc-live-status-desc { font-size: 9px; }

  /* 聊天室 H5：对齐 Figma H5 设计稿（353×320px） */
  .wc-chat-room {
    border-radius: 4px;
  }
  .wc-chat-header {
    padding: 8px 14px 0;
  }
  .wc-chat-title { font-size: 12px; }
  .wc-chat-history-btn { font-size: 12px; }
  .wc-chat-divider { margin: 6px 0 0; }
  .wc-chat-messages {
    height: 200px;
    padding: 6px 14px;
    gap: 2px;
  }
  .wc-chat-msg { font-size: 12px; }
  .wc-chat-msg-nick { font-size: 12px; }
  .wc-chat-msg-text { font-size: 12px; }
  .wc-chat-input-bar {
    padding: 6px 14px;
  }
  .wc-chat-guest-bar {
    height: 30px;
    gap: 8px;
  }
  .wc-chat-guest-tip { font-size: 10px; }
  .wc-chat-guest-login-btn {
    font-size: 10px;
    height: 24px;
    padding: 0 12px;
  }
  .wc-chat-input-wrap {
    border-radius: 4px;
    border-color: rgba(255,255,255,0.3);
    height: 30px;
    padding: 3px 3px 3px 0;
  }
  .wc-chat-icon {
    width: 10px;
    height: 10px;
    margin-left: 10px;
  }
  .wc-chat-input { font-size: 10px; }
  .wc-chat-input::placeholder { font-size: 10px; }
  .wc-chat-count {
    font-size: 10px;
    padding: 0 4px;
  }
  .wc-chat-send-btn {
    border-radius: 3px;
    height: 24px;
    padding: 0 8px;
    font-size: 10px;
    margin-left: 0;
  }

  /* DPlayer 弹幕控件 H5 适配
     padding-left:75px 与参考站一致；toggle 有意与 icons-left 重叠，
     靠 pointer-events:none/auto 穿透，保证左侧按钮可点击 */
  .wc-player-outer .dplayer-comment-box {
    gap: 8px !important;
    height: 36px !important;
    padding-left: 75px !important;
    padding-right: 50px !important;
  }
  /* H5 全屏按钮：与弹幕控制栏垂直居中对齐 */
  .wc-player-outer .dplayer-icons-right {
    top: 0 !important;
    bottom: 0 !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
  }
  .wc-player-outer .dplayer-full-icon {
    align-self: center !important;
    transform: translateY(3px) !important;
  }
  /* H5 弹按钮：图片开关，H5 尺寸适配 */
  .wc-player-outer .wc-danmu-toggle-btn {
    width: 44px !important;
    height: 26px !important;
    border: none !important;
  }
  .wc-player-outer .wc-danmu-input-wrap {
    height: 26px !important;
    border-radius: 3px !important;
  }
  .wc-player-outer .dplayer-comment-input {
    height: 26px !important;
    font-size: 11px !important;
    padding: 0 46px 0 8px !important;
  }
  .wc-player-outer .dplayer-comment-input::placeholder {
    font-size: 11px !important;
  }
  /* H5 发送按钮：尺寸缩小适配窄播放器 */
  .wc-player-outer .dplayer-send-icon {
    height: 26px !important;
    width: 40px !important;
    border-radius: 0 3px 3px 0 !important;
  }
  .wc-player-outer .dplayer-send-icon .dplayer-icon-content {
    font-size: 11px !important;
    width: 40px !important;
    height: 26px !important;
    line-height: 26px !important;
  }
  /* H5 聊天：昵称橙色（与PC一致），消息文字白色（UI图要求） */
  .wc-chat-msg-nick {
    color: #FF9000 !important;
  }
  .wc-chat-msg-text {
    color: #FFFFFF !important;
  }

  /* H5 弹幕文字（Figma: 14px, #FFF, PingFang SC, 400） */
  .wc-player-outer .dplayer-danmaku-item {
    font-size: 14px !important;
    font-weight: 400 !important;
    text-shadow:
      1px 1px 2px rgba(0,0,0,0.9),
      -1px -1px 2px rgba(0,0,0,0.9) !important;
  }
  /* H5 自己发送的弹幕高亮框 */
  .wc-player-outer .dplayer-danmaku-item span[style*="border"] {
    border-radius: 3px !important;
    background: rgba(0,0,0,0.6) !important;
    padding: 1px 6px !important;
    border-color: rgba(255,144,0,0.8) !important;
  }
}

/* 直播页登录弹窗：独立 class，避免 ai/index.css 的 body:has(.login_dialog) 影响底部 foot-menu */
.wc-live-login-dialog {
  position: fixed;
  inset: 0;
  z-index: 900;
  background-color: rgba(0, 0, 0, 0.7);
}

.wc-live-login-dialog img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.wc-live-login-dialog .logo {
  width: 5rem;
}

.wc-live-login-dialog .slogan {
  font-size: 1.625rem;
  font-weight: 600;
  margin-top: 0.625rem;
  margin-bottom: 1.25rem;
}

.wc-live-login-dialog .btn_group {
  width: 100%;
  display: flex;
  justify-content: space-between;
  column-gap: 1.25rem;
  color: #fff;
  font-weight: 600;
}

.wc-live-login-dialog .btn_group .btn {
  flex: 1;
  background-color: #1abc9d;
  cursor: pointer;
  text-align: center;
  line-height: 3rem;
  border-radius: 0.5rem;
  font-size: 1.125rem;
}

.wc-live-login-dialog .login_close_btn {
  margin: auto;
  width: 2.625rem;
  height: 2.625rem;
  cursor: pointer;
  margin-bottom: 1.875rem;
}
