/* BETTIX V2.3 — cinematic fullscreen only. Keeps the video uncropped (contain). */

#playerShellV2:fullscreen,
#playerShellV2:-webkit-full-screen,
#playerShellV2.v22-pseudo-fullscreen {
#playerShellV2.v23-pseudo-fullscreen {
  width: 100vw !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
  overflow: hidden !important;
  position: relative !important;
}

#playerShellV2:fullscreen #v22Stage,
#playerShellV2:-webkit-full-screen #v22Stage,
#playerShellV2.v22-pseudo-fullscreen #v22Stage {
#playerShellV2.v23-pseudo-fullscreen #v22Stage {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  flex: none !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  background: #000 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

#playerShellV2:fullscreen #v22Video,
#playerShellV2:-webkit-full-screen #v22Video,
#playerShellV2.v22-pseudo-fullscreen #v22Video,
#playerShellV2.v23-pseudo-fullscreen #v22Video,
#playerShellV2:fullscreen #v22Iframe,
#playerShellV2:-webkit-full-screen #v22Iframe,
#playerShellV2.v22-pseudo-fullscreen #v22Iframe {
#playerShellV2.v23-pseudo-fullscreen #v22Iframe {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background: #000 !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* Header becomes a floating cinematic overlay instead of a fixed black bar. */
#playerShellV2:fullscreen .v22-header,
#playerShellV2:-webkit-full-screen .v22-header,
#playerShellV2.v22-pseudo-fullscreen .v22-header {
#playerShellV2.v23-pseudo-fullscreen .v22-header {
  position: absolute !important;
  z-index: 40 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  min-height: 86px !important;
  padding: 18px 22px 28px !important;
  border: 0 !important;
  background: linear-gradient(180deg, rgba(0,0,0,.84) 0%, rgba(0,0,0,.44) 52%, transparent 100%) !important;
  transition: opacity .2s ease, transform .2s ease !important;
}

#playerShellV2:fullscreen .v22-title b,
#playerShellV2:-webkit-full-screen .v22-title b,
#playerShellV2.v22-pseudo-fullscreen .v22-title b {
#playerShellV2.v23-pseudo-fullscreen .v22-title b {
  font-size: 1.02rem !important;
}

#playerShellV2:fullscreen .v22-title span,
#playerShellV2:-webkit-full-screen .v22-title span,
#playerShellV2.v22-pseudo-fullscreen .v22-title span {
#playerShellV2.v23-pseudo-fullscreen .v22-title span {
  color: rgba(255,255,255,.68) !important;
}

/* Hide the permanent footer in fullscreen; servers remain accessible from the top icon. */
#playerShellV2:fullscreen .v22-footer,
#playerShellV2:-webkit-full-screen .v22-footer,
#playerShellV2.v22-pseudo-fullscreen .v22-footer {
#playerShellV2.v23-pseudo-fullscreen .v22-footer {
  display: none !important;
}

/* Transport controls float over the picture with a gradient, Netflix/Max-style. */
#playerShellV2:fullscreen .v22-transport,
#playerShellV2:-webkit-full-screen .v22-transport,
#playerShellV2.v22-pseudo-fullscreen .v22-transport {
#playerShellV2.v23-pseudo-fullscreen .v22-transport {
  position: absolute !important;
  z-index: 42 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  padding: 78px 22px 20px !important;
  border: 0 !important;
  background: linear-gradient(0deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.52) 46%, transparent 100%) !important;
  transition: opacity .2s ease, transform .2s ease !important;
}

#playerShellV2:fullscreen .v22-progress,
#playerShellV2:-webkit-full-screen .v22-progress,
#playerShellV2.v22-pseudo-fullscreen .v22-progress {
#playerShellV2.v23-pseudo-fullscreen .v22-progress {
  gap: 12px !important;
  color: rgba(255,255,255,.9) !important;
}

#playerShellV2:fullscreen .v22-progress input,
#playerShellV2:-webkit-full-screen .v22-progress input,
#playerShellV2.v22-pseudo-fullscreen .v22-progress input {
#playerShellV2.v23-pseudo-fullscreen .v22-progress input {
  height: 18px !important;
}

#playerShellV2:fullscreen .v22-controls,
#playerShellV2:-webkit-full-screen .v22-controls,
#playerShellV2.v22-pseudo-fullscreen .v22-controls {
#playerShellV2.v23-pseudo-fullscreen .v22-controls {
  margin-top: 10px !important;
}

#playerShellV2:fullscreen .v22-control,
#playerShellV2:-webkit-full-screen .v22-control,
#playerShellV2.v22-pseudo-fullscreen .v22-control {
#playerShellV2.v23-pseudo-fullscreen .v22-control {
  background: rgba(12,13,16,.72) !important;
  border-color: rgba(255,255,255,.16) !important;
  backdrop-filter: blur(10px) !important;
}

