/* Player page: reuse the home navigation, then give playback its own clear controls. */
body.player-view #content { animation: player-view-enter .3s ease both; }
@keyframes player-view-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* The shared header follows the same spacing and pill navigation as Home. */
body.player-view.content-view .container {
  width: min(100% - 48px, 1500px);
  max-width: 1500px;
  margin: 0 auto;
  padding: 0;
}
body.player-view.content-view .site-header {
  position: relative;
  inset: auto;
  top: auto;
  z-index: 300;
  width: auto;
  margin: 0;
  padding: 16px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
body.player-view.content-view .header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 48px;
  flex-wrap: nowrap;
}
body.player-view.content-view .logo {
  order: 1;
  flex: 0 0 auto;
  margin: 0;
  color: var(--text-primary);
  font-size: 21px;
  white-space: nowrap;
}
body.player-view.content-view .site-links {
  order: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 5px;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(9,14,10,.62);
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
  backdrop-filter: blur(18px);
}
body.player-view.content-view .site-links button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font: 700 12px Inter,system-ui,sans-serif;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
body.player-view.content-view .site-links button:hover { color: var(--text-primary); background: rgba(255,255,255,.08); transform: translateY(-1px); }
body.player-view.content-view .site-links button.active { color: #101216; background: #f5f5f5; }
body.player-view.content-view .search-container,
body.player-view.content-view .header-menu-container { display: none !important; }
body.player-view .mobile-home-nav,
body.player-view .site-footer { display: none !important; }
body.player-view .theme-switcher {
  position: fixed !important;
  inset: auto 0 0 auto !important;
  z-index: 0 !important;
  display: block !important;
  width: 0;
  height: 0;
  gap: 0;
}
body.player-view .theme-switcher > .mode-toggle-btn,
body.player-view .theme-switcher > .theme-toggle-btn { display: none !important; }
body.player-view .theme-switcher .color-picker {
  position: fixed;
  top: 72px;
  right: 20px;
  bottom: auto;
  left: auto;
  z-index: 1001;
  max-width: min(310px,calc(100vw - 24px));
}

/* Separate the title and source controls into a single, readable tool strip. */
body.player-view #content {
  width: min(100%, 1360px);
  margin-inline: auto;
  padding: 0 0 42px;
}
body.player-view .player-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  margin: 0 0 16px !important;
  padding: 10px 12px;
  border: 1px solid var(--dark-border);
  border-radius: 18px;
  background: color-mix(in srgb, var(--dark-card) 86%, transparent);
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  backdrop-filter: blur(16px);
}
body.player-view .player-toolbar .toolbar-controls { display: flex; align-items: center; gap: 8px; min-width: 0; }
body.player-view .player-toolbar .back-btn {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  margin: 0 !important;
  padding: 0 15px !important;
  border: 1px solid var(--dark-border) !important;
  border-radius: 13px !important;
  background: var(--dark-bg) !important;
  color: var(--text-primary) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
body.player-view .player-toolbar .back-btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb,var(--primary) 55%,var(--dark-border)) !important; }
body.player-view .player-toolbar .media-info-right { display: flex; flex-direction: column; min-width: 0; margin-left: auto; text-align: right; }
body.player-view .player-toolbar .media-title { overflow: hidden; color: var(--text-primary); font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
body.player-view .player-toolbar .media-detail { color: var(--text-muted); font-size: 12px; }
body.player-view .quality-selector {
  position: static !important;
  inset: auto !important;
  z-index: auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  max-width: 100%;
  padding: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  mask-image: none;
  -webkit-mask-image: none;
}
body.player-view .quality-selector .quality-btn {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 44px;
  padding: 0 14px !important;
  border: 1px solid var(--dark-border) !important;
  border-radius: 13px !important;
  background: var(--dark-card) !important;
  color: var(--text-secondary) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  white-space: nowrap;
}
body.player-view .quality-selector .quality-btn:hover:not(.active) { border-color: color-mix(in srgb,var(--primary) 40%,var(--dark-border)) !important; color: var(--text-primary) !important; }
body.player-view .quality-selector .quality-btn.active { border-color: var(--primary) !important; background: var(--primary) !important; color: #101216 !important; box-shadow: 0 5px 18px color-mix(in srgb,var(--primary) 20%,transparent); }
body.player-view .player-toolbar .caption-settings-btn {
  position: relative !important;
  display: inline-flex !important;
  flex: 0 0 auto;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px;
  min-width: 64px;
  min-height: 44px;
  margin: 0 !important;
  padding: 0 13px !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--dark-border) !important;
  border-radius: 13px !important;
  background: var(--dark-card) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
body.player-view .player-toolbar .caption-settings-btn:hover,
body.player-view .player-toolbar .caption-settings-btn[aria-expanded="true"] {
  color: var(--primary) !important;
  border-color: color-mix(in srgb, var(--primary) 45%, var(--dark-border)) !important;
  background: color-mix(in srgb, var(--primary) 12%, var(--dark-card)) !important;
}
body.player-view .player-toolbar .caption-settings-btn .caption-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #111;
  border: 2px solid var(--dark-bg);
  border-radius: 50%;
  background: var(--primary);
  font-size: 9px;
  font-weight: 850;
}

/* Keep the media frame proportional and the file list completely hidden until requested. */
body.player-view .player-section {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 1360px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 16px !important;
  overflow: hidden;
  border: 1px solid color-mix(in srgb,var(--primary) 24%,var(--dark-border));
  border-radius: 16px;
  background: #050706;
  box-shadow: 0 24px 70px rgba(0,0,0,.34), 0 0 0 1px color-mix(in srgb,var(--primary) 5%,transparent);
}
body.player-view .player-section .video-js {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto;
  padding-top: 0 !important;
  border-radius: 0;
}
body.player-view .player-source-empty {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 24px;
  color: rgba(255,255,255,.82);
  text-align: center;
  background: radial-gradient(ellipse at 50% 42%, #20262a, #080a0b 72%);
}
body.player-view .player-source-empty i { color: var(--primary); font-size: 26px; }
body.player-view .player-source-empty p { max-width: 420px; margin: 0; color: rgba(255,255,255,.62); }

/* Subtitle settings float above playback without dimming or blocking the film. */
body.player-view .menu-overlay { display: none !important; }
body.player-view .enhanced-subtitle-menu {
  position: fixed;
  top: clamp(72px, 12vh, 132px);
  right: clamp(12px, 4vw, 64px);
  left: auto;
  z-index: 1100;
  display: none;
  width: min(420px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: min(78svh, 720px);
  overflow: hidden;
  color: #f3f5f2;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(12,16,14,.98);
  box-shadow: 0 24px 70px rgba(0,0,0,.56);
  backdrop-filter: blur(20px);
  transform: none;
  animation: player-subtitle-enter .16s ease both;
}
@keyframes player-subtitle-enter { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
body.player-view .enhanced-subtitle-menu.show { display: flex; flex-direction: column; }
body.player-view .subtitle-menu-header { flex: 0 0 auto; padding: 13px 16px; border-radius: 15px 15px 0 0; }
body.player-view .subtitle-menu-header h3 { font-size: 14px; font-weight: 750; }
body.player-view .subtitle-menu-content { max-height: none; min-height: 0; overflow-y: auto; padding: 12px 14px 14px; color: #f3f5f2; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
body.player-view .menu-section { margin-bottom: 13px; padding-bottom: 12px; }
body.player-view .section-title { margin-bottom: 8px; font-size: 10px; letter-spacing: 1.3px; }
body.player-view .subtitle-track-list { max-height: none; overflow: visible; }
body.player-view .track-item { gap: 8px; min-height: 38px; margin: 3px 0; padding: 8px 10px; background: rgba(255,255,255,.045); }
body.player-view .track-info { flex: 1 1 auto; min-width: 0; gap: 8px; }
body.player-view .track-name { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body.player-view .control-row { gap: 10px; margin-bottom: 8px; }
body.player-view .control-row label { gap: 7px; font-size: 12px; }
body.player-view .font-size-control { gap: 8px; }
body.player-view .font-size-btn { width: 30px; height: 30px; }
body.player-view .font-size-value { min-width: 42px; font-size: 12px; }
body.player-view .enhanced-subtitle-menu select { width: min(48%, 190px); min-width: 0; padding: 7px 9px; font-size: 12px; }
body.player-view .delay-buttons-row { gap: 5px; margin: 8px 0; }
body.player-view .delay-btn { min-height: 32px; padding: 6px 9px; font-size: 11px; }
body.player-view .delay-input { min-width: 0; min-height: 34px; font-size: 12px; }
body.player-view .delay-value { font-size: 12px; }

@media (max-width: 1000px) {
  body.player-view.content-view .container { width: min(100% - 36px, 900px); }
  body.player-view.content-view .header-main { gap: 12px; }
  body.player-view.content-view .site-links { gap: 2px; }
  body.player-view.content-view .site-links button { padding-inline: 10px; }
}

@media (min-width: 651px) and (max-width: 760px) {
  body.player-view.content-view .header-main { gap: 12px; }
  body.player-view.content-view .logo { font-size: 19px; }
  body.player-view.content-view .site-links button { gap: 5px; padding-inline: 7px; font-size: 11px; }
}

@media (max-width: 760px) {
  body.player-view #content { width: 100%; padding-bottom: 28px; }
  body.player-view .player-toolbar { flex-direction: column; align-items: stretch; gap: 10px; min-height: 0; margin-bottom: 12px !important; padding: 10px; }
  body.player-view .player-toolbar .media-info-right { order: -1; width: 100%; margin: 0; text-align: left; }
  body.player-view .player-toolbar .media-title { font-size: 16px; }
  body.player-view .player-toolbar .media-detail { font-size: 12px; }
  body.player-view .player-toolbar .toolbar-controls { display: grid; grid-template-columns: auto minmax(0,1fr); width: 100%; gap: 7px; overflow: visible; }
  body.player-view .player-toolbar .next-episode-btn { grid-column: 1 / -1; justify-self: start; }
  body.player-view .player-toolbar .back-btn { min-width: 72px; padding-inline: 8px !important; }
  body.player-view .player-toolbar .mobile-quality-selector { min-width: 0; max-width: none; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  body.player-view .player-toolbar .mobile-quality-selector::-webkit-scrollbar { display: none; }
  body.player-view .quality-selector .quality-btn { min-width: 52px; min-height: 44px; padding-inline: 8px !important; font-size: 12px !important; }
  body.player-view .player-toolbar .caption-settings-btn { min-width: 46px; min-height: 44px; gap: 4px; padding-inline: 7px !important; font-size: 11px !important; }
  body.player-view .player-section { aspect-ratio: 16 / 9; margin-bottom: 14px !important; border-radius: 11px; }
  body.player-view .player-section .video-js { border-radius: 0; }
  body.player-view .player-section .vjs-control-bar { height: 44px; font-size: 13px; }
  body.player-view .player-section .vjs-control-bar .vjs-control { width: 42px; height: 44px; }
  body.player-view .player-section .vjs-control-bar .vjs-progress-control { flex: 1 1 auto; width: auto; min-width: 42px; }
  body.player-view .player-section .vjs-big-play-button { width: 70px; height: 54px; margin: 0; border-radius: 14px; transform: translate(-50%,-50%); }
  body.player-view .enhanced-subtitle-menu {
    top: auto;
    right: 10px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 10px;
    width: auto;
    max-width: none;
    max-height: min(68svh, 590px);
    border-radius: 16px;
  }
  body.player-view .subtitle-menu-header { padding: 12px 14px; }
  body.player-view .subtitle-menu-content { padding: 10px 12px 12px; }
}

@media (max-width: 650px) {
  body.player-view.content-view .container { width: calc(100% - 24px); }
  body.player-view.content-view .site-header { margin: 0; padding: 12px 0; }
  body.player-view.content-view .header-main { justify-content: flex-start; gap: 8px; min-height: 42px; }
  body.player-view.content-view .logo { font-size: 17px; }
  body.player-view.content-view .logo-glyph { width: 30px; height: 30px; margin-right: 7px; border-radius: 9px; }
  body.player-view.content-view .site-links,
  body.player-view.content-view .search-container,
  body.player-view.content-view .header-menu-container { display: none !important; }

  body.player-view .mobile-home-nav {
    position: fixed;
    z-index: 700;
    right: 12px;
    bottom: 14px;
    left: 12px;
    display: flex !important;
    align-items: center;
    justify-content: space-around;
    gap: 3px;
    padding: 7px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px;
    background: rgba(24,24,23,.84);
    box-shadow: 0 12px 34px rgba(0,0,0,.38);
    backdrop-filter: blur(18px);
  }
  body.player-view .mobile-home-nav button {
    display: grid;
    flex: 1 1 0;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #aab0b5;
    font-size: 16px;
    cursor: pointer;
  }
  body.player-view .mobile-home-nav button.active,
  body.player-view .mobile-home-nav button:hover { background: rgba(255,255,255,.16); color: #fff; }
  body.player-view .theme-switcher .color-picker { top: 58px; right: 10px; max-width: calc(100vw - 20px); }
  body.player-view .font-size-btn { width: 34px; height: 34px; }
}

@media (max-width: 380px) {
  body.player-view .mobile-home-nav { right: 8px; bottom: 10px; left: 8px; padding: 6px; }
  body.player-view .mobile-home-nav button { height: 38px; }
  body.player-view .player-toolbar { padding: 8px; }
  body.player-view .player-toolbar .toolbar-controls { gap: 5px; }
  body.player-view .player-toolbar .back-btn { min-width: 64px; padding-inline: 7px !important; font-size: 12px !important; }
  body.player-view .quality-selector .quality-btn { min-width: 48px; padding-inline: 7px !important; }
  body.player-view .player-toolbar .caption-settings-btn { min-width: 42px; padding-inline: 6px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.player-view #content { animation: none; }
  body.player-view .player-toolbar button { transition: none; }
}

/* Calm, high-contrast subtitle controls that follow MovieHub's dark interface. */
body.player-view .enhanced-subtitle-menu {
  color: #f2f4f0;
  border-color: rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(11,14,12,.985);
  box-shadow: 0 24px 70px rgba(0,0,0,.62), 0 1px 0 rgba(255,255,255,.035) inset;
}
body.player-view .subtitle-menu-header {
  min-height: 50px;
  padding: 12px 16px;
  color: #f4f5f1;
  border-bottom: 1px solid rgba(255,255,255,.09);
  border-radius: 15px 15px 0 0;
  background: linear-gradient(90deg, rgba(255,255,255,.055), rgba(255,255,255,.018)) !important;
}
body.player-view .subtitle-menu-header h3 { color: #f4f5f1; font-size: 14px; font-weight: 760; }
body.player-view .subtitle-menu-header h3 i,
body.player-view .subtitle-menu-header > i { color: var(--primary, #d4d8dd); }
body.player-view .subtitle-menu-content { color: #f2f4f0; scrollbar-color: rgba(255,255,255,.18) transparent; }
body.player-view .menu-section { border-bottom-color: rgba(255,255,255,.09); }
body.player-view .section-title { color: rgba(240,243,237,.58); font-weight: 800; }
body.player-view .subtitle-track-list { padding-right: 2px; }
body.player-view .track-item {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  transition: background .16s ease, border-color .16s ease;
}
body.player-view .track-item:hover { border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.075); }
body.player-view .track-item.active {
  border-color: color-mix(in srgb, var(--primary, #d4d8dd) 58%, transparent);
  background: color-mix(in srgb, var(--primary, #d4d8dd) 12%, rgba(255,255,255,.035));
}
body.player-view .track-info { min-width: 0; }
body.player-view .track-info > i.track-language-icon { flex: 0 0 18px; width: 18px; color: var(--primary, #d4d8dd) !important; font-size: 14px; }
body.player-view .track-name { color: #f1f3ef; font-size: 12px; font-weight: 700; }
body.player-view .track-name.track-off { color: rgba(240,243,237,.52); font-weight: 600; }
body.player-view .track-file-name { overflow: hidden; min-width: 0; color: rgba(240,243,237,.52); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body.player-view .track-item.active > .fa-check-circle { color: var(--primary, #d4d8dd) !important; }
body.player-view .subtitle-empty-state { margin: 8px 2px 2px; padding: 12px; color: rgba(240,243,237,.56); border: 1px dashed rgba(255,255,255,.12); border-radius: 10px; font-size: 12px; line-height: 1.5; }
body.player-view .control-row { min-height: 36px; }
body.player-view .control-row label { color: rgba(240,243,237,.7); }
body.player-view .control-row label i { color: var(--primary, #d4d8dd); }
body.player-view .font-size-btn,
body.player-view .delay-btn {
  color: #eef1eb;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.065);
  transition: background .16s ease, border-color .16s ease, color .16s ease;
}
body.player-view .font-size-btn:hover,
body.player-view .delay-btn:hover { color: #10130f; border-color: var(--primary); background: var(--primary); }
body.player-view .delay-btn.reset-btn:hover { color: #10130f; border-color: var(--primary); background: var(--primary); }
body.player-view .font-size-value,
body.player-view .delay-value { color: #f2f4f0; font-variant-numeric: tabular-nums; }
body.player-view .enhanced-subtitle-menu select,
body.player-view .delay-input {
  color: #f1f3ef;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 9px;
  background: #171b18;
  color-scheme: dark;
}
body.player-view .enhanced-subtitle-menu select:focus,
body.player-view .delay-input:focus { border-color: var(--primary); outline: 2px solid rgba(255,255,255,.05); }
body.player-view .delay-slider { accent-color: var(--primary); }
body.player-view .detail-episode-download:focus-visible,
body.player-view .enhanced-subtitle-menu button:focus-visible,
body.player-view .enhanced-subtitle-menu select:focus-visible,
body.player-view .delay-input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

@media (max-width: 760px) {
  body.player-view .enhanced-subtitle-menu { max-height: min(74svh, 640px); }
  body.player-view .subtitle-menu-header { min-height: 48px; }
  body.player-view .track-item { min-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  body.player-view .track-item,
  body.player-view .font-size-btn,
  body.player-view .delay-btn { transition: none; }
}

/* Keep long subtitle menus easy to scan without scrolling past every track. */
body.player-view .subtitle-track-list {
  max-height: clamp(180px, 36svh, 300px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.42) rgba(255,255,255,.045);
  padding-right: 6px;
  -webkit-overflow-scrolling: touch;
}
body.player-view .subtitle-track-list::-webkit-scrollbar { width: 8px; }
body.player-view .subtitle-track-list::-webkit-scrollbar-track { border-radius: 999px; background: rgba(255,255,255,.045); }
body.player-view .subtitle-track-list::-webkit-scrollbar-thumb { min-height: 32px; border: 2px solid transparent; border-radius: 999px; background: rgba(255,255,255,.42); background-clip: padding-box; }
body.player-view .subtitle-track-list::-webkit-scrollbar-thumb:hover { background: var(--primary, #d4d8dd); background-clip: padding-box; }

/* Full-screen playback surface inspired by the supplied Cinejoy player reference. */
body.player-view {
  position: fixed;
  inset: 0;
  min-width: 0;
  overflow: hidden;
  background: #000;
}
body.player-view #home-ambient,
body.player-view .site-header,
body.player-view .site-footer,
body.player-view .mobile-home-nav,
body.player-view .theme-switcher { display: none !important; }
html > .site-header.desktop-header-portal[data-header-mode="player"],
html > .site-header.desktop-header-portal[data-header-mode="player"] .site-links { display: none !important; }
body.player-view.content-view .container {
  position: fixed;
  inset: 0;
  width: 100% !important;
  max-width: none !important;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
}
body.player-view #content {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100%;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  background: #000;
  animation: none;
}
body.player-view .player-section {
  position: absolute;
  inset: 0;
  isolation: isolate;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 100%;
  aspect-ratio: auto;
  margin: 0 !important;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}
body.player-view .player-section > .video-js {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  padding-top: 0 !important;
  border-radius: 0;
  background: #000;
}
body.player-view .player-section .vjs-tech { object-fit: contain; }
body.player-view .player-section .vjs-control-bar,
body.player-view .player-section .vjs-big-play-button { display: none !important; }
body.player-view .player-section .player-center-play,
body.player-view .player-section .vjs-big-play-button,
body.player-view .player-section .vjs-loading-spinner {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
body.player-view .player-info-backdrop {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: min(84vw, 1280px);
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.46) 38%, rgba(0,0,0,.24) 70%, rgba(0,0,0,0) 100%);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 28%, rgba(0,0,0,.76) 54%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 28%, rgba(0,0,0,.76) 54%, transparent 100%);
  transition: opacity .65s ease;
}
body.player-view .player-ui-idle .player-info-backdrop { opacity: 1; }
body.player-view .player-section.player-fullscreen-ui-idle .player-info-backdrop { opacity: 0; }
body.player-view .player-section .vjs-text-track-display { z-index: 4 !important; }
body.player-view .player-toolbar {
  position: absolute;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  min-height: 76px;
  margin: 0 !important;
  padding: max(14px, env(safe-area-inset-top)) clamp(20px, 2.8vw, 50px) 12px;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.72), transparent);
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}
body.player-view .player-back-button,
body.player-view .player-cast-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  color: #fff;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  pointer-events: auto;
  transition: background .18s ease, transform .18s ease;
}
body.player-view .player-back-button:hover,
body.player-view .player-cast-button:hover { background: rgba(255,255,255,.13); transform: scale(1.04); }
body.player-view .player-top-title {
  position: absolute;
  top: 50%;
  right: 52px;
  left: 52px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(14px, 1.2vw, 18px);
  font-weight: 650;
  text-shadow: 0 1px 8px rgba(0,0,0,.7);
  transform: translateY(-50%);
}
body.player-view .player-cast-button { justify-self: end; font-size: 23px; }
body.player-view .player-idle-info {
  position: absolute;
  z-index: 3;
  top: 39%;
  right: auto;
  bottom: auto;
  left: clamp(18px, 3vw, 56px);
  width: min(760px, 46vw);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .65s ease, transform .65s cubic-bezier(.2,.75,.25,1);
  text-shadow: 0 2px 18px rgba(0,0,0,.8);
}
body.player-view .player-ui-idle .player-idle-info { opacity: 1; transform: translateY(0); pointer-events: auto; }
body.player-view .player-episode-title { margin: 0 0 8px; color: #fff; font-size: clamp(18px, 2vw, 27px); line-height: 1.2; }
body.player-view .player-series-info { left: clamp(24px, 4vw, 56px); width: min(780px, 82vw); }
body.player-view .player-series-info .player-idle-logo { width: min(390px, 100%); max-width: 100%; max-height: 140px; margin-bottom: 14px; }
body.player-view .player-series-info .player-series-metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin: 15px 0 18px; font-size: 14px; }
body.player-view .player-rating-star { color: #ffc107; }
body.player-view .player-certification { padding: 1px 5px; border: 1px solid rgba(255,255,255,.45); border-radius: 3px; font-size: 11px; line-height: 1.2; }
body.player-view .player-metadata-dot { color: rgba(255,255,255,.5); }
body.player-view .player-series-info p { color: rgba(255,255,255,.7); line-height: 1.55; }
body.player-view .player-idle-info p.is-expanded { display: block; max-height: min(30vh, 240px); overflow-y: auto; -webkit-line-clamp: unset; }
body.player-view .player-description-more { margin-top: 8px; padding: 4px 0; color: #fff; background: transparent; border: 0; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
body.player-view .player-description-more:hover { text-decoration: underline; }
body.player-view .player-idle-info [hidden] { display: none !important; }
body.player-view .player-section.player-fullscreen-ui-idle,
body.player-view .player-section.player-fullscreen-ui-idle * { cursor: none !important; }
body.player-view .player-section.player-fullscreen-ui-idle .player-toolbar,
body.player-view .player-section.player-fullscreen-ui-idle .player-controls,
body.player-view .player-section.player-fullscreen-ui-idle .player-center-controls,
body.player-view .player-section.player-fullscreen-ui-idle .player-idle-info {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.player-view .player-idle-logo { display: block; max-width: min(260px, 40vw); max-height: 112px; margin: 0 0 13px; object-fit: contain; object-position: left center; filter: drop-shadow(0 3px 16px rgba(0,0,0,.72)); }
body.player-view .player-idle-info h1 { margin: 0 0 8px; color: #fff; font-size: clamp(28px, 4vw, 54px); font-weight: 850; letter-spacing: -.04em; line-height: 1.04; }
body.player-view .player-idle-metadata { margin-bottom: 12px; color: rgba(255,255,255,.78); font-size: 13px; font-weight: 650; line-height: 1.35; }
body.player-view .player-idle-info p { display: -webkit-box; max-width: 760px; margin: 0; overflow: hidden; color: rgba(255,255,255,.78); font-size: 14px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
body.player-view .player-center-play {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 76px;
  height: 58px;
  place-items: center;
  padding: 0;
  color: #fff;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 12px;
  background: rgba(15,18,20,.72);
  font-size: 22px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,-50%) scale(.96);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
  cursor: pointer;
}
body.player-view .player-center-play.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
body.player-view .player-center-play:hover { background: rgba(25,29,32,.92); }
body.player-view .player-controls {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 84px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 32px max(13px, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,.33) 65%, transparent);
}
body.player-view .player-seek-slider,
body.player-view .subtitle-range {
  display: block;
  width: 100%;
  height: 4px;
  margin: 0 0 13px;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(to right, #95ff50 0 var(--player-progress, 0%), rgba(255,255,255,.38) var(--player-progress, 0%) 100%);
  cursor: pointer;
}
body.player-view .player-seek-slider::-webkit-slider-thumb,
body.player-view .subtitle-range::-webkit-slider-thumb { width: 12px; height: 12px; appearance: none; border: 0; border-radius: 50%; background: #95ff50; box-shadow: 0 0 0 2px rgba(0,0,0,.55); }
body.player-view .player-seek-slider::-moz-range-thumb,
body.player-view .subtitle-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #95ff50; box-shadow: 0 0 0 2px rgba(0,0,0,.55); }
body.player-view .player-seek-slider:hover { height: 6px; }
body.player-view .player-control-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 34px; }
body.player-view .player-control-left,
body.player-view .player-control-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
body.player-view .player-control-right { margin-left: auto; }
body.player-view .player-control-button {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  color: #f8f8f8;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, transform .15s ease;
}
body.player-view .player-control-button:hover { color: #fff; background: rgba(255,255,255,.11); }
body.player-view .player-control-button:active { transform: scale(.92); }
body.player-view .player-play-toggle { font-size: 23px; }
body.player-view .player-skip-button > span { position: absolute; right: 1px; bottom: 2px; color: inherit; font-size: 9px; font-weight: 850; }
body.player-view .player-volume-slider { display: none; }
body.player-view .player-time { display: inline-flex; align-items: center; gap: 7px; color: rgba(255,255,255,.95); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.player-view .player-time-divider { color: rgba(255,255,255,.45); }
body.player-view .player-quality-toggle { width: auto; min-width: 44px; padding: 0 5px; font-size: 12px; font-weight: 750; }
body.player-view .player-quality-toggle span { position: static !important; font-size: 12px !important; }
body.player-view .player-subtitle-settings { font-size: 20px; }
body.player-view .player-subtitle-settings .caption-badge { top: -2px; right: -3px; }
body.player-view .player-pip-glyph {
  position: relative;
  display: block;
  width: 21px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 1px;
}
body.player-view .player-pip-glyph > i {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 8px;
  height: 6px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
}
body.player-view .player-caption-glyph {
  display: grid;
  width: 23px;
  height: 16px;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: 3px;
  padding: 3px;
  border: 2px solid currentColor;
  border-radius: 2px;
}
body.player-view .player-caption-glyph > i { display: block; height: 2px; border-radius: 2px; background: currentColor; }
body.player-view .player-caption-glyph > i:last-child { grid-column: 1 / -1; }
body.player-view .player-next-episode { width: auto; min-width: 34px; gap: 5px; padding-inline: 8px; color: #fff; }
body.player-view .player-quality-menu {
  position: absolute;
  z-index: 12;
  right: clamp(70px, 9vw, 150px);
  bottom: 94px;
  display: none;
  width: min(250px, calc(100vw - 28px));
  padding: 12px;
  color: #f4f5f2;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: rgba(12,14,14,.96);
  box-shadow: 0 18px 50px rgba(0,0,0,.58);
  backdrop-filter: blur(18px);
}
body.player-view .player-quality-menu.show { display: block; }
body.player-view .player-quality-menu-title { margin: 0 0 9px; color: rgba(255,255,255,.58); font-size: 10px; font-weight: 850; letter-spacing: 1px; text-transform: uppercase; }
body.player-view .player-quality-options { display: grid; gap: 4px; }
body.player-view .player-quality-menu .quality-btn { width: 100%; min-height: 38px; padding: 0 11px; color: #eceeeb; border: 1px solid transparent; border-radius: 8px; background: rgba(255,255,255,.045); text-align: left; cursor: pointer; }
body.player-view .player-quality-menu .quality-btn.active { color: #10130d; border-color: #95ff50; background: #95ff50; }
body.player-view .player-quality-unavailable { padding: 10px; color: rgba(255,255,255,.55); font-size: 12px; }
body.player-view .enhanced-subtitle-menu {
  position: absolute;
  top: auto;
  right: clamp(12px, 2vw, 30px);
  bottom: calc(78px + env(safe-area-inset-bottom));
  left: auto;
  z-index: 11;
  width: min(343px, calc(100vw - 28px));
  height: min(496px, calc(100dvh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  max-width: calc(100vw - 28px);
  max-height: min(496px, calc(100dvh - 104px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  overflow: hidden;
  color: #f4f4f4;
  border: 1px solid #2d2d2d;
  border-radius: 16px;
  background: #0a0a0a;
  box-shadow: 0 18px 50px rgba(0,0,0,.48);
  backdrop-filter: none;
}
body.player-view .subtitle-menu-header { display: flex; flex: 0 0 58px; align-items: center; gap: 12px; min-height: 58px; padding: 0 24px; border-bottom: 1px solid #292929; background: transparent !important; }
body.player-view .subtitle-menu-header h3 { display: flex; flex: 1 1 auto; align-items: center; gap: 9px; margin: 0; color: #f5f5f5; font-size: 16px; font-weight: 700; }
body.player-view .subtitle-menu-header h3 i { display: none; }
body.player-view .subtitle-header-settings-title { display: none; }
body.player-view .enhanced-subtitle-menu[data-view="settings"] .subtitle-header-list-title,
body.player-view .enhanced-subtitle-menu[data-view="list"] .subtitle-header-settings-title { display: none; }
body.player-view .enhanced-subtitle-menu[data-view="settings"] .subtitle-header-settings-title { display: inline; }
body.player-view .subtitle-menu-back,
body.player-view .subtitle-menu-close,
body.player-view .subtitle-customize-button { display: grid; flex: 0 0 auto; min-width: 34px; height: 34px; place-items: center; padding: 0 9px; color: #b7bbc0; border: 0; border-radius: 8px; background: transparent; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
body.player-view .subtitle-menu-back { display: none; }
body.player-view .enhanced-subtitle-menu[data-view="settings"] .subtitle-menu-back { display: grid; }
body.player-view .enhanced-subtitle-menu[data-view="language"] .subtitle-menu-back { display: grid; }
body.player-view .enhanced-subtitle-menu[data-view="settings"] .subtitle-customize-button { display: none; }
body.player-view .enhanced-subtitle-menu[data-view="language"] .subtitle-customize-button { display: none; }
body.player-view .subtitle-customize-button { color: #b8b8b8; font-size: 14px; }
body.player-view .subtitle-menu-close { min-width: 30px; width: 30px; font-size: 17px; }
body.player-view .subtitle-menu-back:hover,
body.player-view .subtitle-menu-close:hover,
body.player-view .subtitle-customize-button:hover { color: #fff; background: rgba(255,255,255,.09); }
body.player-view .subtitle-menu-content { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; padding: 0 24px 18px; }
body.player-view .enhanced-subtitle-menu[data-view="language"] .subtitle-menu-content { padding: 0; }
body.player-view .subtitle-header-language { display: none; align-items: center; min-width: 0; gap: 9px; }
body.player-view .enhanced-subtitle-menu[data-view="language"] .subtitle-header-list-title,
body.player-view .enhanced-subtitle-menu[data-view="language"] .subtitle-header-settings-title { display: none; }
body.player-view .enhanced-subtitle-menu[data-view="language"] .subtitle-header-language { display: inline-flex; }
body.player-view .subtitle-header-language .subtitle-flag { width: 28px; height: 19px; }
body.player-view .subtitle-header-language-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Keep these two reference icons visible even when the optional icon font is unavailable. */
body.player-view .subtitle-menu-back .fa-arrow-left::before { content: '←'; font-family: Arial, sans-serif; font-size: 18px; font-style: normal; font-weight: 400; line-height: 1; }
body.player-view .subtitle-list-view { display: flex; min-height: 100%; flex-direction: column; }
body.player-view .subtitle-utility-actions { display: grid; gap: 0; margin: 0; }
body.player-view .subtitle-off-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; margin: 0; padding: 0 4px; color: #f5f5f5; border: 0 !important; border-radius: 0; background: transparent !important; text-align: left; font-size: 15px; }
body.player-view .subtitle-off-button.active > .fa-check-circle { color: #55b52d !important; }
body.player-view .subtitle-utility-button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 4px; color: #f3f3f3; border: 0; border-radius: 0; background: transparent; text-align: left; font-size: 15px; font-weight: 650; cursor: pointer; }
body.player-view .subtitle-utility-button:hover { background: rgba(255,255,255,.1); }
body.player-view .subtitle-utility-button > i:first-child { width: 16px; color: #aeb3b6; text-align: center; }
body.player-view .subtitle-utility-button > i:last-child { margin-left: auto; color: rgba(255,255,255,.55); font-size: 11px; }
body.player-view .subtitle-search { display: flex; flex: 0 0 37px; align-items: center; gap: 9px; height: 37px; margin: 6px 0 8px; padding: 0 12px; color: #777; border-radius: 4px; background: #191919; }
body.player-view .subtitle-search input { width: 100%; min-width: 0; color: #fff; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; }
body.player-view .subtitle-search input::placeholder { color: rgba(255,255,255,.4); }
body.player-view .subtitle-track-list { display: grid; min-height: 0; max-height: none; flex: 1 1 auto; align-content: start; gap: 0; padding-right: 0; overflow-y: auto; }
body.player-view .subtitle-track-list .track-item { display: flex; align-items: center; justify-content: space-between; width: 100%; min-width: 0; min-height: 42px; margin: 0; padding: 0 11px; color: #fff; text-align: left; font: inherit; cursor: pointer; }
body.player-view .subtitle-track-list .track-item.active { border-color: transparent; background: rgba(255,255,255,.13); }
body.player-view .subtitle-track-list .subtitle-off-option { order: -1; margin-bottom: 3px; }
body.player-view .track-info { display: flex; align-items: center; min-width: 0; gap: 9px; }
body.player-view .track-language-icon { flex: 0 0 auto; }
body.player-view .track-name { flex: 0 0 auto; }
body.player-view .track-file-name { min-width: 0; }
body.player-view .subtitle-settings-view { display: grid; gap: 0; }
body.player-view .subtitle-language-view { display: flex; min-height: 0; flex-direction: column; gap: 4px; padding: 16px 12px 12px; }
body.player-view .subtitle-language-view[hidden] { display: none !important; }
body.player-view .subtitle-language-view .subtitle-search { position: sticky; top: 0; z-index: 2; flex: 0 0 37px; margin: 0 0 6px; }
body.player-view .subtitle-language-view .subtitle-file-row { display: flex; flex: 0 0 auto; align-items: center; min-width: 0; min-height: 45px; gap: 10px; padding: 0 15px; color: #f5f5f5; border: 0; border-radius: 8px; background: #111; text-align: left; font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; animation: subtitle-track-enter .2s ease both; }
body.player-view .subtitle-language-view .subtitle-file-row[hidden] { display: none !important; }
body.player-view .subtitle-language-view .subtitle-file-row:nth-child(2) { animation-delay: 18ms; }
body.player-view .subtitle-language-view .subtitle-file-row:nth-child(3) { animation-delay: 36ms; }
body.player-view .subtitle-language-view .subtitle-file-row:nth-child(4) { animation-delay: 54ms; }
body.player-view .subtitle-language-view .subtitle-file-row:nth-child(5) { animation-delay: 72ms; }
body.player-view .subtitle-language-view .subtitle-file-row .track-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.player-view .subtitle-language-view .subtitle-file-row .subtitle-external-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 4px; font-size: 10px; }
body.player-view .subtitle-translate-icon { flex: 0 0 auto; color: #aeb0b2; font-size: 15px; }
body.player-view .subtitle-translate-icon::before { content: '文A'; font-family: Arial, sans-serif; font-size: 13px; font-style: normal; font-weight: 500; }
body.player-view .subtitle-language-view .subtitle-file-row.active { background: #202020; }
body.player-view .enhanced-subtitle-menu[data-view="language"] .subtitle-language-view { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
@keyframes subtitle-track-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
body.player-view .subtitle-settings-view[hidden],
body.player-view .subtitle-list-view[hidden] { display: none !important; }
body.player-view .subtitle-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; border-bottom: 1px solid rgba(255,255,255,.085); cursor: pointer; }
body.player-view .subtitle-switch-row > span { display: grid; gap: 4px; }
body.player-view .subtitle-switch-row strong { color: #f2f3f0; font-size: 14px; }
body.player-view .subtitle-switch-row small { max-width: 240px; color: rgba(255,255,255,.55); font-size: 12px; line-height: 1.35; }
body.player-view .subtitle-switch-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
body.player-view .subtitle-switch-row > i { position: relative; flex: 0 0 44px; width: 44px; height: 24px; border-radius: 999px; background: #363839; transition: background .18s ease; }
body.player-view .subtitle-switch-row > i::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; content: ''; border-radius: 50%; background: #fff; transition: transform .18s ease; }
body.player-view .subtitle-switch-row input:checked + i { background: #4eae25; }
body.player-view .subtitle-switch-row input:checked + i::after { transform: translateX(20px); }
body.player-view .subtitle-settings-section { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.085); }
body.player-view .subtitle-setting-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #f4f5f2; font-size: 14px; }
body.player-view .subtitle-setting-heading span { color: rgba(255,255,255,.78); font-variant-numeric: tabular-nums; }
body.player-view .subtitle-settings-section .subtitle-range { height: 4px; margin: 10px 0 0; background: rgba(255,255,255,.18); accent-color: #95ff50; }
body.player-view .subtitle-delay-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; margin-top: 10px; }
body.player-view .subtitle-delay-actions button,
body.player-view .subtitle-delay-actions strong { display: grid; min-height: 42px; place-content: center; padding: 4px; color: #f4f5f2; border: 0; border-radius: 6px; background: rgba(255,255,255,.075); text-align: center; font-size: 11px; }
body.player-view .subtitle-delay-actions button { cursor: pointer; }
body.player-view .subtitle-delay-actions button > span { color: rgba(255,255,255,.58); font-size: 9px; }
body.player-view .subtitle-delay-actions strong { background: rgba(255,255,255,.12); font-size: 14px; }
body.player-view .subtitle-delay-actions small { display: inline; color: rgba(255,255,255,.62); font-size: 10px; }
body.player-view .subtitle-reset-delay { margin-top: 8px; padding: 4px 0; color: rgba(255,255,255,.52); border: 0; background: none; font-size: 10px; cursor: pointer; }
body.player-view .subtitle-font-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; padding: 4px; border-radius: 8px; background: rgba(255,255,255,.075); }
body.player-view .subtitle-font-options button { min-height: 34px; padding: 0 6px; color: rgba(255,255,255,.6); border: 0; border-radius: 6px; background: transparent; font-size: 11px; cursor: pointer; }
body.player-view .subtitle-font-options button.active { color: #f6f7f3; background: rgba(255,255,255,.16); }
body.player-view .subtitle-background-row { min-height: 54px; border-bottom: 1px solid rgba(255,255,255,.085); }
body.player-view .subtitle-color-section { border-bottom: 0; }
body.player-view .subtitle-color-options { display: flex; align-items: center; gap: 9px; }
body.player-view .subtitle-color-options button { position: relative; display: grid; width: 25px; height: 25px; place-items: center; padding: 0; color: #111; border: 2px solid transparent; border-radius: 50%; background: var(--subtitle-swatch,#fff); cursor: pointer; }
body.player-view .subtitle-color-options button[data-subtitle-color="#ffffff"] { --subtitle-swatch: #fff; }
body.player-view .subtitle-color-options button[data-subtitle-color="#82b1ff"] { --subtitle-swatch: #82b1ff; }
body.player-view .subtitle-color-options button[data-subtitle-color="#e7e53a"] { --subtitle-swatch: #e7e53a; }
body.player-view .subtitle-color-options button[data-subtitle-color="#08b84d"] { --subtitle-swatch: #08b84d; }
body.player-view .subtitle-color-options button.active { border-color: rgba(255,255,255,.8); box-shadow: 0 0 0 2px rgba(255,255,255,.16); }
body.player-view .subtitle-color-options .subtitle-custom-color { margin-left: auto; color: #f4f5f2; border-radius: 6px; background: rgba(255,255,255,.11); }
body.player-view .subtitle-custom-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
body.player-view .subtitle-settings-view [hidden] { display: none !important; }
body.player-view .quality-indicator { position: absolute; z-index: 7; top: 50%; left: 50%; transform: translate(-50%,-50%); }

@media (max-width: 650px) {
  body.player-view.content-view .container { width: 100% !important; }
  body.player-view .player-toolbar { grid-template-columns: 1fr; min-height: 58px; padding: max(10px,env(safe-area-inset-top)) 12px 8px; }
  body.player-view .player-back-button { width: 38px; height: 38px; font-size: 19px; }
  body.player-view .player-top-title { font-size: 14px; }
  body.player-view .player-idle-info { top: 39%; right: 18px; bottom: auto; left: 18px; width: auto; }
  body.player-view .player-idle-logo { max-width: min(260px, 70vw); max-height: 80px; margin-bottom: 10px; }
  body.player-view .player-idle-info h1 { font-size: clamp(25px, 8vw, 36px); }
  body.player-view .player-idle-metadata { margin-bottom: 8px; font-size: 11px; }
  body.player-view .player-idle-info p { font-size: 12px; -webkit-line-clamp: 2; }
  body.player-view .player-controls { min-height: 74px; padding: 10px 15px max(10px,env(safe-area-inset-bottom)); }
  body.player-view .player-seek-slider { height: 4px; margin-bottom: 9px; }
  body.player-view .player-control-row { gap: 8px; min-height: 32px; }
  body.player-view .player-control-left,
  body.player-view .player-control-right { gap: 4px; }
  body.player-view .player-control-button { width: 30px; height: 32px; font-size: 16px; }
  body.player-view .player-play-toggle { font-size: 18px; }
  body.player-view .player-volume-slider { width: 48px; }
  body.player-view .player-time { gap: 4px; font-size: 10px; }
  body.player-view .player-volume-slider { display: none; }
  body.player-view .player-quality-toggle { min-width: 38px; font-size: 10px; }
  body.player-view .player-quality-toggle span { font-size: 10px !important; }
  body.player-view .player-subtitle-settings { font-size: 17px; }
  body.player-view .player-quality-menu { right: 70px; bottom: calc(75px + env(safe-area-inset-bottom)); }
  body.player-view .enhanced-subtitle-menu { top: auto; right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); left: auto; width: min(343px,calc(100vw - 28px)); height: min(496px,calc(100dvh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); max-width: calc(100vw - 28px); max-height: min(496px,calc(100dvh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom))); transform: none; animation: player-subtitle-enter .16s ease both; }
  body.player-view .subtitle-menu-header { padding-inline: 22px; }
  body.player-view .subtitle-menu-content { max-height: none; padding: 0 22px 16px; }
  body.player-view .subtitle-track-list { max-height: none; }
  body.player-view .subtitle-settings-view { max-height: none; overflow: visible; }
}
@keyframes player-subtitle-enter-centered { from { opacity: 0; transform: translate(50%,-5px); } to { opacity: 1; transform: translate(50%,0); } }
@media (max-width: 380px) {
  body.player-view .player-controls { padding-inline: 9px; }
  body.player-view .player-control-left,
  body.player-view .player-control-right { gap: 1px; }
  body.player-view .player-volume-slider { width: 40px; }
  body.player-view .player-time { font-size: 9px; }
  body.player-view .player-time-divider,
  body.player-view #player-total-time { display: none; }
  body.player-view .player-control-button { width: 27px; }
}
@media (max-height: 520px) {
  body.player-view .player-idle-logo { max-height: 68px; margin-bottom: 8px; }
  body.player-view .player-idle-info h1 { font-size: clamp(22px, 3vw, 34px); }
  body.player-view .player-idle-metadata { margin-bottom: 7px; font-size: 11px; }
  body.player-view .player-idle-info p { font-size: 12px; -webkit-line-clamp: 2; }
}
@media (max-width: 600px) {
  body.player-view .player-series-info { left: 18px; right: 18px; width: auto; }
  body.player-view .player-series-info .player-idle-logo { width: min(280px, 75vw); max-height: 95px; }
  body.player-view .player-series-info .player-series-metadata { gap: 6px; margin: 10px 0 12px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  body.player-view .player-idle-info,
body.player-view .player-info-backdrop,
  body.player-view .player-control-button,
  body.player-view .player-back-button,
  body.player-view .player-cast-button { transition: none; }
}

/* Player actions respond quickly while keeping all transitions GPU-friendly. */
body.player-view .player-control-button,
body.player-view .player-back-button,
body.player-view .player-cast-button,
body.player-view .player-center-play,
body.player-view .subtitle-menu-header button,
body.player-view .subtitle-utility-button,
body.player-view .subtitle-language-row,
body.player-view .subtitle-file-row,
body.player-view .subtitle-off-button,
body.player-view .subtitle-settings-view button {
  transition: transform .18s cubic-bezier(.2,.75,.25,1), color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.player-view .player-control-button:hover,
body.player-view .subtitle-menu-header button:hover,
body.player-view .subtitle-utility-button:hover,
body.player-view .subtitle-language-row:hover,
body.player-view .subtitle-file-row:hover,
body.player-view .subtitle-off-button:hover,
body.player-view .subtitle-settings-view button:hover {
  transform: translateY(-2px) scale(1.04);
}
body.player-view .player-back-button:hover,
body.player-view .player-cast-button:hover { transform: translateY(-2px) scale(1.07); }
body.player-view .player-center-play:hover { transform: translate(-50%,-50%) scale(1.06); }
body.player-view .player-control-button:active,
body.player-view .player-back-button:active,
body.player-view .player-cast-button:active,
body.player-view .player-center-play:active,
body.player-view .subtitle-menu-header button:active,
body.player-view .subtitle-utility-button:active,
body.player-view .subtitle-language-row:active,
body.player-view .subtitle-file-row:active,
body.player-view .subtitle-off-button:active,
body.player-view .subtitle-settings-view button:active { transform: scale(.94); }
body.player-view .player-center-play:active { transform: translate(-50%,-50%) scale(.94); }
body.player-view .player-control-button:focus-visible,
body.player-view .player-back-button:focus-visible,
body.player-view .player-cast-button:focus-visible,
body.player-view .player-center-play:focus-visible,
body.player-view .enhanced-subtitle-menu button:focus-visible { outline: 2px solid #95ff50; outline-offset: 3px; }

/* Keep the failed-media sentence out of the clean custom player surface. */
body.player-view .video-js .vjs-error-display,
body.player-view .video-js .vjs-error-display .vjs-modal-dialog-content,
body.player-view .video-js .vjs-modal-dialog.vjs-error-display { display: none !important; }

/* Subtitle chooser list follows the compact language-first reference layout. */
body.player-view .enhanced-subtitle-menu .subtitle-menu-close { display: none; }
body.player-view .subtitle-language-group { min-width: 0; }
body.player-view .subtitle-language-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  gap: 10px;
  padding: 0 4px;
  color: #f4f5f1;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
body.player-view .subtitle-language-row:hover { background: rgba(255,255,255,.07); }
body.player-view .subtitle-language-label { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; gap: 10px; }
body.player-view .subtitle-flag { position: relative; display: block; flex: 0 0 28px; width: 28px; height: 19px; overflow: hidden; border-radius: 3px; background-color: #555; background-image: var(--subtitle-flag-image, none); background-position: center; background-repeat: no-repeat; background-size: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset; }
body.player-view .subtitle-flag--other::before { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; content: '◎'; font-size: 13px; }
body.player-view .subtitle-language-count { color: #f4f5f1; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
body.player-view .subtitle-language-chevron { margin-left: 2px; color: rgba(255,255,255,.8); font-size: 11px; transition: transform .18s ease; }
body.player-view .subtitle-external-badge { padding: 3px 5px; color: #e8e9e7; border-radius: 3px; background: rgba(255,255,255,.14); font-size: 9px; font-weight: 800; }
body.player-view .subtitle-file-row .track-name { overflow: hidden; min-width: 0; text-overflow: ellipsis; white-space: nowrap; }
body.player-view .subtitle-language-group[hidden] { display: none !important; }

/* Keep each subtitle view inside the panel's fixed height so its own list scrolls. */
body.player-view .subtitle-menu-content { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
body.player-view .subtitle-list-view { flex: 1 1 auto; min-height: 0; }
body.player-view .subtitle-track-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
body.player-view .subtitle-language-view { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
body.player-view .subtitle-settings-view { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }


@media (prefers-reduced-motion: reduce) {
  body.player-view .player-control-button,
  body.player-view .player-back-button,
  body.player-view .player-cast-button,
  body.player-view .player-center-play,
  body.player-view .subtitle-menu-header button,
  body.player-view .subtitle-utility-button,
  body.player-view .subtitle-language-row,
  body.player-view .subtitle-file-row,
  body.player-view .subtitle-off-button,
  body.player-view .subtitle-settings-view button { transition: none; }
}

/* Compact multi-page gear panel matching the supplied player settings. */
body.player-view .player-settings-menu {
  position: absolute;
  z-index: 15;
  right: clamp(12px, 2vw, 30px);
  bottom: calc(78px + env(safe-area-inset-bottom));
  display: none;
  flex-direction: column;
  width: min(343px, calc(100vw - 24px));
  max-height: min(78svh, 650px);
  overflow: hidden;
  color: #f4f5f1;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(9,10,10,.97);
  box-shadow: 0 22px 64px rgba(0,0,0,.64);
  backdrop-filter: blur(18px);
  transform-origin: right bottom;
}
body.player-view .player-settings-menu.show { display: flex; animation: player-settings-enter .17s cubic-bezier(.2,.75,.25,1) both; }
@keyframes player-settings-enter { from { opacity: 0; transform: translateY(7px) scale(.985); } to { opacity: 1; transform: none; } }
body.player-view .player-settings-menu[data-view="main"] > .player-settings-header { display: none; }
body.player-view .player-settings-header { display: flex; flex: 0 0 auto; align-items: center; min-height: 70px; gap: 10px; margin: 0 24px; padding: 0 4px; text-align: left; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; transition: none; }
body.player-view .player-settings-header .menu-title-left { display: flex; flex: 1 1 auto; min-width: 0; align-items: center; gap: 10px; }
body.player-view .player-settings-title { overflow: hidden; color: #f4f5f1; font-size: 16px; font-weight: 700; letter-spacing: normal; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
body.player-view .player-settings-header button { display: grid; flex: 0 0 26px; width: 26px; height: 34px; place-items: center; padding: 0; color: #f2f3f0; border: 0; border-radius: 7px; background: transparent; font-size: 15px; cursor: pointer; transition: transform .17s ease, background-color .17s ease, color .17s ease; }
body.player-view .player-settings-header button:hover { color: #fff; background: rgba(255,255,255,.1); transform: scale(1.06); }
body.player-view .player-settings-header .player-settings-close { display: none; }
body.player-view .player-settings-body { min-height: 0; overflow-y: auto; padding: 24px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
body.player-view .player-settings-screen[hidden] { display: none !important; }
body.player-view .player-settings-summary-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 0 0 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
body.player-view .player-settings-summary { display: grid; min-width: 0; min-height: 80px; align-content: center; gap: 6px; padding: 10px 12px; color: #f2f3ef; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: rgba(255,255,255,.055); text-align: left; cursor: pointer; transition: transform .17s ease, border-color .17s ease, background-color .17s ease; }
body.player-view .player-settings-summary:hover { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.1); transform: translateY(-1px); }
body.player-view .player-settings-summary > span { display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.52); font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
body.player-view .player-settings-summary > span i { color: rgba(255,255,255,.58); font-size: 11px; }
body.player-view .player-settings-summary strong { overflow: hidden; color: #f5f6f3; font-size: 17px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
body.player-view .player-settings-main-actions { display: grid; gap: 2px; padding-top: 12px; }
body.player-view .player-settings-main-actions .player-settings-row { padding-inline: 6px; }
body.player-view .player-settings-row { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; gap: 12px; padding: 0 11px; color: #f2f3f0; border: 0; border-radius: 8px; background: transparent; text-align: left; font: inherit; font-size: 15px; font-weight: 650; cursor: pointer; transition: transform .17s ease, background-color .17s ease, color .17s ease; }
body.player-view .player-settings-row:hover { color: #fff; background: rgba(255,255,255,.075); transform: translateY(-1px); }
body.player-view .player-settings-row > span { display: flex; align-items: center; min-width: 0; gap: 10px; }
body.player-view .player-settings-row > span > i { width: 16px; color: rgba(255,255,255,.6); text-align: center; }
body.player-view .player-settings-row > i { color: rgba(255,255,255,.64); font-size: 11px; }
body.player-view .player-settings-subtitle-toggle { min-height: 48px; margin-top: 0; padding-top: 0; border-top: 0; border-radius: 8px; }
body.player-view .player-settings-switch { position: relative; flex: 0 0 44px; width: 44px; height: 24px; border-radius: 999px; background: #3a3d3c; transition: background-color .18s ease; }
body.player-view .player-settings-switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .18s ease; }
body.player-view .player-settings-subtitle-toggle.is-enabled .player-settings-switch,
body.player-view .player-turbo-toggle.is-enabled .player-settings-switch { background: #53aa29; }
body.player-view .player-settings-subtitle-toggle.is-enabled .player-settings-switch i,
body.player-view .player-turbo-toggle.is-enabled .player-settings-switch i { transform: translateX(20px); }
body.player-view .player-settings-option-list { display: grid; gap: 2px; }
body.player-view .player-settings-option { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; gap: 12px; padding: 0 11px; color: #f1f2ef; border: 0; border-radius: 8px; background: transparent; text-align: left; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; transition: transform .17s ease, background-color .17s ease, color .17s ease; }
body.player-view .player-settings-option:hover { background: rgba(255,255,255,.09); transform: translateY(-1px); }
body.player-view .player-settings-option.active .menu-link-right > i,
body.player-view .player-settings-option.selected .menu-link-right > i { color: #55b52d; font-size: 16px; }
body.player-view .player-settings-option .menu-link-title { flex: 1 1 auto; min-width: 0; }
body.player-view .player-settings-option .menu-link-right { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; min-width: 18px; }
body.player-view .player-settings-menu[data-view="quality"] {
  height: min(496px, calc(100dvh - 96px));
  max-height: min(496px, calc(100dvh - 96px));
}
body.player-view .player-settings-menu[data-view="quality"] .player-settings-body {
  flex: 1 1 auto;
  padding: 16px 24px 24px;
}
body.player-view .player-settings-menu[data-view="quality"] [data-settings-screen="quality"] .player-settings-option-list {
  padding-top: 0;
}
body.player-view .player-settings-menu[data-view="quality"] [data-settings-screen="quality"] .player-settings-option {
  min-height: 46px;
  padding-inline: 4px;
  border-radius: 0;
  font-size: 16px;
}
body.player-view .player-settings-empty { margin: 4px 0; padding: 12px 10px; color: rgba(255,255,255,.6); font-size: 12px; line-height: 1.5; }
body.player-view .player-settings-section { padding: 14px 5px 16px; border-bottom: 1px solid rgba(255,255,255,.11); }
body.player-view .player-settings-section:first-child { padding-top: 2px; }
body.player-view .player-settings-section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: #f4f5f1; font-size: 13px; font-weight: 700; }
body.player-view .player-settings-section-title strong { display: inline-flex; align-items: center; gap: 8px; color: #f4f5f1; font-size: 12px; font-variant-numeric: tabular-nums; }
body.player-view .player-settings-segmented { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; padding: 4px; border-radius: 9px; background: rgba(255,255,255,.075); }
body.player-view .player-settings-segmented#player-zoom-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
body.player-view .player-settings-segmented button { min-width: 0; min-height: 34px; padding: 0 3px; color: rgba(255,255,255,.62); border: 0; border-radius: 6px; background: transparent; font: inherit; font-size: 11px; font-weight: 650; white-space: nowrap; cursor: pointer; transition: transform .15s ease, background-color .15s ease, color .15s ease; }
body.player-view .player-settings-segmented button:hover { color: #fff; background: rgba(255,255,255,.1); transform: translateY(-1px); }
body.player-view .player-settings-segmented button.active { color: #f8f9f6; background: rgba(255,255,255,.2); }
body.player-view .player-settings-menu input[type="range"] { width: 100%; height: 4px; margin: 4px 0 0; accent-color: #95ff50; cursor: pointer; }
body.player-view .player-settings-range-labels { display: flex; justify-content: space-between; margin-top: 6px; color: rgba(255,255,255,.5); font-size: 10px; }
body.player-view .player-settings-reset { display: grid; width: 25px; height: 25px; place-items: center; padding: 0; color: rgba(255,255,255,.55) !important; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
body.player-view .player-settings-reset:hover { color: #fff !important; background: rgba(255,255,255,.1); }
body.player-view .player-settings-modify-colors { min-height: 52px; margin-top: 5px; border-top: 1px solid rgba(255,255,255,.1); border-radius: 0; }
body.player-view .player-settings-reset-all { width: 100%; min-height: 40px; margin-top: 12px; color: #f1f2ef; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: rgba(255,255,255,.06); font: inherit; font-size: 12px; cursor: pointer; transition: background-color .17s ease, transform .17s ease; }
body.player-view .player-settings-reset-all:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }

/* Give every interactive player button the same quick response on pointer and touch. */
body.player-view .player-section button:not(:disabled) {
  transition: transform .17s cubic-bezier(.2,.75,.25,1), color .17s ease, background-color .17s ease, border-color .17s ease, box-shadow .17s ease, filter .17s ease;
}
body.player-view .player-section button:not(:disabled):hover { filter: brightness(1.1); }
body.player-view .player-section button:not(:disabled):active { transform: scale(.96); filter: brightness(.94); }
body.player-view .player-section button.player-center-play:not(:disabled):active { transform: translate(-50%,-50%) scale(.94); }
body.player-view .player-section button:not(:disabled):focus-visible { outline: 2px solid #95ff50; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  body.player-view .player-section button:not(:disabled) { transition: none; animation: none; }
}

@media (max-width: 650px) {
  body.player-view .player-settings-menu { right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); width: min(343px, calc(100vw - 24px)); max-height: min(78svh, 620px); }
  body.player-view .player-settings-body { padding: 24px; }
  body.player-view .player-settings-summary { min-height: 80px; padding-inline: 12px; }
  body.player-view .player-settings-segmented button { font-size: 10px; }
  body.player-view .player-settings-menu[data-view="quality"] {
    right: 12px;
    bottom: calc(48px + env(safe-area-inset-bottom));
    width: min(343px, calc(100vw - 10px));
    height: min(496px, calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
    max-height: min(496px, calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  }
}
@media (prefers-reduced-motion: reduce) {
  body.player-view .player-settings-menu,
  body.player-view .player-settings-menu button,
  body.player-view .player-settings-switch,
  body.player-view .player-settings-switch i { animation: none; transition: none; }
}

/* Final player-control layout: one set of actions, repositioned only on phones. */
body.player-view .player-center-controls { display: contents; }
body.player-view .player-loading-spinner {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  pointer-events: none;
  transform: translate(-50%,-50%);
}
body.player-view .player-loading-spinner[hidden] { display: none !important; }
body.player-view .player-loading-spinner > span {
  display: block;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(255,255,255,.22);
  border-top-color: #fff;
  border-right-color: rgba(255,255,255,.82);
  border-radius: 50%;
  animation: player-buffer-spin .8s linear infinite;
}
@keyframes player-buffer-spin { to { transform: rotate(360deg); } }

@media (max-width: 650px) {
  body.player-view .player-section .vjs-tech { object-fit: contain !important; object-position: center; }
  body.player-view .player-toolbar { grid-template-columns: 1fr; }
  body.player-view .player-top-title { right: 42px; left: 42px; }
  body.player-view .player-controls { min-height: 104px; padding: 42px 15px max(12px,env(safe-area-inset-bottom)); }
  body.player-view .player-seek-slider { width: calc(100% - 76px); height: 4px; margin: 0 0 10px auto; }
  body.player-view .player-control-row { position: relative; justify-content: space-around; gap: 0; min-height: 34px; }
  body.player-view .player-control-left,
  body.player-view .player-control-right { display: contents; gap: 0; }
  body.player-view .player-control-right { margin-left: 0; }
  body.player-view .player-center-controls {
    position: fixed;
    z-index: 8;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: clamp(20px,8vw,38px);
    transform: translate(-50%,-50%);
  }
  body.player-view .player-center-controls .player-control-button { width: clamp(44px,13vw,58px); height: 58px; font-size: 27px; }
  body.player-view .player-center-controls .player-center-toggle { order: 2; width: clamp(66px,19vw,78px); height: 78px; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; font-size: clamp(48px,14vw,58px); }
  body.player-view .player-center-controls .player-center-toggle:hover,
  body.player-view .player-center-controls .player-center-toggle:active { border: 0 !important; background: transparent !important; box-shadow: none !important; transform: none; filter: none; }
  body.player-view .player-center-controls .player-center-skip-back { order: 1; }
  body.player-view .player-center-controls .player-center-skip-forward { order: 3; }
  body.player-view .player-center-controls .player-center-skip > span { right: 0; bottom: 7px; font-size: 12px; }
  body.player-view .player-control-row > .player-play-toggle,
  body.player-view .player-control-row > .player-skip-button { display: none; }
  body.player-view .player-time { position: absolute; bottom: calc(100% + 10px); left: 0; gap: 4px; font-size: 10px; }
  body.player-view .player-time-divider,
  body.player-view #player-total-time { display: none; }
  body.player-view .player-volume-slider { display: none; }
  body.player-view .player-control-button { width: 30px; height: 34px; font-size: 16px; }
  body.player-view .player-subtitle-settings { font-size: 17px; }
  body.player-view .player-section.player-fullscreen-ui-idle .player-center-controls { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
  body.player-view .player-section.player-is-buffering .player-center-toggle { visibility: hidden; pointer-events: none; }
}

@media (max-width: 650px) and (max-height: 420px) {
  body.player-view .player-controls { min-height: 92px; padding: 28px 12px max(10px,env(safe-area-inset-bottom)); }
  body.player-view .player-seek-slider { margin-bottom: 8px; }
  body.player-view .player-control-row { min-height: 30px; }
  body.player-view .player-center-controls { top: 40%; gap: 18px; }
  body.player-view .player-center-controls .player-control-button { width: 42px; height: 48px; font-size: 23px; }
  body.player-view .player-center-controls .player-center-toggle { width: 54px; height: 56px; font-size: 30px; }
}

@media (max-width: 380px) {
  body.player-view .player-controls { padding-inline: 9px; }
  body.player-view .player-seek-slider { width: calc(100% - 70px); }
  body.player-view .player-control-button { width: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  body.player-view .player-loading-spinner > span { animation-duration: 1.6s; }
}

