/* v8.0 */
html,
body{
  margin:0;
  padding:0;
  width:100%;
  height:100%;
  background:#000;
  overflow:hidden;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.player{
  position:fixed;
  inset:0;
  background:#000;
  overflow:hidden;
}

.player::before{
  content:"";
  position:absolute;
  inset:-20%;
  background:
    radial-gradient(
      60% 50% at 50% 50%,
      rgba(30,70,90,.18),
      transparent 70%
    );
  filter:blur(80px);
}

#youtubeFrame,
video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:#000;
}

video{
  object-fit:cover;
}

#youtubeFrame{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .35s ease;
}

#youtubeFrame.active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}

.controls{
  position:absolute;
  left:12px;
  right:12px;
  bottom:14px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(20,20,20,.16);
  backdrop-filter:blur(24px);
  border:1px solid rgba(255,255,255,.08);
  z-index:99999;
}

input[type="range"]{
  appearance:none;
  height:28px;
  background:transparent;
}

#seek{
  flex:1;
}

#volume{
  width:110px;
}

input[type="range"]::-webkit-slider-runnable-track{
  height:6px;
  border-radius:999px;
  background:
    rgba(
      255,
      255,
      255,
      .12
    );
}

input[type="range"]::-webkit-slider-thumb{
  appearance:none;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#fff;
  margin-top:-5px;
}

.video-text{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  color:rgba(255,255,255,.05);
  font-size:10px;
  text-align:center;
  pointer-events:none;
  z-index:4;
}

.now-playing{
  position:absolute;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  z-index:99998;
  padding:10px 14px;
  border-radius:14px;
  background:
    rgba(
      15,
      15,
      15,
      .34
    );
  backdrop-filter:blur(18px);
  border:
    1px solid
    rgba(
      255,
      255,
      255,
      .08
    );
  color:#fff;
  font-size:13px;
  white-space:nowrap;
  max-width:calc(100vw - 40px);
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:
    0 8px 24px
    rgba(
      0,
      0,
      0,
      .22
    );
}

.np-label{
  opacity:.7;
  margin-right:6px;
}

.hud-actions{
  position:absolute;
  top:62px;
  right:12px;
  display:flex;
  align-items:center;
  gap:8px;
  z-index:100000;
}

.hud-actions button{
  appearance:none;
  border:none;
  background:
    rgba(
      20,
      20,
      20,
      .28
    );
  color:#fff;
  border-radius:12px;
  height:34px;
  padding:0 12px;
  cursor:pointer;
  backdrop-filter:blur(18px);
  border:
    1px solid
    rgba(
      255,
      255,
      255,
      .08
    );
}

.hud-actions button:hover{
  background:
    rgba(
      255,
      255,
      255,
      .14
    );
}

.debug-hud{
  position:absolute;
  left:12px;
  top:64px;
  width:
    min(
      420px,
      calc(100vw - 24px)
    );
  background:
    rgba(
      0,
      0,
      0,
      .72
    );
  border-radius:14px;
  padding:12px;
  color:#f1f1f1;
  font-size:12px;
  z-index:100001;
  backdrop-filter:blur(18px);
  border:
    1px solid
    rgba(
      255,
      255,
      255,
      .08
    );
}

.debug-row{
  display:flex;
  justify-content:space-between;
  margin-bottom:6px;
  opacity:.92;
}

.debug-log{
  margin-top:10px;
  max-height:180px;
  overflow:auto;
  white-space:pre-wrap;
  opacity:.82;
  line-height:1.4;
}

@media(max-width:768px){

  .controls{
    gap:8px;
    padding:8px 10px;
  }

  #volume{
    width:80px;
  }

  .hud-actions{
    top:auto;
    bottom:70px;
    left:12px;
    right:12px;
    flex-wrap:wrap;
  }

  .hud-actions button{
    height:30px;
    padding:0 10px;
    font-size:12px;
  }

  .now-playing{
    top:10px;
    font-size:12px;
    padding:8px 12px;
  }
}

