/* ==========================================================================
   MODERN STANDALONE VIDEO PLAYER TEMPLATE DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wdth,wght@0,6..12,75..125,200..1000;1,6..12,75..125,200..1000&display=swap');

:root {
  --font-sans: 'Nunito Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-dark: #050505;
  --bg-popover: rgba(11, 20, 23, 0.74);
  --bg-control-pill: rgba(21, 30, 40, 0.62);
  --border-control-pill: rgba(255, 255, 255, 0.15);
  --border-popover: rgba(255, 255, 255, 0.13);
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  --primary-color: #8AD7D0;
  --secondary-color: #B2EFEA;
  --icon-color: #FFFFFF;
  --sub-font-size: 1.25rem;
  --sub-color: #ffffff;
  --sub-bg: rgba(0, 0, 0, 0.65);
  --sub-shadow: 0 2px 4px rgba(0, 0, 0, 0.95);
}

/* Subtitle WebVTT Cue Styling */
video::cue {
  font-family: 'Nunito Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: var(--sub-font-size, 1.25rem) !important;
  color: var(--sub-color, #ffffff) !important;
  background-color: var(--sub-bg, rgba(0, 0, 0, 0.65)) !important;
  text-shadow: var(--sub-shadow, 0 2px 4px rgba(0, 0, 0, 0.95)) !important;
  white-space: pre-wrap !important;
  line-height: 1.35 !important;
  border-radius: 4px !important;
  padding: 0.15em 0.45em !important;
}

/* Subtitle Settings UI Styles */
.sub-setting-group {
  margin-bottom: 12px;
}

.sub-setting-title {
  font-size: 0.7rem;
  color: #a1a1aa;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}

.sub-pill-row {
  display: flex;
  gap: 5px;
  width: 100%;
}

.sub-pill-btn {
  flex: 1;
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #e4e4e7;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.sub-pill-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
}

.sub-pill-btn.active {
  background: var(--primary-color, #8AD7D0) !important;
  color: #000000 !important;
  border-color: var(--primary-color, #8AD7D0) !important;
  font-weight: 700;
}

.sub-color-pill {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sub-color-pill:hover {
  transform: scale(1.1);
}

.sub-color-pill.active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px #ffffff, 0 0 8px rgba(255, 255, 255, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
}

/* Page Frame */
.main-wrapper {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  gap: 0;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   AMBIENT GLOW
   ========================================================================== */
.ambient-glow-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ambient-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.12, 1.25);
  width: 95%;
  height: 90%;
  filter: blur(55px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.4s ease;
  border-radius: 2rem;
}

/* ==========================================================================
   MAIN PLAYER CONTAINER & PLACEHOLDER
   ========================================================================== */
.player-slot-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Page Placeholder Card when player is floating in PiP */
.player-minimized-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0.85rem;
  z-index: 5;
}

.player-minimized-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.player-minimized-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.restore-placeholder-btn {
  padding: 0.45rem 1.1rem;
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.restore-placeholder-btn:hover {
  opacity: 0.85;
  transform: scale(1.03);
}

.app-player-root {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  background: #000;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  container-type: inline-size;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.app-player-root.theater-mode {
  max-width: 100vw;
  width: 100vw;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.app-player-root:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
}

/* ==========================================================================
   CENTERED BUFFERING SPINNER (SIMPLE WHITE WITH ROUNDED CAPS & KEYFRAME GRAPH)
   ========================================================================== */
.player-buffering-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 25;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s ease;
}

.player-buffering-loader.active {
  opacity: 1;
  visibility: visible;
}

.buffering-spinner-svg {
  width: 50px;
  height: 50px;
  animation: spinnerRotate 2s linear infinite;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.75));
  transform-origin: center center;
}

.buffering-spinner-track {
  opacity: 0.8;
}

.buffering-spinner-circle {
  transform-origin: center center;
  animation: spinnerDash 1.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spinnerRotate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes spinnerDash {
  0% {
    stroke-dasharray: 1, 126;
    stroke-dashoffset: 0;
    transform: rotate(0deg);
  }

  50% {
    stroke-dasharray: 92, 126;
    stroke-dashoffset: -32;
    transform: rotate(135deg);
  }

  100% {
    stroke-dasharray: 1, 126;
    stroke-dashoffset: -125;
    transform: rotate(450deg);
  }
}

/* ==========================================================================
   AUTO PIP / MINIPLAYER FLOATING STATE (EXACT IMAGE 3 REPRODUCTION)
   ========================================================================== */
.app-player-root.floating-miniplayer {
  position: fixed !important;
  bottom: var(--mini-b, 24px) !important;
  right: var(--mini-r, 24px) !important;
  width: 380px !important;
  height: 214px !important;
  /* Fixed height for better transition */
  aspect-ratio: 16 / 9 !important;
  z-index: 99999 !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.16) !important;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
  overflow: hidden !important;
  cursor: pointer;
  touch-action: none;
}

.app-player-root.is-dragging {
  transition: none !important;
  touch-action: none !important;
  user-select: none !important;
}

@media (max-width: 768px) {
  .app-player-root.floating-miniplayer {
    bottom: var(--mini-b, 16px) !important;
    right: var(--mini-r, 16px) !important;
    width: 250px !important;
    height: 140px !important;
    border-radius: 12px !important;
  }
}

@keyframes miniplayerPop {
  from {
    transform: translateY(40px) scale(0.85);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ---- PiP Mode: hide non-miniplayer overlays ---- */
.app-player-root.floating-miniplayer .overlay-scrim,
.app-player-root.floating-miniplayer .mobile-player-overlay,
.app-player-root.floating-miniplayer .mobile-scrubber-bar-container,
.app-player-root.floating-miniplayer .captions-display-container,
.app-player-root.floating-miniplayer .skip-segment-btn,
.app-player-root.floating-miniplayer .speed-top-banner,
.app-player-root.floating-miniplayer .mobile-settings-drawer,
.app-player-root.floating-miniplayer .settings-popover-card {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Miniplayer Overlay Container (Image 3) */
.miniplayer-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.app-player-root.floating-miniplayer .miniplayer-overlay {
  display: block;
  opacity: 0;
}

.app-player-root.floating-miniplayer:hover .miniplayer-overlay,
.app-player-root.floating-miniplayer.paused .miniplayer-overlay {
  opacity: 1;
}

/* Top-Left Expand / Restore Button (Exact Image 3) */
.mini-restore-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.mini-restore-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.08);
}

/* Top-Right Close Button */
.mini-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.mini-close-btn:hover {
  background: rgba(239, 68, 68, 0.8);
  transform: scale(1.08);
}

/* Center Play Triangle (Exact Image 3) */
.miniplayer-center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
}

.mini-center-play-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.7));
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
}

