/* BlenderEverything project viewer */
.pv {
  --pv-bg: #0f1216;
  --pv-fg: #f4f6f8;
  --pv-glass: rgba(16, 20, 26, 0.62);
  --pv-line: rgba(255, 255, 255, 0.14);
  --pv-accent: #f08a3c;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--pv-bg);
  color: var(--pv-fg);
  font: 500 14px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  isolation: isolate;
}
.pv:fullscreen { border-radius: 0; aspect-ratio: auto; }
.pv-stage, .pv-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.pv-poster {
  position: absolute; inset: 0; z-index: 3;
  background: #1a2230 center / cover no-repeat;
  display: grid; place-items: center;
  transition: opacity .5s ease, visibility .5s;
}
.pv-poster::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.55)); }
.pv-poster.off { opacity: 0; visibility: hidden; }
.pv-cover { position: relative; text-align: center; display: grid; gap: 12px; justify-items: center; padding: 16px; }
.pv-title { font-size: clamp(18px, 3vw, 28px); font-weight: 700; letter-spacing: -.01em; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.pv-note { font-size: 12px; opacity: .85; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.pv-go {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--pv-accent); color: #1b0f05; font: inherit; font-weight: 700; font-size: 15px;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  transition: transform .15s ease, filter .15s ease;
}
.pv-go:hover { transform: translateY(-1px); filter: brightness(1.06); }
.pv-go svg { width: 20px; height: 20px; fill: currentColor; }

.pv-loading {
  position: absolute; inset: 0; z-index: 2; display: none;
  place-content: center; justify-items: center; gap: 12px;
  background: rgba(15, 18, 22, .55);
}
.pv-loading.on { display: grid; }
.pv-track { width: min(280px, 60vw); height: 4px; border-radius: 4px; background: var(--pv-line); overflow: hidden; }
.pv-bar { width: 0; height: 100%; background: var(--pv-accent); transition: width .2s; }
.pv-loadtext { font-size: 13px; opacity: .9; }

.pv-ui {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1;
  display: flex; gap: 10px; align-items: flex-end; justify-content: space-between;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.pv.ready .pv-ui { opacity: 1; pointer-events: auto; }
.pv-views, .pv-actions {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  background: var(--pv-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--pv-line); border-radius: 12px;
}
.pv-actions { flex-wrap: nowrap; }
.pv-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: var(--pv-fg); font: inherit; font-size: 13px; white-space: nowrap;
}
.pv-btn:hover { background: rgba(255,255,255,.1); }
.pv-btn.active { background: var(--pv-fg); color: #111; }
.pv-btn svg { width: 16px; height: 16px; fill: currentColor; }
.pv-play { background: var(--pv-accent); color: #1b0f05; font-weight: 700; }
.pv-play:hover { background: var(--pv-accent); filter: brightness(1.08); }
.pv-icon { padding: 7px 8px; }
.pv-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--pv-accent); z-index: 1; }
.pv-hint {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 1;
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  background: var(--pv-glass); border: 1px solid var(--pv-line);
  opacity: 0; transition: opacity .5s; pointer-events: none; white-space: nowrap;
}
.pv.ready .pv-hint { opacity: 1; }
.pv.ready .pv-hint.off { opacity: 0; }

@media (max-width: 640px) {
  .pv { aspect-ratio: 4 / 5; border-radius: 10px; }
  .pv-ui { flex-direction: column; align-items: stretch; left: 8px; right: 8px; bottom: 8px; }
  .pv-views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pv-views::-webkit-scrollbar { display: none; }
  .pv-actions { justify-content: space-between; }
  .pv-play { flex: 1; justify-content: center; }
  .pv-hint { display: none; }
}
