/* These rules apply only when the iPhone player script identifies iOS. */
@media (max-width: 900px) {
  html.moviehub-iphone body.player-view {
    inset: auto 0 auto;
    top: var(--iphone-player-top, 0px);
    width: 100%;
    height: var(--iphone-player-height, 100vh);
    height: var(--iphone-player-height, 100dvh);
    min-height: 0;
    background: #000;
  }
  html.moviehub-iphone body.player-view.content-view .container {
    position: absolute;
    inset: 0;
    height: 100%;
    min-height: 0;
    background: #000;
  }
  html.moviehub-iphone body.player-view .player-section .vjs-tech {
    object-fit: contain !important;
    object-position: center;
  }
  html.moviehub-iphone body.player-view .player-toolbar {
    min-height: 58px;
    padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left));
    background: transparent;
  }
  html.moviehub-iphone body.player-view .player-back-button { width: 44px; height: 44px; font-size: 24px; }
  html.moviehub-iphone body.player-view .player-top-title { right: 58px; left: 58px; font-size: 14px; font-weight: 500; }
  html.moviehub-iphone body.player-view .player-idle-info,
  html.moviehub-iphone body.player-view .player-info-backdrop { display: none; }
  html.moviehub-iphone body.player-view .player-controls {
    min-height: 100px;
    padding: 0 max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: transparent;
  }
  html.moviehub-iphone body.player-view .player-seek-slider {
    width: calc(100% - 66px);
    height: 24px;
    margin: 0 0 6px auto;
    background-size: 100% 4px;
    background-repeat: no-repeat;
    background-position: center;
    touch-action: pan-x;
  }
  html.moviehub-iphone body.player-view .player-control-row { min-height: 44px; justify-content: center; gap: 0; }
  html.moviehub-iphone body.player-view .player-control-left,
  html.moviehub-iphone body.player-view .player-control-right { display: contents; }
  html.moviehub-iphone body.player-view #player-mute-toggle,
  html.moviehub-iphone body.player-view .player-control-right > .player-control-button { width: 44px; min-width: 44px; height: 44px; font-size: 18px; }
  html.moviehub-iphone body.player-view .player-time { bottom: calc(100% + 10px); font-size: 12px; }
  html.moviehub-iphone body.player-view .player-time-divider,
  html.moviehub-iphone body.player-view #player-total-time { display: none; }
  html.moviehub-iphone body.player-view .player-center-controls {
    position: fixed;
    z-index: 8;
    top: calc(var(--iphone-player-top, 0px) + var(--iphone-player-height, 100dvh) / 2);
    left: 50%;
    display: flex;
    align-items: center;
    gap: clamp(20px, 8vw, 38px);
    transform: translate(-50%, -50%);
  }
  html.moviehub-iphone body.player-view .player-center-controls .player-control-button { width: 52px; height: 58px; font-size: 27px; }
  html.moviehub-iphone body.player-view .player-center-controls .player-center-toggle { order: 2; width: 70px; height: 70px; border: 0; background: transparent; box-shadow: none; font-size: 52px; }
  html.moviehub-iphone body.player-view .player-center-skip-back { order: 1; }
  html.moviehub-iphone body.player-view .player-center-skip-forward { order: 3; }
  html.moviehub-iphone body.player-view .player-section .vjs-text-track-display { display: none !important; }
  html.moviehub-iphone body.player-view .iphone-subtitle-overlay {
    position: absolute;
    z-index: 4;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    display: none;
    overflow: hidden;
    color: #fff;
    text-align: center;
    white-space: pre-line;
    overflow-wrap: anywhere;
    line-height: 1.3;
    pointer-events: none;
  }
  html.moviehub-iphone body.player-view .iphone-subtitle-overlay.is-visible { display: block; }
  html.moviehub-iphone body.player-view .iphone-subtitle-overlay span { -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  html.moviehub-iphone body.player-view .player-section.iphone-native-fullscreen .iphone-subtitle-overlay { display: none !important; }
}