.mini-center-play-btn:hover {
  transform: scale(1.15);
}

/* Bottom Bar: Time Badge & Scrubber (Exact Image 3) */
.miniplayer-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
}

.mini-time-badge {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mini-scrubber-track {
  position: relative;
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 9999px;
  cursor: pointer;
}

.mini-progress-bar {
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 9999px;
}

.mini-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 12px;
  background: #ffffff;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  border: 1px solid transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.mini-scrubber-track:hover .mini-progress-thumb,
.mini-scrubber-track:active .mini-progress-thumb {
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  -webkit-backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
  transform: translate(-50%, -50%);
}

.mini-scrubber-tooltip {
  position: absolute;
  bottom: 14px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.mini-scrubber-tooltip.visible {
  opacity: 1;
}

.video-core {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  border-radius: 0.85rem;
  overflow: hidden;
  z-index: 1;
  transition: object-fit 0.2s ease, width 0.2s ease, height 0.2s ease;
}

/* Aspect Ratio Modifiers */
.video-core[data-aspect-ratio="auto"] {
  object-fit: contain;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
}

.video-core[data-aspect-ratio="16:9"] {
  object-fit: fill;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
}

.video-core[data-aspect-ratio="4:3"] {
  object-fit: fill;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
}

.video-core[data-aspect-ratio="21:9"] {
  object-fit: fill;
  width: 100%;
  height: 100%;
  aspect-ratio: 21 / 9;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
}

.video-core[data-aspect-ratio="stretch"] {
  object-fit: fill;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-width: none;
  max-height: none;
  margin: 0;
}

.video-core[data-aspect-ratio="cover"] {
  object-fit: cover;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-width: none;
  max-height: none;
  margin: 0;
}

/* ==========================================================================
   OVERLAYS (NO BOTTOM LINEAR GRADIENT - 100% CLEAR VIDEO)
   ========================================================================== */
.overlay-scrim {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.65rem;
  /* Only a delicate top shadow for episode title readability; bottom is 100% transparent */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.1) 18%, transparent 35%);
}

