/**
 * Base presentation for MediaPlayerUI.
 * Projects may override these custom properties and classes to match their brand.
 */
.mp-root {
  --mp-bg: rgb(8 10 9 / 62%);
  --mp-text: #f7f7f4;
  --mp-muted: rgb(247 247 244 / 68%);
  --mp-track: rgb(255 255 255 / 24%);
  --mp-buffered: rgb(255 255 255 / 44%);
  --mp-accent: #e2c46f;
  --mp-scrim: rgb(0 0 0 / 46%);
  position: relative;
  overflow: hidden;
  background: #080a09;
}
.mp-root.mp-hover-preview {
  --mp-bg: rgb(0 0 0 / 54%);
  --mp-buffered: rgb(255 255 255 / 25%);
}
.mp-root.mp-immersive {
  --mp-bg: rgb(8 10 9 / 68%);
}
.mp-root.mp-has-aspect { aspect-ratio: var(--mp-aspect-ratio, 16 / 9); }
.mp-root:fullscreen { aspect-ratio: auto; }
.mp-root video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mp-controls {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mp-text);
  background: transparent;
  opacity: 1;
  cursor: pointer;
  transition: opacity 180ms ease;
}
.mp-status,
.mp-state {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}
.mp-status {
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 999px;
  color: var(--mp-muted);
  background: rgb(0 0 0 / 48%);
  font-size: 10px;
  line-height: 1;
  backdrop-filter: blur(6px);
}
.mp-status[hidden] {
  display: none;
}
.mp-status-icon-only {
  width: 24px;
  height: 24px;
  padding: 0;
}
.mp-status-icon {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mp-status-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.mp-status-local { color: #bde7c4; }
.mp-status-cloud { color: #c9ddff; }
.mp-status-error { color: #ffc2c2; }
.mp-state {
  top: 50%;
  left: 50%;
  min-width: 96px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--mp-muted);
  background: rgb(0 0 0 / 56%);
  font-size: 11px;
  text-align: center;
  transform: translate(-50%, -50%);
}
.mp-state[data-state="loading"]::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border: 2px solid rgb(255 255 255 / 28%);
  border-top-color: var(--mp-accent);
  border-radius: 50%;
  vertical-align: -2px;
  animation: mp-spin 700ms linear infinite;
}
.mp-state[data-state="error"] { color: #ffc2c2; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-play-center {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 50%;
  color: var(--mp-text);
  background: var(--mp-scrim);
  cursor: pointer;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.mp-play-center:hover { transform: translate(-50%, -50%) scale(1.06); }
.mp-play-center[hidden],
.mp-play-center.is-suppressed { display: none; }
.mp-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 12px;
  background: transparent;
  border-radius: 0;
  backdrop-filter: none;
  cursor: default;
}
.mp-standard .mp-bar {
  display: grid;
  grid-template-areas:
    "progress progress progress progress progress"
    "play volume time spacer right";
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  grid-template-rows: 10px auto;
  gap: 4px 8px;
  min-height: 48px;
  padding: 2px 10px 4px;
}
.mp-standard .mp-play-btn { grid-area: play; }
.mp-standard .mp-progress-track { grid-area: progress; width: 100%; align-self: center; }
.mp-standard .mp-time { grid-area: time; margin: 0; }
.mp-standard .mp-volume { grid-area: volume; }
.mp-standard .mp-right-controls { grid-area: right; }
.mp-standard .mp-spacer { display: block; grid-area: spacer; }
.mp-immersive .mp-bar {
  display: grid;
  grid-template-areas:
    "progress progress progress progress progress"
    "play volume time spacer right";
  grid-template-columns: auto auto auto minmax(0, 1fr) auto;
  grid-template-rows: 10px auto;
  gap: 4px 8px;
  min-height: 48px;
  padding: 2px 12px 4px;
}
.mp-immersive .mp-progress-track { grid-area: progress; width: 100%; align-self: center; }
.mp-immersive .mp-play-btn { grid-area: play; }
.mp-immersive .mp-time { grid-area: time; }
.mp-immersive .mp-spacer { display: block; grid-area: spacer; }
.mp-immersive .mp-volume { grid-area: volume; }
.mp-immersive .mp-right-controls { grid-area: right; }
.mp-right-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  min-height: 28px;
  padding: 0 3px;
  border-radius: 999px;
  background: rgb(0 0 0 / 40%);
  box-shadow: none;
}
.mp-right-controls:empty { display: none; }
.mp-extra-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
}
.mp-extra-controls:empty { display: none; }
.mp-progress-track {
  position: relative;
  flex: 1;
  height: 3px;
  overflow: visible;
  border-radius: 999px;
  background: rgb(0 0 0 / 44%);
  box-shadow: none;
  cursor: pointer;
  transition: height 300ms ease, box-shadow 300ms ease;
}
.mp-progress-track::after {
  content: "";
  position: absolute;
  inset: -14px 0;
  z-index: 0;
  pointer-events: auto;
}
.mp-progress-buffered,
.mp-progress-played { overflow: hidden; z-index: 1; }
.mp-progress-track:hover,
.mp-progress-track:focus {
  height: 6px;
  outline: none;
}
.mp-progress-track:focus-visible {
  box-shadow: 0 0 0 2px rgb(255 255 255 / 22%);
}
.mp-progress-buffered,
.mp-progress-played,
.mp-progress-thumb { position: absolute; }
.mp-progress-buffered,
.mp-progress-played {
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
  pointer-events: none;
}
.mp-progress-buffered {
  width: 100%;
  background: transparent;
}
.mp-buffered-segment {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--mp-buffered);
  pointer-events: none;
}
.mp-hide-buffered .mp-progress-buffered { display: none; }
.mp-progress-played { background: var(--mp-accent); }
.mp-progress-thumb {
  top: 50%;
  left: 0;
  z-index: 2;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--mp-accent);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.8);
  transition: opacity 300ms ease, transform 300ms ease;
}
.mp-progress-hover-marker {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 2px;
  height: 14px;
  border-radius: 999px;
  background: var(--mp-accent);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 52%);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.mp-progress-hover-marker[hidden] { display: none; }
