.qp{
  width:100%;
  background:#000;
  border-radius:14px;
  overflow:visible;
  position:relative;
  font-family:Arial,sans-serif;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}

.qp,
.qp-stage,
.qp-video,
.qp-frame,
.qp-center,
.qp-btn,
.qp-tap {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  outline: none;
  user-select: none;
}

.qp-stage{
  width:100%;
  position:relative;
  background:#000;
  border-radius:inherit;
  overflow:hidden;
}

.qp-video{
  width:100%;
  aspect-ratio:16/9;
  display:block;
  background:#000;
  cursor:pointer;
}

.qp-frame{
  width:100%;
  aspect-ratio:16/9;
  display:block;
  background:#000;
  border:0;
}

.qp-error{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  max-width:80%;
  color:#fff;
  background:rgba(0,0,0,.72);
  border:1px solid rgba(255,255,255,.16);
  border-radius:8px;
  padding:12px 14px;
  text-align:center;
  z-index:8;
}

.qp:fullscreen,
.qp:-webkit-full-screen{
  width:100vw;
  height:100vh;
  border-radius:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.qp:fullscreen .qp-stage,
.qp:-webkit-full-screen .qp-stage{
  width:100%;
}

.qp:fullscreen .qp-video,
.qp:fullscreen .qp-frame,
.qp:-webkit-full-screen .qp-video,
.qp:-webkit-full-screen .qp-frame{
  width:100%;
  height:auto;
  max-height:100vh;
  object-fit:contain;
}

.qp.qp-landscape-fallback:fullscreen .qp-stage,
.qp.qp-landscape-fallback:-webkit-full-screen .qp-stage{
  width:100vh;
  height:100vw;
  transform-origin:center;
}

.qp.qp-landscape-right:fullscreen .qp-stage,
.qp.qp-landscape-right:-webkit-full-screen .qp-stage{
  transform:rotate(90deg);
}

.qp.qp-landscape-left:fullscreen .qp-stage,
.qp.qp-landscape-left:-webkit-full-screen .qp-stage{
  transform:rotate(-90deg);
}

.qp.qp-landscape-fallback:fullscreen .qp-video,
.qp.qp-landscape-fallback:fullscreen .qp-frame,
.qp.qp-landscape-fallback:-webkit-full-screen .qp-video,
.qp.qp-landscape-fallback:-webkit-full-screen .qp-frame{
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  aspect-ratio:auto;
  object-fit:contain;
}

.qp-logo{
  position:absolute;
  top:14px;
  left:14px;
  z-index:5;
  color:white;
  background:rgba(0,0,0,.45);
  padding:7px 12px;
  border-radius:10px;
  font-size:14px;
}

.qp-center{
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  width:82px;
  height:82px;
  border-radius:50%;
  border:0;
  background:rgba(0,0,0,.58);
  display:grid;
  place-items:center;
  cursor:pointer;
  z-index:10;
  opacity:1;
  transition:opacity .16s ease,transform .16s ease,background .16s ease;
  touch-action:manipulation;
}

.qp-center::before{
  content: "";
  position: absolute;
  inset: -16px;
  border-radius: 50%;
}

.qp.is-playing .qp-center{
  opacity:0;
  pointer-events:none;
  transform:translate(-50%,-50%) scale(.92);
}

.qp.is-playing .qp-center.is-visible,
.qp:not(.is-playing) .qp-center{
  opacity:1;
  pointer-events:auto;
  transform:translate(-50%,-50%) scale(1);
}

.qp-center:active{
  transform:translate(-50%,-50%) scale(.94);
  background:rgba(0,0,0,.72);
}

.qp-center svg,
.qp-btn svg{
  fill:white;
}

.qp-center svg{
  width:42px;
  height:42px;
}

.qp-loader{
  position:absolute;
  left:50%;
  top:50%;
  width:58px;
  height:58px;
  margin:-29px 0 0 -29px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,.28);
  border-top-color:#fff;
  opacity:0;
  pointer-events:none;
  z-index:11;
  animation:qp-spin .8s linear infinite;
  transition:opacity .14s ease;
}

.qp.is-loading .qp-loader{
  opacity:1;
}

.qp.is-loading .qp-center{
  opacity:0;
  pointer-events:none;
}

@keyframes qp-spin{
  to{
    transform:rotate(360deg);
  }
}

.qp-ad{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.82);
  z-index:18;
}

.qp-ad.show{
  display:flex;
}

.qp-ad-click{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
}

.qp-ad-video,
.qp-ad-image{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}

.qp-ad.is-banner{
  inset:auto 12px 58px;
  min-height:70px;
  max-height:28%;
  border-radius:8px;
  overflow:hidden;
  background:rgba(0,0,0,.78);
  border:1px solid rgba(255,255,255,.16);
}