.app-player-root:hover .overlay-scrim,
.app-player-root.controls-visible .overlay-scrim,
.app-player-root.paused .overlay-scrim {
  opacity: 1;
}

.app-player-root.hide-cursor {
  cursor: none;
}

/* Subtitles Display Container (Image 1 subtitle styling) */
.captions-display-container {
  position: absolute;
  bottom: 4.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  pointer-events: none;
  text-align: center;
  max-width: 85%;
  transition: bottom 0.2s ease;
}

.caption-cue {
  font-family: inherit;
  font-size: 1.28rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.35;
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000, 0 3px 6px rgba(0, 0, 0, 0.95);
  letter-spacing: 0.01em;
}

/* ==========================================================================
   EXACT CONTROL PILLS & RATIOS (IMAGES 1-4 EXACT HOVER INSETS)
   ========================================================================== */
.control-group {
  background-color: var(--bg-control-pill);
  border: none;
  border-radius: var(--radius-full);
  overflow: hidden;
  height: 48px;
  padding: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  pointer-events: auto;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  transition: background-color 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.ctrl-bubble-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  border-radius: var(--radius-full);
  height: 40px;
  min-width: 40px;
  padding: 0 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

.ctrl-bubble-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ctrl-bubble-btn:active {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(0.96);
}

.ctrl-bubble-btn.active {
  background: rgba(255, 255, 255, 0.22);
}

.ctrl-bubble-btn svg {
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

#pc-btn-play svg,
#pc-btn-play.ctrl-bubble-btn svg {
  width: 22px;
  height: 22px;
}

/* Time Badge Pill (Screenshot 2 exact inset padding) */
.time-pill-badge {
  background-color: var(--bg-control-pill);
  border: none;
  border-radius: var(--radius-full);
  height: 48px;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  box-sizing: border-box;
}

.time-pill-inner {
  height: 40px;
  padding: 0 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
  transition: background 0.15s ease;
}

.time-pill-badge:hover .time-pill-inner {
  background: rgba(255, 255, 255, 0.18);
}

/* Scrubber Timeline (Image 1 Tb) */
.pc-timeline-container {
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
  cursor: pointer;
  padding: 6px 0;
}

.pc-timeline-track {
  width: 100%;
  height: 5px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 9999px;
  position: relative;
  transition: height 0.15s ease;
  z-index: 1;
}

.pc-timeline-container:hover .pc-timeline-track {
  height: 8px;
}

.pc-timeline-buffered {
  position: absolute;
  top: 0;
  left: 2px;
  height: 100%;
  width: 0%;
  background: var(--secondary-color, rgba(255, 255, 255, 0.35));
  border-radius: 9999px;
}

.pc-timeline-intro,
.pc-timeline-intermission,
.pc-timeline-outro {
  position: absolute;
  top: 0;
  height: 100%;
  z-index: 2;
  border-radius: 9999px;
  pointer-events: none;
}

.pc-timeline-intro {
  background: rgba(34, 197, 94, 0.92);
}

.pc-timeline-intermission {
  background: rgba(234, 179, 8, 0.92);
}

.pc-timeline-outro {
  background: rgba(239, 68, 68, 0.92);
}

.pc-timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--primary-color, #ffffff);
  border-radius: 9999px;
  z-index: 2;
  transition: background-color 0.2s ease;
}

.pc-timeline-progress:active {
  border-radius: 2px;
}

.pc-timeline-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 24px;
  height: 12px;
  background: #ffffff !important;
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  border: 1px solid transparent;
  z-index: 4;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease,
    border-color 0.3s ease;
}

.pc-timeline-thumb.physics-active {
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease,
    border-color 0.3s ease;
}

.pc-timeline-container:hover .pc-timeline-thumb {
  transform: translate(-50%, -50%) scale(1);
}