.mp-progress-track:hover .mp-progress-thumb,
.mp-progress-track:focus .mp-progress-thumb {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.mp-scrub-preview {
  position: absolute;
  bottom: 14px;
  z-index: 30;
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
  transform: translateX(-50%);
}
.mp-scrub-preview[hidden] { display: none; }
.mp-scrub-preview-frame {
  border: 0;
  border-radius: 0;
  background-color: rgb(0 0 0 / 72%);
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 24%), 0 0 6px rgb(0 0 0 / 42%);
}
.mp-scrub-preview-time {
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--mp-text);
  background: rgb(0 0 0 / 68%);
  font-size: 10px;
  line-height: 1;
  text-shadow: 0 0 2px rgb(0 0 0 / 60%);
}
.mp-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 1px solid rgb(0 0 0 / 45%);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.mp-time {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  color: var(--mp-muted);
  background: rgb(0 0 0 / 28%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  opacity: .78;
  text-shadow: 0 0 2px rgb(0 0 0 / 55%);
  white-space: nowrap;
}
.mp-bar:hover .mp-time,
.mp-time:focus-visible { opacity: .92; }
.mp-btn {
  position: relative;
  display: grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  min-height: 28px;
  padding: 3px 5px;
  border: 0;
  border-radius: 999px;
  color: var(--mp-text);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
}
.mp-btn svg {
  filter: drop-shadow(0 0 2px rgb(0 0 0 / 50%));
  transition: transform 300ms ease;
}
.mp-btn:hover,
.mp-btn:focus-visible {
  background: rgb(255 255 255 / 12%);
  outline: none;
}
.mp-btn:hover { transform: scale(1.04); }
.mp-btn:hover svg { transform: scale(1.06); }
.mp-btn:active { transform: scale(.96); }
.mp-btn:focus-visible { outline: 2px solid rgb(255 255 255 / 38%); outline-offset: 1px; }
.mp-play-btn {
  background: rgb(0 0 0 / 46%);
  box-shadow: none;
}
.mp-right-controls .mp-btn {
  background: transparent;
  box-shadow: none;
}
.mp-right-controls .mp-btn:hover,
.mp-right-controls .mp-btn:focus-visible {
  background: rgb(255 255 255 / 12%);
}
.mp-icon-state {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 300ms ease, transform 300ms ease;
}
.mp-icon-state-pause {
  opacity: 0;
  transform: scale(.72);
}
.mp-play-btn.is-playing .mp-icon-state-play,
.mp-play-center.is-playing .mp-icon-state-play {
  opacity: 0;
  transform: scale(.72);
}
.mp-play-btn.is-playing .mp-icon-state-pause,
.mp-play-center.is-playing .mp-icon-state-pause {
  opacity: 1;
  transform: none;
}
.mp-play-btn .mp-icon { width: 18px; height: 18px; }
.mp-play-center .mp-icon { width: 48px; height: 48px; }
.mp-play-btn { position: relative; }
.mp-speed-btn { font-size: 11px; font-weight: 650; }
.mp-volume {
  position: relative;
  display: flex;
  align-items: center;
  width: 28px;
  min-width: 0;
  min-height: 28px;
  border-radius: 999px;
  background: rgb(0 0 0 / 30%);
  box-shadow: none;
  transition: width 300ms ease;
}
.mp-volume-btn {
  flex: 0 0 28px;
  background: transparent;
  box-shadow: none;
}
.mp-volume-slider {
  position: absolute;
  top: 50%;
  left: 28px;
  width: 0;
  height: 4px;
  margin: 0;
  accent-color: var(--mp-accent);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-4px);
  transition: width 300ms ease, opacity 300ms ease, transform 300ms ease;
}
.mp-volume:hover,
.mp-volume:focus-within {
  width: 90px;
  background: rgb(0 0 0 / 38%);
}
.mp-volume:hover .mp-volume-slider,
.mp-volume:focus-within .mp-volume-slider {
  width: 56px;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%);
}
.mp-quality { position: relative; display: flex; }
.mp-quality-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.mp-quality-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 9px);
  display: none;
  min-width: 96px;
  padding: 5px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 7px;
  background: var(--mp-bg);
  box-shadow: 0 14px 34px rgb(0 0 0 / 34%);
  backdrop-filter: blur(10px);
}
.mp-quality.is-open .mp-quality-menu { display: grid; }
.mp-quality-menu button,
.mp-quality-empty {
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  color: var(--mp-text);
  background: transparent;
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.mp-quality-menu button:hover,
.mp-quality-menu button[aria-checked="true"] { color: var(--mp-accent); background: rgb(255 255 255 / 10%); }
.mp-quality-empty { color: var(--mp-muted); cursor: default; }
.mp-fullscreen-btn.is-active { color: var(--mp-accent); }
.mp-compact .mp-bar {
  display: grid;
  grid-template-areas:
    "progress progress"
    "time volume";
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 8px auto;
  gap: 4px 8px;
  min-height: 0;
  padding: 8px;
  background: transparent;
  backdrop-filter: none;
}
.mp-hover-preview .mp-controls {
  background: transparent;
}
.mp-hover-preview .mp-bar {
  display: block;
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  pointer-events: none;
}
.mp-hover-preview .mp-progress-track {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  height: 2px;
  border-radius: 0;
  cursor: default;
  pointer-events: none;
}
.mp-hover-preview .mp-progress-track::after { pointer-events: none; }
.mp-hover-preview .mp-progress-track:hover,
.mp-hover-preview .mp-progress-track:focus { height: 2px; }
.mp-hover-preview .mp-progress-thumb,
.mp-hover-preview .mp-progress-hover-marker { display: none; }
.mp-hover-preview .mp-time {
  position: absolute;
  right: 5px;
  bottom: 4px;
  display: inline-flex !important;
  z-index: 11;
  min-height: 24px;
  padding: 0 6px;
  border-radius: 7px;
  color: #fff;
  background: rgb(37 41 48 / 76%);
  opacity: 1;
  visibility: visible;
  font-size: 10px;
  pointer-events: none;
}
.mp-hover-preview .mp-right-controls { display: none; }
.mp-hover-preview .mp-scrub-preview { display: none; }
.mp-hover-preview .mp-volume {
  position: absolute;
  left: 5px;
  bottom: 4px;
  z-index: 11;
  width: auto;
  pointer-events: auto;
}
.mp-hover-preview .mp-volume-btn {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  border-radius: 7px;
  background: rgb(37 41 48 / 76%);
}
.mp-hover-preview .mp-volume-slider,
.mp-hover-preview .mp-spacer,
.mp-hover-preview .mp-play-btn,
.mp-hover-preview .mp-speed-btn,
.mp-hover-preview .mp-extra-controls,
.mp-hover-preview .mp-quality,
.mp-hover-preview .mp-fullscreen-btn { display: none; }
.mp-hover-preview .mp-controls { cursor: default; }
.mp-hover-preview .mp-play-center { display: none; }
.mp-hover-preview.mp-compact-hide-volume .mp-volume { display: none !important; }
.mp-hover-preview.mp-compact-hide-time .mp-time { display: none !important; }
.mp-compact .mp-progress-track { grid-area: progress; align-self: center; }
.mp-compact .mp-time { grid-area: time; }
.mp-compact .mp-right-controls { display: none; }
.mp-compact .mp-scrub-preview { display: none; }
.mp-compact .mp-volume { grid-area: volume; justify-self: end; width: auto; }
.mp-compact .mp-volume-slider,
.mp-compact .mp-extra-controls,
.mp-compact .mp-bar > span { display: none; }
.mp-compact .mp-controls { cursor: default; }
@media (max-width: 640px) {
  .mp-volume { width: 28px !important; }
  .mp-volume-slider { display: none; }
  .mp-bar { gap: 4px 6px; padding-inline: 8px; }
  .mp-time { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-controls,
  .mp-play-center,
  .mp-progress-track,
  .mp-progress-thumb,
  .mp-progress-hover-marker,
  .mp-volume,
  .mp-volume-slider,
  .mp-icon-state,
  .mp-btn,
  .mp-btn svg { transition: none; }
  .mp-state[data-state="loading"]::before { animation: none; }
}
