/* YouTube-style player skin for Dalchoo World.
   Keeps the native <video> element (best compatibility) and replaces only the UI. */

.ytp-shell {
  --ytp-red: #ff0033;
  --ytp-hover: rgba(255, 255, 255, .12);
  position: relative;
  display: block;
  width: 100%;
  background: #000;
  border-radius: inherit;
  overflow: hidden;
  outline: none;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}
.ytp-shell[hidden] { display: none !important; }
.ytp-shell:focus-visible { outline: 2px solid var(--ytp-red); outline-offset: 2px; }
.ytp-shell > video {
  display: block;
  width: 100%;
  background: #000;
}
.video-frame > .ytp-shell {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  border-radius: 0;
}
.video-frame > .ytp-shell > video { height: 100%; }
.view-modal .ytp-shell,
.mv-clip-wrap .ytp-shell,
.mv-merged .ytp-shell,
.mv-gen-item .ytp-shell { border-radius: 12px; }
.ytp-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  background: #000;
}
.ytp-shell:fullscreen > video {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}
/* The result badge would collide with the player title once playback starts. */
.video-frame .ytp-shell:not([hidden]) ~ .progress-badge {
  opacity: 0;
  pointer-events: none;
}

.ytp-ui {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  font-family: "Roboto", "SF Pro Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}
.ytp-ui::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, 0) 22%),
    linear-gradient(0deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .32) 28%, rgba(0, 0, 0, 0) 52%);
  opacity: 0;
  transition: opacity .18s ease;
}
.ytp-shell.ytp-controls-visible .ytp-ui::before,
.ytp-shell.ytp-paused .ytp-ui::before { opacity: 1; }

.ytp-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 14px 16px 26px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .52), transparent);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}
.ytp-shell.ytp-controls-visible .ytp-top,
.ytp-shell.ytp-paused .ytp-top { opacity: 1; }
.ytp-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .7);
}
.ytp-title:empty { display: none; }

.ytp-big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 12, .62);
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .38);
  backdrop-filter: blur(3px);
}
.ytp-big svg { width: 34px; height: 34px; fill: currentColor; margin-left: 2px; }
.ytp-shell.ytp-paused .ytp-big,
.ytp-shell.ytp-ended .ytp-big,
.ytp-shell:hover .ytp-big { opacity: 1; transform: scale(1); }
.ytp-big:hover { background: rgba(255, 0, 51, .9); }

.ytp-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 10px 7px;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.ytp-shell.ytp-controls-visible .ytp-bottom,
.ytp-shell.ytp-paused .ytp-bottom { opacity: 1; transform: translateY(0); }
.ytp-shell:fullscreen .ytp-bottom { padding: 0 22px 16px; }

.ytp-progress {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.ytp-progress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .26);
  transition: height .12s ease;
}
.ytp-progress:hover::before,
.ytp-shell.ytp-scrubbing .ytp-progress::before { height: 5px; }
.ytp-buffer,
.ytp-played {
  position: absolute;
  left: 0;
  height: 3px;
  border-radius: 2px;
  pointer-events: none;
  transition: height .12s ease;
}
.ytp-buffer { width: var(--ytp-buffer, 0%); background: rgba(255, 255, 255, .38); }
.ytp-played { width: var(--ytp-played, 0%); background: var(--ytp-red); }
.ytp-progress:hover .ytp-buffer,
.ytp-progress:hover .ytp-played,
.ytp-shell.ytp-scrubbing .ytp-buffer,
.ytp-shell.ytp-scrubbing .ytp-played { height: 5px; }
.ytp-scrubber {
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ytp-red);
  transform: translateY(-50%) scale(0);
  transition: transform .12s ease;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18);
}
.ytp-progress:hover .ytp-scrubber,
.ytp-shell.ytp-scrubbing .ytp-scrubber,
.ytp-progress:focus-visible .ytp-scrubber { transform: translateY(-50%) scale(1); }
.ytp-tip {
  position: absolute;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .86);
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.ytp-tip[hidden] { display: none; }

.ytp-row {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 38px;
}
.ytp-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  cursor: pointer;
  opacity: .96;
  transition: background .12s ease, opacity .12s ease;
}
.ytp-btn:hover { background: var(--ytp-hover); opacity: 1; }
.ytp-btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.ytp-btn svg { width: 22px; height: 22px; fill: currentColor; pointer-events: none; }
.ytp-btn[hidden] { display: none !important; }
.ytp-time {
  margin: 0 7px;
  font-size: 12px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .94);
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.ytp-spacer { flex: 1 1 auto; }

.ytp-volume { display: flex; align-items: center; }
.ytp-vol-range {
  width: 0;
  margin: 0;
  opacity: 0;
  accent-color: #fff;
  cursor: pointer;
  transition: width .16s ease, opacity .16s ease, margin .16s ease;
}
.ytp-volume:hover .ytp-vol-range,
.ytp-volume:focus-within .ytp-vol-range {
  width: 64px;
  margin: 0 6px 0 2px;
  opacity: 1;
}

.ytp-menu {
  position: absolute;
  right: 10px;
  bottom: 54px;
  width: 206px;
  max-height: calc(100% - 58px);
  overflow: auto;
  padding: 4px 0;
  border-radius: 10px;
  background: rgba(28, 28, 28, .97);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .5);
  backdrop-filter: blur(12px);
  pointer-events: auto;
  scrollbar-width: thin;
}
.ytp-menu[hidden] { display: none; }
.ytp-menu-title {
  padding: 6px 13px 4px;
  color: #aaa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ytp-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 13px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.ytp-menu-item:hover { background: rgba(255, 255, 255, .1); }
.ytp-menu-item .ytp-check {
  margin-left: auto;
  color: var(--ytp-red);
  font-weight: 900;
  opacity: 0;
}
.ytp-menu-item[aria-checked="true"] .ytp-check { opacity: 1; }

.ytp-spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, .22);
  border-top-color: #fff;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: ytp-spin .8s linear infinite;
}
.ytp-shell.ytp-waiting .ytp-spinner { opacity: 1; }
@keyframes ytp-spin { to { transform: rotate(360deg); } }

.ytp-error-box {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
}
.ytp-error-box small { color: #b9bdc7; font-size: 11px; }
.ytp-shell.ytp-error-state .ytp-error-box { display: grid; }
.ytp-shell.ytp-error-state .ytp-big,
.ytp-shell.ytp-error-state .ytp-bottom { display: none; }

@media (max-width: 640px) {
  .ytp-big { width: 58px; height: 58px; }
  .ytp-big svg { width: 30px; height: 30px; }
  .ytp-bottom { padding: 0 6px 4px; }
  .ytp-row { height: 36px; }
  .ytp-btn { width: 36px; height: 36px; }
  .ytp-btn svg { width: 21px; height: 21px; }
  .ytp-time { margin: 0 4px; font-size: 11px; }
  .ytp-volume { display: none; }
  .ytp-menu { right: 6px; bottom: 52px; width: 200px; }
}
