/* 源一教育 H5 · 视频全屏兜底样式（2026-11-11）
 *
 * 1) .yy-fs-fix：requestFullscreen 被拒（iframe / 微信 / 老 WebView）时的 CSS 覆盖层
 *    用 100dvh 而不是 100vh，避免 iPhone Safari 底部工具栏把控制条顶出屏幕。
 * 2) :fullscreen / :-webkit-full-screen：真正进入元素全屏时同样铺满、去掉 16:9 比例和圆角。
 * 3) 全屏时控制条强制常显，避免 3.5 秒自动隐藏后用户找不到退出按钮。
 */
body.yy-fs-active .yy-player[data-yy-fs="1"],
.yy-player.yy-fs-fix {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2147483000 !important;
  background: #000 !important;
}

body.yy-fs-active .yy-player[data-yy-fs="1"] .yy-video,
.yy-player.yy-fs-fix .yy-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.yy-player:fullscreen,
.yy-player:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  background: #000 !important;
}

.yy-player:fullscreen .yy-video,
.yy-player:-webkit-full-screen .yy-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body.yy-fs-active .yy-player[data-yy-fs="1"] .yy-controls,
.yy-player.yy-fs-fix .yy-controls,
.yy-player:fullscreen .yy-controls,
.yy-player:-webkit-full-screen .yy-controls {
  /* 不强制常显：交给播放器自己的 3.5 秒自动隐藏，只补 iPhone 安全区 */
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
}

body.yy-fs-active .yy-player[data-yy-fs="1"] .yy-bar,
.yy-player.yy-fs-fix .yy-bar,
.yy-player:fullscreen .yy-bar,
.yy-player:-webkit-full-screen .yy-bar {
  padding-bottom: max(2px, env(safe-area-inset-bottom, 0px)) !important;
}

body.yy-fs-lock {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* iOS 横屏兜底：系统不允许「无手势」直接进原生全屏，给一个明确的按钮，点一次即进。 */
.yy-fs-hint {
  position: fixed !important;
  left: 50% !important;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  z-index: 2147483002 !important;
  margin: 0 !important;
  padding: 11px 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.38) !important;
  border-radius: 999px !important;
  background: rgba(0, 0, 0, 0.78) !important;
  color: #fff !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  font-family: inherit !important;
  letter-spacing: 0.02em !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-tap-highlight-color: transparent !important;
}
.yy-fs-hint:active { background: rgba(0, 0, 0, 0.9) !important; }
