.watch-player-controls {
  --watch-thumb: 12px;
  position: absolute;
  inset: auto 0 0;
  z-index: 8;
  display: none;
  padding: 5px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .88) 35%);
  color: #fff;
  font: 13px Roboto, Arial, sans-serif;
  transition: opacity .16s ease;
}

.watch-player-custom > .watch-player-controls {
  display: block;
}

.watch-player-controls.watch-player-idle {
  opacity: 0;
  pointer-events: none;
}

.watch-player-skip {
  position: absolute;
  top: 50%;
  left: 22%;
  z-index: 7;
  transform: translate(-50%, -50%);
  min-width: 58px;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font: 700 20px Roboto, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
  pointer-events: none;
}

.watch-player-skip[data-direction="forward"] {
  left: 78%;
}

.watch-player-resume {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 9;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 24px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 10px;
  background: rgba(20, 20, 20, .94);
  font: 600 14px Roboto, Arial, sans-serif;
}

.watch-player-resume button {
  min-height: 40px;
  border: 1px solid #777;
  border-radius: 6px;
  padding: 6px 12px;
  background: #333;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.watch-player-resume button:first-child {
  background: #fff;
  color: #171717;
}

.watch-player-resume button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.watch-player-custom .annotation-fullscreen-btn {
  display: none !important;
}

.watch-player-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.watch-player-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 34px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #fff;
  padding: 0;
  cursor: pointer;
}

.watch-player-controls svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: 0 0 auto;
}

.watch-player-time {
  min-width: 0;
  margin-right: auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.watch-player-volume {
  width: clamp(34px, 12vw, 75px);
  min-width: 0;
  margin: 0 4px 0 0;
  accent-color: #fff;
  cursor: pointer;
}

.watch-player-seek {
  position: relative;
  display: flex;
  align-items: center;
  height: 18px;
}

.watch-player-rail {
  position: absolute;
  inset: auto calc(var(--watch-thumb) / 2);
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .43);
}

.watch-player-progress,
.watch-player-loop-range {
  position: absolute;
  inset-block: 0;
  border-radius: inherit;
}

.watch-player-progress {
  left: 0;
  width: var(--watch-progress, 0%);
  background: #fff;
}

.watch-player-loop-range {
  background: #ff4545;
  box-shadow: 0 0 0 1px rgba(255, 69, 69, .4);
}

.watch-player-seek input {
  position: relative;
  appearance: none;
  width: 100%;
  height: 18px;
  background: transparent;
  margin: 0;
  cursor: pointer;
}

:root[data-theme="dark"] .watch-player-seek input {
  background: transparent !important;
  border: 0 !important;
}

.watch-player-seek input::-webkit-slider-thumb {
  appearance: none;
  width: var(--watch-thumb);
  height: var(--watch-thumb);
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.watch-player-seek input::-moz-range-thumb {
  width: var(--watch-thumb);
  height: var(--watch-thumb);
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.watch-player-seek input::-moz-range-track {
  background: transparent;
}

.watch-player-seek input:disabled {
  opacity: .55;
  cursor: default;
}

.watch-player-menu {
  position: absolute;
  right: 0;
  bottom: 100%;
  width: min(195px, 100%);
  max-height: min(280px, calc(var(--watch-player-height, 220px) - 65px));
  overflow: auto;
  overscroll-behavior: contain;
  background: #383838;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .42);
}

.watch-player-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  gap: 15px;
  padding: 6px 14px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.watch-player-menu-item:disabled {
  opacity: .56;
  cursor: default;
}

.watch-player-controls .watch-player-menu a.watch-player-menu-item {
  color: #fff;
}

.watch-player-menu-item svg {
  width: 23px;
  height: 23px;
}

.watch-player-menu-item small {
  display: block;
  color: #ddd;
  font-size: 11px;
}

.watch-player-icon:hover,
.watch-player-menu-item:hover:not(:disabled),
.watch-player-menu-item[aria-pressed="true"] {
  background: #525252;
}

.watch-player-controls :focus-visible {
  outline: 2px solid #fff;
  outline-offset: -2px;
}

.watch-player-menu-choice {
  min-height: 34px;
  padding-left: 22px;
}

.watch-player-menu-back {
  border-bottom: 1px solid #606060;
}

.watch-player-status {
  position: absolute;
  right: 10px;
  bottom: 100%;
  max-width: min(280px, calc(100% - 20px));
  margin: 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, .88);
}

.player-wrap:is(:fullscreen, :-webkit-full-screen) {
  width: 100%;
  height: 100%;
  gap: 0;
  background: #000;
}

.player-wrap:is(:fullscreen, :-webkit-full-screen) > .player {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 0;
}

.player-wrap:is(:fullscreen, :-webkit-full-screen) > .video-loop-controls {
  flex: 0 0 auto;
  margin: 0;
  border-radius: 0;
}

@media (max-width: 500px) {
  .watch-player-row { gap: 4px; }
  .watch-player-icon { flex-basis: 32px; width: 32px; }
  .watch-player-menu-item { min-height: 36px; }
  .watch-player-time { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .watch-player-controls { transition: none; }
}
