/* play-virtual.css — 「免安装去玩」 安装/启动 overlay（暗色加载页 A 设计）
   3 个状态：downloading / installing / launching */

.pv-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 40px;
  color: #fff;
  background: radial-gradient(120% 80% at 50% 30%, #2a2520 0%, #14110e 60%, #0b0a09 100%);
}
.pv-overlay.open { display: flex; }

/* 顶部左上角返回 */
.pv-back {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  font-size: 24px;
  line-height: 1;
  text-decoration: none !important;
  border: 0;
}

/* 顶部右上角「后台加载」—— 仅 downloading / installing 态显示 */
.pv-bg-load {
  position: absolute;
  top: 16px;
  right: 16px;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  font-size: 13px;
  text-decoration: none !important;
  border: 0;
}
.pv-overlay.state-downloading .pv-bg-load,
.pv-overlay.state-installing .pv-bg-load { display: inline-flex; }

/* 顶部右上角关闭 —— launching 态显示（与「后台加载」互斥位置） */
.pv-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  font-size: 22px;
  line-height: 1;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
}
.pv-overlay.state-launching .pv-close { display: inline-flex; }

/* 中部：图标（橙色发光）+ 名称 */
.pv-icon-wrap {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 0 36px rgba(255, 184, 77, 0.55);
}
.pv-icon { width: 100%; height: 100%; object-fit: cover; display: block; }

.pv-name {
  font-size: 22px;
  font-weight: 700;
  margin-top: 18px;
  color: #fff;
}

/* 状态区 */
.pv-state { display: none; width: 100%; max-width: 320px; margin-top: 26px; }
.pv-overlay.state-downloading .pv-state-downloading,
.pv-overlay.state-installing .pv-state-downloading { display: block; }
.pv-overlay.state-launching .pv-state-launching { display: block; text-align: center; }

/* 下载进度条 */
.pv-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}
.pv-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb24d, #ff8a1f);
  transition: width 0.25s linear;
}
.pv-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: #cfc9c2;
}
.pv-progress-text .pv-percent,
.pv-progress-text .pv-speed { color: #fff; font-weight: 500; }
/* 文案随状态切换：下载态「已下载 X% · 速度」；安装态「正在安装 X%」(无速度/CDN) */
.pv-verb-inst { display: none; }
.pv-overlay.state-installing .pv-verb-dl { display: none; }
.pv-overlay.state-installing .pv-verb-inst { display: inline; }
.pv-overlay.state-installing .pv-dl-extra,
.pv-overlay.state-installing .pv-cdn-badge { display: none; }
.pv-cdn-badge {
  flex-shrink: 0;
  margin-left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd24d, #ffb01f);
  color: #6b4a05;
  font-size: 12px;
  font-weight: 700;
}

/* 启动中 spinner */
.pv-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ff8a1f;
  border-radius: 50%;
  animation: pv-spin 0.8s linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }
.pv-tip { margin-top: 12px; font-size: 14px; color: #cfc9c2; }

/* 底部提示（下载态显示） */
.pv-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 44px;
  display: none;
  text-align: center;
}
.pv-overlay.state-downloading .pv-foot,
.pv-overlay.state-installing .pv-foot { display: block; }
.pv-foot-main { margin: 0; font-size: 14px; font-weight: 600; color: #e7e2db; }
.pv-foot-sub { margin: 6px 0 0; font-size: 12px; color: #8c857c; }

/* 底部 toast（暗色） */
.pv-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 13px;
  white-space: nowrap;
  display: none;
  z-index: 10000;
}
.pv-toast.show { display: block; }
