/* ============================================================
   hub-extras-video.css
   Video Premium — calitate maximă, fullscreen, swipe global
   ============================================================ */

/* ── 1. Hardware acceleration pe toate video-urile din hub ── */
video {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* ── 2. VV Player — video fill corect (contain pe desktop, cover pe mobile) ── */
.vv-reel video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  image-rendering: high-quality;
  will-change: transform;
  transform: translateZ(0);
}

@media (min-width: 768px) {
  .vv-reel video {
    object-fit: contain;
    background: #000;
  }
}

/* ── 3. Fullscreen — video umple tot ecranul, fără bare ── */
.vv-shell:fullscreen,
.vv-shell:-webkit-full-screen,
.vv-shell:-moz-full-screen {
  background: #000;
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
}

.vv-shell:fullscreen .vv-reel,
.vv-shell:-webkit-full-screen .vv-reel {
  height: 100vh;
}

.vv-shell:fullscreen .vv-reel video,
.vv-shell:-webkit-full-screen .vv-reel video {
  object-fit: contain;
}

/* ── 4. Desktop layout — identic cu Instagram Reels / TikTok ── */
@media (min-width: 768px) {
  #view-reels {
    display: flex;
    justify-content: center;
    align-items: stretch;
    background: #000;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: none;
  }

  .vv-shell {
    width: 420px;
    max-width: 420px;
    margin: 0 auto;
    position: relative;
  }
}

/* ── 5. Indicator swipe global (săgeți laterale) ── */
.hub-swipe-hint {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 64px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 1200;
  color: #fff;
}
.hub-swipe-hint.left  { left: 4px; }
.hub-swipe-hint.right { right: 4px; }
.hub-swipe-hint.show  { opacity: 1; }
.hub-swipe-hint svg   { width: 20px; height: 20px; }

/* ── 6. Tranziție la schimbarea tab-ului prin swipe ── */
.stage .view.swipe-out-left  { animation: swOL .22s ease forwards; }
.stage .view.swipe-out-right { animation: swOR .22s ease forwards; }
.stage .view.swipe-in-left   { animation: swIL .25s ease forwards; }
.stage .view.swipe-in-right  { animation: swIR .25s ease forwards; }

/* ── 7. Videourile din feed (posturi normale) — optimizate ── */
.post-media video {
  image-rendering: high-quality;
  transform: translateZ(0);
  will-change: auto;
  object-fit: contain;
  background: #000;
  border-radius: 12px;
  max-height: 80vh;
  width: 100%;
}

/* ── 8. Fullscreen buton vizibil pe mobile ── */
.pm-fullscreen-btn {
  opacity: 1;
  background: rgba(0,0,0,0.55);
}

/* ── 9. Buffering spinner pe video-urile VV ── */
.vv-reel.buffering::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: vvSpin .7s linear infinite;
  pointer-events: none;
  z-index: 5;
}
@keyframes vvSpin { to { transform: rotate(360deg); } }

/* ── 10. Progres video (bara jos) ── */
.vv-reel .vv-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,.2);
  z-index: 10;
  pointer-events: none;
}
.vv-reel .vv-progress-bar {
  height: 100%;
  background: #fff;
  width: 0%;
  transition: width 0.25s linear;
}