.pc-timeline-container.dragging .pc-timeline-thumb {
  transform: translate(-50%, -50%) scale(1);
  width: 32px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(2px) saturate(150%) !important;
  -webkit-backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%) !important;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.pc-timeline-tooltip {
  position: absolute;
  top: -28px;
  transform: translateX(-50%);
  background: rgba(18, 24, 38, 0.559);
  border-radius: var(--radius-md);
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 15;
}

.pc-timeline-tooltip.visible {
  opacity: 1;
}

/* Bottom Bar Row */
.pc-bottom-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  pointer-events: auto;
  gap: 0.6rem;
}

.pc-bottom-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pc-bottom-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

/* Volume Slider in PC Control Group (Screenshot 3 exact inset & capsule) */
.volume-group-wrapper {
  display: inline-flex;
  align-items: center;
}

.vol-slider-holder {
  width: 0;
  opacity: 0;
  overflow: hidden;
  transition: width 0.22s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, margin 0.2s ease;
  display: flex;
  align-items: center;
}

.volume-group-wrapper:hover .vol-slider-holder,
.volume-group-wrapper:focus-within .vol-slider-holder {
  width: 120px;
  opacity: 1;
  margin-right: 0.65rem;
  margin-left: 0.25rem;
}

.vol-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  background: transparent;
  outline: none;
  cursor: pointer;
}

.vol-slider-input::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(to right,
      var(--vol-color, rgba(255, 255, 255, 0.95)) var(--vol, 100%),
      rgba(255, 255, 255, 0.15) var(--vol, 100%));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
}

.vol-slider-input::-moz-range-track {
  width: 100%;
  height: 6px;
  background: linear-gradient(to right,
      var(--vol-color, rgba(255, 255, 255, 0.95)) var(--vol, 100%),
      rgba(255, 255, 255, 0.15) var(--vol, 100%));
  border-radius: var(--radius-full);
}

.vol-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
  margin-top: -5px;
  transform: scaleX(var(--vol-scale-x, 1)) scaleY(var(--vol-scale-y, 1));
}

.vol-slider-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
  transform: scaleX(var(--vol-scale-x, 1)) scaleY(var(--vol-scale-y, 1));
}

/* ==========================================================================
   SETTINGS POPOVER CARD (EXACT IMAGES 1, 2, & 3 REPRODUCTION)
   ========================================================================== */
.settings-popover-card {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 285px;
  max-height: min(330px, calc(100vh - 6rem), 75vh);
  background: rgba(7, 9, 14, 0.72);
  border-radius: 1.15rem;
  backdrop-filter: blur(32px) saturate(210%);
  -webkit-backdrop-filter: blur(32px) saturate(210%);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  clip-path: inset(0 round 1.15rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 0.45rem 0.5rem;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-popover-card::-webkit-scrollbar {
  width: 4px;
}

.settings-popover-card::-webkit-scrollbar-track {
  background: transparent;
}

.settings-popover-card::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.settings-popover-card.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.popover-view-block {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  width: 100%;
}

.popover-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.42rem 0.65rem;
  border-radius: 0.65rem;
  color: #ffffff;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  transition: background 0.15s ease;
  text-align: left;
}

.popover-item-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.popover-item-row:active {
  background: rgba(255, 255, 255, 0.14);
}

.popover-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.popover-item-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.popover-item-icon svg,
.reze-server-icon-wrap svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.popover-item-right-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Minimal Modern Toggle Switch (Exact Images 2 & 3) */
.toggle-switch {
  width: 36px;
  height: 18px;
  background: #94949F77;
  border-radius: var(--radius-full);
  position: relative;
  transition: background 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  /* Slide-to-unlock container for thumb */
  display: flex;
  align-items: center;
  touch-action: none;
  /* Prevent scroll on touch drag */
}

.toggle-switch.checked {
  background: #3BBF4EEE;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.toggle-switch-thumb {
  width: 14px;
  height: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 1);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease, width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, top 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

/* Dragging active state - thumb swells and becomes glass-like */
.toggle-switch.dragging .toggle-switch-thumb,
.toggle-switch:active .toggle-switch-thumb {
  width: 17px;
  height: 14px;
  top: 2px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  -webkit-backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 2px 2px 8px rgba(0, 0, 0, 0.05), inset -2px -2px 8px rgba(255, 255, 255, 0.05);
}

/* Checked state transform */
.toggle-switch.checked .toggle-switch-thumb {
  transform: translateX(18px);
}

/* Checked and active/dragging state transform */
.toggle-switch.checked.dragging .toggle-switch-thumb,
.toggle-switch.checked:active .toggle-switch-thumb {
  transform: translateX(15px);
}

/* Sub-views Header Buttons & Dividers */
.popover-sub-header-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.55rem;
  background: rgba(10, 14, 22, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: background 0.15s ease;
  text-align: left;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 5;
}

.popover-sub-header-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.popover-divider-line {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0.2rem 0;
}

.popover-options-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  max-height: 200px;
  overflow-y: auto;
}

