.has-video-play-fallback.video-fallback-needs-position {
  position: relative;
}

.has-video-play-fallback > .video-play-fallback {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 24px;
  border: 0;
  border-radius: inherit;
  background:
    linear-gradient(rgba(17, 17, 17, 0.18), rgba(17, 17, 17, 0.38)),
    var(
        --video-fallback-poster,
        linear-gradient(135deg, #20242b 0%, #0d1117 100%)
      )
      center / cover no-repeat,
    #111111;
  color: #ffffff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition:
    opacity 180ms ease,
    visibility 0s linear 180ms;
  -webkit-backdrop-filter: blur(2px) saturate(72%);
  backdrop-filter: blur(2px) saturate(72%);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.has-video-play-fallback[data-video-playback-state="blocked"]
  > .video-play-fallback,
.has-video-play-fallback[data-video-playback-state="failed"]
  > .video-play-fallback,
.has-video-play-fallback[data-video-playback-state="error"]
  > .video-play-fallback,
.has-video-play-fallback[data-video-playback-state="paused"]
  > .video-play-fallback,
.has-video-play-fallback[data-video-playback-state="stalled"]
  > .video-play-fallback {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

/* After an iOS Safari user explicitly requests playback, leave the native
   controls reachable. They are the most reliable fallback in Low Power Mode
   and when Safari declines a scripted play() request. Keep source errors on
   the custom reload surface so users can retry the network request. */
.is-ios-safari
  .has-video-play-fallback[data-safari-manual-controls="true"]:not(
    [data-video-playback-state="error"]
  )
  > .video-play-fallback {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.video-play-fallback__icon {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: clamp(64px, 8vw, 84px);
  height: clamp(64px, 8vw, 84px);
  border: 0;
  border-radius: 50%;
  background: rgba(34, 34, 34, 0.62);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.video-play-fallback__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #ffffff;
  transform: translate(-38%, -50%);
}

.video-play-fallback__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.68);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  color: #ffffff;
  font-family:
    "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.has-video-play-fallback > .video-play-fallback:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -5px;
}

.hero-bg.has-video-play-fallback > .video-play-fallback {
  inset: auto clamp(16px, 3vw, 44px) clamp(16px, 3vw, 44px) auto;
  flex-direction: row;
  width: auto;
  height: auto;
  padding: 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.38);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.hero-bg.has-video-play-fallback
  > .video-play-fallback
  .video-play-fallback__icon {
  width: 48px;
  height: 48px;
}

.hero-bg.has-video-play-fallback
  > .video-play-fallback
  .video-play-fallback__icon::after {
  border-top-width: 7px;
  border-bottom-width: 7px;
  border-left-width: 12px;
}

.hero-bg.has-video-play-fallback
  > .video-play-fallback
  .video-play-fallback__label {
  min-height: 36px;
  padding: 0 12px 0 4px;
  background: transparent;
  box-shadow: none;
  font-size: 14px;
}

@media (max-width: 640px) {
  .has-video-play-fallback > .video-play-fallback {
    gap: 10px;
    padding: 16px;
  }

  .video-play-fallback__icon {
    width: 58px;
    height: 58px;
  }

  .video-play-fallback__icon::after {
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 14px;
  }

  .video-play-fallback__label {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
  }

  .hero-bg.has-video-play-fallback > .video-play-fallback {
    right: 16px;
    bottom: 16px;
  }

  .hero-bg.has-video-play-fallback
    > .video-play-fallback
    .video-play-fallback__label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .has-video-play-fallback > .video-play-fallback {
    transition: none;
  }
}