#playerShellV2:fullscreen .v22-main-play,
#playerShellV2:-webkit-full-screen .v22-main-play,
#playerShellV2.v22-pseudo-fullscreen .v22-main-play {
#playerShellV2.v23-pseudo-fullscreen .v22-main-play {
  background: #fff !important;
  color: #050505 !important;
  border-color: #fff !important;
}

/* Server/settings/episodes sheets become overlays in fullscreen. */
#playerShellV2:fullscreen .v22-sheet,
#playerShellV2:-webkit-full-screen .v22-sheet,
#playerShellV2.v22-pseudo-fullscreen .v22-sheet {
#playerShellV2.v23-pseudo-fullscreen .v22-sheet {
  position: absolute !important;
  z-index: 60 !important;
  top: 86px !important;
  right: 18px !important;
  bottom: 105px !important;
  width: min(380px, calc(100vw - 36px)) !important;
  max-height: none !important;
  overflow: auto !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 14px !important;
  background: rgba(16,18,22,.94) !important;
  backdrop-filter: blur(18px) !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.55) !important;
}

/* Auto-hide chrome while playing. */
#playerShellV2.v23-controls-hidden:fullscreen,
#playerShellV2.v23-controls-hidden:-webkit-full-screen,
#playerShellV2.v23-controls-hidden.v22-pseudo-fullscreen,
#playerShellV2.v23-controls-hidden.v23-pseudo-fullscreen {
  cursor: none !important;
}

#playerShellV2.v23-controls-hidden:fullscreen .v22-header,
#playerShellV2.v23-controls-hidden:-webkit-full-screen .v22-header,
#playerShellV2.v23-controls-hidden.v22-pseudo-fullscreen .v22-header,
#playerShellV2.v23-controls-hidden.v23-pseudo-fullscreen .v22-header {
  opacity: 0 !important;
  transform: translateY(-12px) !important;
  pointer-events: none !important;
}

#playerShellV2.v23-controls-hidden:fullscreen .v22-transport,
#playerShellV2.v23-controls-hidden:-webkit-full-screen .v22-transport,
#playerShellV2.v23-controls-hidden.v22-pseudo-fullscreen .v22-transport,
#playerShellV2.v23-controls-hidden.v23-pseudo-fullscreen .v22-transport {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  pointer-events: none !important;
}

/* Never hide chrome while a sheet is open. */
#playerShellV2.v23-sheet-open .v22-header,
#playerShellV2.v23-sheet-open .v22-transport {
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

body.v22-fs-body,
body.v23-pseudo-body {
  overflow: hidden !important;
}

@media (max-width: 700px) {
  #playerShellV2:fullscreen #v22Stage,
  #playerShellV2:-webkit-full-screen #v22Stage,
  #playerShellV2.v22-pseudo-fullscreen #v22Stage {
  #playerShellV2.v23-pseudo-fullscreen #v22Stage {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    flex: none !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
  }

  #playerShellV2:fullscreen #v22Video,
  #playerShellV2:-webkit-full-screen #v22Video,
  #playerShellV2.v22-pseudo-fullscreen #v22Video,
  #playerShellV2.v23-pseudo-fullscreen #v22Video,
  #playerShellV2:fullscreen #v22Iframe,
  #playerShellV2:-webkit-full-screen #v22Iframe,
  #playerShellV2.v22-pseudo-fullscreen #v22Iframe {
  #playerShellV2.v23-pseudo-fullscreen #v22Iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  #playerShellV2:fullscreen .v22-header,
  #playerShellV2:-webkit-full-screen .v22-header,
  #playerShellV2.v22-pseudo-fullscreen .v22-header {
  #playerShellV2.v23-pseudo-fullscreen .v22-header {
    min-height: 68px !important;
    padding: 10px 12px 22px !important;
  }

  #playerShellV2:fullscreen .v22-transport,
  #playerShellV2:-webkit-full-screen .v22-transport,
  #playerShellV2.v22-pseudo-fullscreen .v22-transport {
  #playerShellV2.v23-pseudo-fullscreen .v22-transport {
    padding: 58px 12px max(12px, env(safe-area-inset-bottom)) !important;
  }

  #playerShellV2:fullscreen .v22-sheet,
  #playerShellV2:-webkit-full-screen .v22-sheet,
  #playerShellV2.v22-pseudo-fullscreen .v22-sheet {
  #playerShellV2.v23-pseudo-fullscreen .v22-sheet {
    top: auto !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    max-height: 72dvh !important;
  }
}