.check-mark {
  color: #60a5fa;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ==========================================================================
   AUDIO BOOST SLIDER IN MORE MENU (IMAGE 3)
   ========================================================================== */
.boost-control-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem 0.25rem;
}

.boost-label-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.boost-title {
  font-size: 0.84rem;
  font-weight: 500;
  color: #ffffff;
}

.boost-percentage-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.boost-slider-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0.25rem 0;
}

.boost-slider-wrapper::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 6px;
  width: 100%;
  background: linear-gradient(to right, white, #3bbf53, #ff7315, #ff3333);
  border-radius: var(--radius-full);
  pointer-events: none;
  z-index: 1;
  clip-path: inset(0 calc(100% - var(--boost-percent, 0%)) 0 0);
}

.boost-range-slider {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  z-index: 2;
  width: 100%;
  height: 24px;
  background: transparent;
  outline: none;
  cursor: pointer;
}

.boost-range-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
}

.boost-range-slider::-moz-range-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}

.boost-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
  cursor: pointer;
  margin-top: -5px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.boost-range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid transparent;
  backdrop-filter: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.boost-range-slider::-webkit-slider-thumb:hover,
.boost-range-slider::-webkit-slider-thumb:active {
  transform: scale(1.25);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  -webkit-backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.boost-range-slider::-moz-range-thumb:hover,
.boost-range-slider::-moz-range-thumb:active {
  transform: scale(1.25);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Speed Preset Buttons */
.speed-presets-container {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.speed-preset-btn {
  flex: 1;
  padding: 0.4rem 0.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: var(--radius-xl);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.speed-preset-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.speed-preset-btn.active {
  background: #ffffff;
  color: #000000;
}

/* ==========================================================================
   MOBILE CONTROLS LAYOUT (IMAGES 4 & 5)
   ========================================================================== */
.mobile-device-frame {
  width: 100%;
  background: transparent;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* In mobile mode, allow overflow so the outside scrubber is visible below the video */
.app-player-root.mobile-mode:not(:fullscreen) {
  overflow: visible !important;
}

.app-player-root.mobile-mode:not(:fullscreen) .video-core {
  border-radius: 8px !important;
  overflow: hidden;
}

.app-player-root.mobile-mode:not(:fullscreen) .mobile-player-overlay {
  border-radius: 8px;
  overflow: hidden;
}

.mobile-player-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  opacity: 0;
  background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.25s ease, background 0.25s ease;
}

.app-player-root.mobile-mode:hover .mobile-player-overlay,
.app-player-root.mobile-mode.controls-visible .mobile-player-overlay,
.app-player-root.mobile-mode.paused .mobile-player-overlay {
  opacity: 1;
}

.mobile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
  pointer-events: auto;
  padding: 0.65rem 0.85rem 1.25rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 70%, transparent 100%);
}

/* Dynamic Toast Notification Pill ("+10s", "-10s", "Failed to load...", etc.) */
.player-toast-pill {
  position: absolute;
  left: 50%;
  top: 4.5%;
  transform: translateX(-50%) scale(0.85);
  background: rgba(18, 20, 29, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 9999px;
  padding: 6px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  max-width: 280px;
  line-height: 1.35;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  white-space: normal;
  z-index: 40;
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.player-toast-pill.visible {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Double Tap Ripple Overlays (Left: -10s, Right: +10s) */
.double-tap-ripple {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  pointer-events: none;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  overflow: hidden;
}

.double-tap-ripple.left {
  left: 0;
  border-radius: 0.85rem 0 0 0;
  background: radial-gradient(circle at 35% 50%, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
}

.double-tap-ripple.right {
  right: 0;
  border-radius: 0 0.85rem 0 0;
  background: radial-gradient(circle at 65% 50%, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
}

.double-tap-ripple.active {
  animation: doubleTapPulse 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes doubleTapPulse {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }

  30% {
    transform: scale(1.05);
    opacity: 1;
  }

  70% {
    transform: scale(1);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.1);
    opacity: 0;
  }
}

.ripple-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.ripple-text {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.mobile-top-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-icon-btn {
  background: none;
  border: none;
  color: #ffffff;
  padding: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.mobile-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Icon contrast drop-shadows on white scenes */
.mobile-icon-btn svg,
.mobile-center-circle-btn svg,
.mobile-time-badge {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.85));
}

.mobile-center-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  pointer-events: auto;
}

#mobile-btn-prev {
  grid-column: 1;
  justify-self: end;
}

#mobile-btn-play {
  grid-column: 2;
  justify-self: center;
}

#mobile-btn-next {
  grid-column: 3;
  justify-self: start;
}

.mobile-center-circle-btn {
  background: rgba(0, 0, 0, 0.38);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.mobile-center-circle-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.15);
}

.mobile-center-circle-btn.side {
  width: 48px;
  height: 48px;
}

.mobile-center-circle-btn.side svg {
  width: 24px;
  height: 24px;
}

.mobile-center-circle-btn.center-play {
  width: 60px;
  height: 60px;
}

.mobile-center-circle-btn.center-play svg {
  width: 30px;
  height: 30px;
}

.mobile-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.25rem 0.85rem 0.75rem;
  pointer-events: auto;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.25) 70%, transparent 100%);
}

