/* Ensure html/body don't add extra space that pushes the player offscreen */
  html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .my-video-dimensions.vjs-fluid {
    padding-top: 56.25%;
  }

  .video-container {
    position: relative;
    margin: 0 !important;
    /* Constrain player height to viewport minus footer height so it never overflows the screen */
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    box-sizing: border-box;
  }

  .video-container video {
    width: 100%;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
  }

  /* Ensure video.js player also respects viewport height */
  .video-container .video-js {
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
  }

  .video-js .vjs-big-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .preroll-active .vjs-play-progress {
    background: goldenrod;
  }

  .preroll-active .vjs-slider {
    background: gold;
  }

  .preroll-active .vjs-progress-holder .vjs-load-progress div {
    background: goldenrod !important;
  }

  /* Styles for the ad time display */
  #ad-time {
    position: absolute;
    bottom: 35px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
  }

  #skip-button {
    position: absolute;
    bottom: 35px;
    right: 10px;
    background-color: #ffd;
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
  }

  /* Fullscreen mode resets: restore full viewport height in fullscreen */
  .vjs-fullscreen,
  .vjs-fullscreen video,
  .vjs-fullscreen .vjs-tech,
  .vjs-fullscreen-active .video-container,
  .vjs-fullscreen-active .video-container video,
  .vjs-fullscreen-active .video-container .video-js {
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }

  :fullscreen,
  :fullscreen video,
  :fullscreen .video-js,
  :fullscreen .vjs-tech {
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }

  :-webkit-full-screen,
  :-webkit-full-screen video,
  :-webkit-full-screen .video-js,
  :-webkit-full-screen .vjs-tech {
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }

  :-moz-full-screen,
  :-moz-full-screen video,
  :-moz-full-screen .video-js,
  :-moz-full-screen .vjs-tech {
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }

  :-ms-fullscreen,
  :-ms-fullscreen video,
  :-ms-fullscreen .video-js,
  :-ms-fullscreen .vjs-tech {
    max-height: 100vh !important;
    max-height: 100dvh !important;
  }