.qp-ad.is-banner.pos-top{
  top:12px;
  bottom:auto;
}

.qp-ad.is-banner.pos-center{
  top:50%;
  bottom:auto;
  transform:translateY(-50%);
}

.qp-ad-skip,
.qp-ad-close{
  position:absolute;
  right:12px;
  bottom:12px;
  min-height:34px;
  border:0;
  border-radius:4px;
  padding:7px 11px;
  color:#fff;
  background:rgba(0,0,0,.72);
  cursor:pointer;
  z-index:2;
}

.qp-ad-skip:disabled{
  opacity:.65;
  cursor:default;
}

.qp-ad-close{
  top:8px;
  bottom:auto;
  right:8px;
  width:30px;
  min-height:30px;
  padding:0;
  border-radius:50%;
}

.qp-ad-label{
  position:absolute;
  left:12px;
  top:12px;
  color:#fff;
  background:rgba(0,0,0,.56);
  border-radius:4px;
  padding:5px 8px;
  font-size:12px;
}

.qp-controls{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:45px 14px 12px;
  background:linear-gradient(transparent,rgba(0,0,0,.96));
  opacity:0;
  transition:.2s;
  z-index:6;
}

.qp.controls-visible .qp-controls{
  opacity:1;
}

@media(pointer:coarse), (max-width:900px){
  .qp.controls-visible .qp-controls,
  .qp.controls-visible:hover .qp-controls{
    opacity:1;
  }
}

.qp-progress{
  width:100%;
  height:5px;
  background:rgba(255,255,255,.18);
  border-radius:20px;
  cursor:pointer;
  overflow:hidden;
  margin-bottom:11px;
  position:relative;
}

.qp-buffer{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  background:rgba(255,255,255,.45);
  pointer-events:none;
  transition:width .18s ease;
  z-index:1;
}

.qp-preview{
  position:absolute;
  bottom:58px;
  left:84px;
  width:168px;
  transform:translateX(-50%) translateY(8px);
  opacity:0;
  pointer-events:none;
  transition:opacity .14s ease,transform .14s ease;
  z-index:8;
}

.qp-preview.show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

.qp-preview-frame{
  width:100%;
  aspect-ratio:16/9;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:rgba(10,10,10,.92);
  border:1px solid rgba(255,255,255,.18);
  border-radius:6px;
  box-shadow:0 10px 28px rgba(0,0,0,.45);
}

.qp-preview-canvas{
  width:100%;
  height:100%;
  display:none;
  object-fit:cover;
}

.qp-preview.has-frame .qp-preview-canvas{
  display:block;
}

.qp-preview.has-frame .qp-preview-fallback{
  display:none;
}

.qp-preview-fallback{
  width:100%;
  height:100%;
  display:grid;
  place-items:center;
  color:rgba(255,255,255,.72);
  font-size:12px;
}

.qp-preview-time{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:54px;
  height:22px;
  margin:5px auto 0;
  padding:0 8px;
  border-radius:4px;
  background:rgba(0,0,0,.82);
  color:#fff;
  font-size:12px;
  font-weight:700;
}

.qp-preview-video{
  position:absolute;
  width:1px;
  height:1px;
  left:-9999px;
  top:-9999px;
  opacity:0;
  pointer-events:none;
}

