/* play-virtual.css — 「免安装去玩」 安装/启动 overlay
   3 个状态：downloading / launching / ready (already installed) */

.pv-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #fff;
  display: none;
  flex-direction: column;
  align-items: center;
}
.pv-overlay.open { display: flex; }

/* 顶部右上角「后台加载」按钮 —— 仅 downloading 态显示 */
.pv-bg-load {
  position: absolute;
  top: 16px;
  right: 16px;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.03);
  color: #333 !important;
  font-size: 13px;
  text-decoration: none !important;
  border: 1px solid #e5e5e5;
}
.pv-overlay.state-downloading .pv-bg-load,
.pv-overlay.state-installing .pv-bg-load { display: inline-flex; }
.pv-bg-load .pv-bg-load-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
}

/* 顶部右上角关闭按钮 —— launching / ready 态显示（与「后台加载」共用位置，互斥） */
.pv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  color: #333 !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 {
  margin-top: 25vh;
  width: 120px;
  height: 120px;
  border-radius: 16px;
  background: #eee;
  overflow: hidden;
}
.pv-icon { width: 100%; height: 100%; object-fit: cover; display: block; }

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

/* 状态区 */
.pv-state { display: none; margin-top: 24px; text-align: center; min-height: 80px; }
.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; }

/* 下载进度 */
.pv-progress-text {
  font-size: 14px;
  color: #666;
  letter-spacing: 0.5px;
}
.pv-progress-text .pv-speed,
.pv-progress-text .pv-percent { color: #333; font-weight: 500; }

/* 启动中 spinner */
.pv-spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border: 3px solid #eee;
  border-top-color: #ff7a00;
  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: #666; }

/* 立即进入按钮 */
.pv-launch {
  display: inline-block;
  padding: 12px 40px;
  background: #3B82F6;
  color: #fff !important;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
}

/* 底部 toast */
.pv-toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  background: #fff;
  color: #333;
  border: 1px solid #e5e5e5;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  display: none;
  z-index: 10000;
}
.pv-toast.show { display: block; }
