.xf-player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.xf-player video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* ── Center big play button ─────────────────────────────────── */
.xf-center-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(229, 9, 20, 0.92);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
  z-index: 3;
}

.xf-player.paused .xf-center-play {
  opacity: 1;
  pointer-events: auto;
}

.xf-center-play svg { width: 26px; height: 26px; margin-left: 3px; }

/* ── Control bar ────────────────────────────────────────────── */
.xf-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 28px 14px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 0.25s ease;
}

.xf-player.hide-ui:not(.paused) .xf-controls {
  opacity: 0;
  pointer-events: none;
}

/* ── Progress bar ───────────────────────────────────────────── */
.xf-progress-wrap {
  position: relative;
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.xf-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: visible;
  transition: height 0.12s ease;
}

.xf-progress-wrap:hover .xf-track { height: 6px; }

.xf-buffered {
  position: absolute;
  left: 0; top: 0;
  height: 100%; width: 0%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.xf-fill {
  position: absolute;
  left: 0; top: 0;
  height: 100%; width: 0%;
  background: #E50914;
  border-radius: 999px;
}

.xf-thumb {
  position: absolute;
  top: 50%; left: 0%;
  width: 13px; height: 13px;
  background: #E50914;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* ── Button row ─────────────────────────────────────────────── */
.xf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.xf-left, .xf-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.xf-btn {
  background: transparent;
  border: none;
  color: #FFFFFF;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.xf-btn:hover { background: rgba(255, 255, 255, 0.12); }
.xf-btn svg { width: 18px; height: 18px; }

.xf-time {
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
  white-space: nowrap;
}

/* ── Download button: red tint on hover ─────────────────────── */
.xf-dl-btn:hover { background: rgba(229, 9, 20, 0.22); }

/* ── Quality popover ────────────────────────────────────────── */
.xf-quality-menu {
  position: absolute;
  bottom: 72px;         /* sits just above the control bar */
  right: 60px;
  z-index: 10;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 110px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: xf-pop 0.14s ease;
}

@keyframes xf-pop {
  from { opacity: 0; transform: scale(0.9) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.xf-q-item {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}

.xf-q-item:hover {
  background: rgba(255,255,255,0.1);
  color: #FFFFFF;
}

.xf-q-item.active {
  background: #E50914;
  color: #FFFFFF;
}