/* Mobile Edge Scrubber Bar - Hidden on PC/Desktop */
.mobile-scrubber-bar-container {
  display: none;
}

/* In mobile mode, position scrubber OUTSIDE the video frame right along the bottom */
.app-player-root.mobile-mode .mobile-scrubber-bar-container {
  display: flex;
  width: 100%;
  height: 16px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  cursor: pointer;
  pointer-events: auto;
  z-index: 45;
  overflow: visible;
  align-items: center;
  margin-top: 2px;
}

/* When fullscreen on mobile, position inside at the bottom */
.app-player-root.mobile-mode:fullscreen .mobile-scrubber-bar-container,
.app-player-root.mobile-mode.theater-mode .mobile-scrubber-bar-container {
  top: auto !important;
  bottom: 12px !important;
  left: 16px !important;
  right: 16px !important;
  width: calc(100% - 32px) !important;
  margin-top: 0 !important;
  z-index: 50;
}

.mobile-scrubber-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  position: relative;
  transition: height 0.15s ease;
}

.app-player-root.mobile-mode.controls-visible .mobile-scrubber-track,
.mobile-scrubber-bar-container.dragging .mobile-scrubber-track {
  height: 4px;
}

.mobile-scrubber-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
}

.mobile-timeline-intro,
.mobile-timeline-intermission,
.mobile-timeline-outro {
  position: absolute;
  top: 0;
  height: 100%;
  z-index: 2;
  border-radius: 2px;
}

.mobile-timeline-intro {
  background: rgba(34, 197, 94, 0.85);
}

.mobile-timeline-intermission {
  background: rgba(234, 179, 8, 0.85);
}

.mobile-timeline-outro {
  background: rgba(239, 68, 68, 0.85);
}

.mobile-scrubber-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #ffffff;
  border-radius: 9999px;
  z-index: 3;
}

/* Scrubber Thumb Dot: Hidden in Normal State, Visible in Clicked/Active State */
.mobile-scrubber-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%) scale(0);
  width: 24px;
  height: 12px;
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  z-index: 50;
  pointer-events: auto;
  opacity: 0;
  border: 1px solid transparent;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease,
    width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease;
}

.mobile-scrubber-thumb.physics-active {
  transition: opacity 0.2s ease,
    width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    backdrop-filter 0.3s ease,
    -webkit-backdrop-filter 0.3s ease;
}

.app-player-root.mobile-mode.controls-visible .mobile-scrubber-thumb,
.app-player-root.mobile-mode.paused .mobile-scrubber-thumb,
.app-player-root.mobile-mode:hover .mobile-scrubber-thumb {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
}