.qp-line{
  position:absolute;
  left:0;
  top:0;
  height:100%;
  width:0%;
  background:var(--qp-color,#ff0000);
  z-index:2;
}

.qp-row{
  display:flex;
  align-items:center;
  gap:6px;
  color:white;
}

.qp-btn{
  width:38px;
  height:38px;
  border:0;
  background:transparent;
  color:white;
  border-radius:50%;
  position:relative;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.qp-btn:hover{
  background:rgba(255,255,255,.18);
}

.qp-icons-round .qp-btn,
.qp-icons-round .qp-center{
  background:rgba(255,255,255,.14);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.2);
}

.qp-icons-minimal .qp-btn,
.qp-icons-minimal .qp-center{
  background:transparent;
  box-shadow:none;
}

.qp-icons-glass .qp-btn,
.qp-icons-glass .qp-center{
  background:rgba(255,255,255,.16);
  backdrop-filter:blur(10px);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 8px 22px rgba(0,0,0,.24);
}

.qp-btn svg{
  width:23px;
  height:23px;
}

.qp-time{
  font-size:13px;
  color:white;
  margin-left:4px;
}

.qp-volume-box{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:4px;
}

.qp-spacer{
  margin-left:auto;
}

.qp-volume{
  width:0;
  opacity:0;
  transition:.2s;
  accent-color:white;
}

.qp-volume-box:hover .qp-volume{
  width:80px;
  opacity:1;
}

.qp-settings-wrap{
  position:relative;
}

.qp-quality-badge{
  position:absolute;
  top:0;
  right:-4px;
  min-width:22px;
  height:13px;
  padding:0 3px;
  border-radius:7px;
  background:#ff0000;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:8px;
  font-weight:bold;
  line-height:1;
  letter-spacing:0;
  pointer-events:none;
}

.qp-settings-menu{
  position:absolute;
  right:0;
  bottom:48px;
  width:min(230px, calc(100vw - 16px));
  background:rgba(28,28,28,.98);
  color:white;
  border-radius:4px;
  padding:8px 0;
  box-shadow:0 4px 18px rgba(0,0,0,.45);
  opacity:0;
  transform:translateY(6px);
  visibility:hidden;
  pointer-events:none;
  transition:opacity .12s, transform .12s, visibility .12s;
  z-index:20;
  max-height:calc(100vh - 84px);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  box-sizing:border-box;
  min-width:170px;
  max-width:320px;
}

.qp-settings-menu.is-floating{
  position:fixed;
  right:auto;
  bottom:auto;
  overscroll-behavior:contain;
  max-width:none;
}

.qp-settings-menu.show{
  opacity:1;
  transform:translateY(0);
  visibility:visible;
  pointer-events:auto;
}

.qp-settings-panel{
  display:none;
}

.qp-settings-panel.is-active{
  display:block;
}

.qp-quality-options{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:0 14px 8px;
}

.qp-settings-item,
.qp-settings-back,
.qp-speed-option,
.qp-quality-option{
  width:100%;
  min-height:46px;
  color:#fff;
  background:transparent;
  border:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:0 14px;
  font:inherit;
  font-size:clamp(12px, 3.5vw, 14px);
  text-align:left;
  cursor:pointer;
  touch-action: manipulation;
}

.qp-speed-option,
.qp-quality-option{
  justify-content:flex-start;
  gap:14px;
}

.qp-settings-back{
  justify-content:flex-start;
  border-bottom:1px solid rgba(255,255,255,.14);
  font-weight:500;
}

.qp-setting-value{
  color:rgba(255,255,255,.68);
}

.qp-settings-item:hover,
.qp-settings-item:focus-visible,
.qp-settings-back:hover,
.qp-settings-back:focus-visible,
.qp-speed-option:hover,
.qp-speed-option:focus-visible,
.qp-quality-option:hover,
.qp-quality-option:focus-visible{
  background:rgba(255,255,255,.1);
  outline:none;
}

.qp-check{
  width:18px;
  color:#fff;
  font-size:13px;
  opacity:0;
  text-align:center;
}

.qp-speed-option.is-selected .qp-check,
.qp-quality-option.is-selected .qp-check{
  opacity:1;
}

.qp-quality-title{
  margin-top:6px;
}

.qp-settings-btn.is-active,
.qp-full.is-fullscreen{
  background:rgba(255,255,255,.12);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18);
}

.qp-tap{
  position:absolute;
  top:50%;
  transform:translateY(-50%) scale(.7);
  width:82px;
  height:82px;
  border-radius:50%;
  background:rgba(0,0,0,.55);
  color:#fff;
  font-size:24px;
  font-weight:bold;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:2px;
  opacity:0;
  pointer-events:none;
  transition:.25s;
  z-index:7;
}

.qp-tap svg{
  width:34px;
  height:34px;
  fill:#fff;
}

.qp-tap span{
  font-size:14px;
  line-height:1;
}

.qp-tap-left{ left:18%; }
.qp-tap-right{ right:18%; }

.qp-tap.show{
  opacity:1;
  transform:translateY(-50%) scale(1);
}

@media(max-width:600px){
  .qp-controls{
    padding:38px 10px 10px;
  }

  .qp-preview{
    bottom:54px;
    width:132px;
  }

  .qp-preview-time{
    height:20px;
    min-width:48px;
    font-size:11px;
  }

  .qp-center{
    width:64px;
    height:64px;
  }

  .qp-center svg{
    width:32px;
    height:32px;
  }

  .qp-volume-box:hover .qp-volume{
    width:55px;
  }

  .qp-btn{
    width:34px;
    height:34px;
  }

  .qp-time{
    font-size:12px;
  }

  .qp-settings-menu{
    width:calc(100vw - 18px);
    right:0;
    bottom:54px;
    max-height:calc(100vh - 92px);
  }

  .qp-settings-item,
  .qp-settings-back,
  .qp-speed-option,
  .qp-quality-option{
    min-height:42px;
    padding:10px 12px;
    font-size:clamp(11px, 3.7vw, 13px);
  }
}