.mobile-scrubber-bar-container.dragging .mobile-scrubber-thumb {
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) !important;
  width: 40px;
  height: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  -webkit-backdrop-filter: url(#glass-refraction) blur(8px) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Mobile Time Badge */
.mobile-time-badge {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* ==========================================================================
   MOBILE BOTTOM SHEET DRAWER (IMAGE 5)
   ========================================================================== */
.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 55;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
  border-radius: 0.85rem;
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-settings-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 75% !important;
  max-height: 75vh !important;
  background: rgba(14, 18, 25, 0.78);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  clip-path: inset(0 round 1.5rem 1.5rem 0 0);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 0.5rem 1rem 1.75rem;
  z-index: 60;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s ease, visibility 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-settings-drawer::-webkit-scrollbar {
  width: 4px;
}

.mobile-settings-drawer::-webkit-scrollbar-track {
  background: transparent;
}

.mobile-settings-drawer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.mobile-settings-drawer.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-drawer-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  align-self: center;
  margin-bottom: 0.4rem;
  cursor: pointer;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 5;
}

/* Skip Segment Button (Floating Intro/Outro/Intermission Skip) */
.skip-segment-btn {
  position: absolute;
  bottom: 6rem;
  right: 1.25rem;
  background: var(--bg-control-pill);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 9999px;
  border: none;
  padding: 0.45rem 1rem;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  z-index: 20;
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: background 0.15s ease, transform 0.15s ease;
}

.skip-segment-btn:hover {
  background: rgba(30, 42, 60, 0.95);
  transform: scale(1.04);
}

.skip-segment-btn:active {
  transform: scale(0.96);
}

.speed-top-banner {
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.speed-top-banner.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Home Indicator Bar (Image 3 exact bottom handle) */
.home-indicator-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 0 6px 0;
  width: 100%;
}

.home-indicator-bar {
  width: 135px;
  height: 4.5px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 9999px;
}

/* Subtitle Position in Mobile View */
.app-player-root.mobile-mode .captions-display-container {
  bottom: 2.2rem;
  font-size: 0.95rem;
}

/* Resume Prompt Modal */
.resume-prompt-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resume-prompt-card {
  background: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: popIn 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.resume-prompt-content h3 {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.resume-prompt-content p {
  margin: 0 0 24px 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.4;
}

.resume-prompt-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.resume-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, filter 0.2s;
  color: #fff;
}

.resume-btn:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

.resume-btn:active {
  transform: scale(0.95);
}

.btn-reject {
  background: rgba(255, 59, 48, 0.8);
  box-shadow: 0 4px 15px rgba(255, 59, 48, 0.3);
}

.btn-accept {
  background: rgba(52, 199, 89, 0.8);
  box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   CENTER BEAT INDICATOR
   ========================================================================== */
.center-beat-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 15;
}

.beat-circle {
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.center-beat-indicator.active .beat-circle {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.1s ease, transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.center-beat-indicator.fade-out .beat-circle {
  opacity: 0;
  transform: scale(1.3);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

@media (max-width: 768px) {
  .skip-segment-btn {
    bottom: 0.75rem;
    right: 3.25rem;
  }

  .mobile-volume.control-group {
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    height: auto;
  }

  .mobile-volume.active .vol-slider-holder,
  .mobile-volume:focus-within .vol-slider-holder {
    width: 80px;
    opacity: 1;
    margin-right: 0.25rem;
    margin-left: 0.25rem;
  }

  .settings-popover-card {
    max-height: 75% !important;
    max-height: 75vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    width: min(285px, calc(100vw - 2rem)) !important;
    bottom: calc(100% + 8px) !important;
    right: 0 !important;
  }
}\n\nbody.is-embed {\n  min-height: 100vh !important;\n  background-color: transparent !important;\n  overflow: hidden !important;\n}\n\nbody.is-embed .main-wrapper {\n  max-width: 100% !important;\n  height: 100vh !important;\n  justify-content: center !important;\n  padding: 0 !important;\n  margin: 0 !important;\n}\n\nbody.is-embed .app-player-root {\n  transform: scale(0.85);\n  transform-origin: center center;\n}\n