/* הנגן של גנאדי (28.11.26): פס שליטה משלנו מעל הסרט. אותה שפה במחשב ובטלפון.
   הסרט עצמו מתנגן במנוע של הדפדפן. אם משהו כאן נכשל, חוזרים לבד לכפתורים של הדפדפן. */
.gp { position: fixed; inset: 0; z-index: 4; pointer-events: none; color: #fff; font-family: inherit; -webkit-user-select: none; user-select: none; }
.gp > * { pointer-events: auto; }
.gp [hidden] { display: none !important; }
.gp-fade { transition: opacity .45s ease; }
.gp.idle .gp-fade { opacity: 0; pointer-events: none; }
.gp.idle { cursor: none; }
.gp button { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; color: #fff; -webkit-tap-highlight-color: transparent; }
.gp button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 6px; }
.gp svg { width: 22px; height: 22px; fill: currentColor; }

/* הצללה עדינה למעלה ולמטה, כדי שהכפתורים ייקראו על כל תמונה */
.gp-shade { position: absolute; left: 0; right: 0; pointer-events: none; }
.gp-shade.t { top: 0; height: 120px; background: linear-gradient(rgba(0,0,0,.55), transparent); }
.gp-shade.b { bottom: 0; height: 160px; background: linear-gradient(transparent, rgba(0,0,0,.65)); }

/* שכבה שתופסת לחיצה על הסרט עצמו */
.gp-hit { position: absolute; inset: 0; pointer-events: auto; }

/* סצנות: שורה למעלה */
.gp-ch { direction: ltr; position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); left: 64px; display: flex; justify-content: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.gp-ch::-webkit-scrollbar { display: none; }
.gp-ch button { direction: rtl; flex: none; font-size: 13px; padding: 7px 13px; border-radius: 20px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); white-space: nowrap; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s, color .2s; }
.gp-ch button:hover { background: rgba(255,255,255,.22); color: #fff; }
.gp-ch button.on { background: #fff; color: #000; }

/* באמצע: אחורה 10, פליי, קדימה 10 */
.gp-mid { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 34px; direction: ltr; }
.gp-mid button { width: 54px; height: 54px; border-radius: 50%; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.25); }
.gp-mid .gp-play { width: 76px; height: 76px; }
.gp-mid .gp-play svg { width: 30px; height: 30px; }
.gp-mid .gp-skip svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.gp-mid .gp-skip path { stroke-linecap: round; stroke-linejoin: round; }
.gp-mid .gp-skip text { fill: currentColor; stroke: none; font-size: 6.4px; font-weight: 600; text-anchor: middle; font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; letter-spacing: -.2px; }

/* למטה: פס ההתקדמות והזמן */
.gp-bar { position: absolute; left: max(18px, env(safe-area-inset-left)); right: max(18px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); direction: ltr; }
.gp-track { position: relative; height: 26px; cursor: pointer; touch-action: none; }
.gp-rail { position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); overflow: hidden; transition: height .15s, top .15s; }
.gp-track:hover .gp-rail, .gp.drag .gp-rail { top: 10px; height: 6px; }
.gp-buf { position: absolute; inset: 0 auto 0 0; background: rgba(255,255,255,.3); }
.gp-fill { position: absolute; inset: 0 auto 0 0; background: #fff; }
.gp-knob { position: absolute; top: 7px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
/* סימני הסצנות על הפס */
.gp-mark { position: absolute; top: 9px; width: 2px; height: 8px; margin-left: -1px; background: rgba(0,0,0,.55); pointer-events: none; }
/* תצוגה בזמן ריחוף או גרירה: תמונה, שם הסצנה והזמן */
.gp-tip { position: absolute; bottom: 30px; transform: translateX(-50%); display: none; flex-direction: column; align-items: center; gap: 5px; pointer-events: none; }
.gp-tip img { width: 160px; aspect-ratio: 16/9; object-fit: cover; border-radius: 4px; border: 1px solid rgba(255,255,255,.6); background: #111; }
.gp-tip b { font-weight: 400; font-size: 12px; text-shadow: 0 1px 6px rgba(0,0,0,.8); direction: rtl; }
.gp-tip.on { display: flex; }

.gp-row { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.gp-time { font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .02em; opacity: .9; }
.gp-sp { flex: 1; }
.gp-row button { width: 34px; height: 34px; }
.gp-row button svg { width: 20px; height: 20px; }
.gp-vol { display: flex; align-items: center; gap: 4px; }
.gp-vol input { width: 80px; accent-color: #fff; }
.gp-cc.on { color: #f5b335; }
/* איכות צפייה: תפריט קטן מעל הכפתור */
.gp-qwrap { position: relative; display: inline-flex; }
.gp .gp-row .gp-q { width: auto; height: 34px; padding: 0 6px; font-size: 13px; letter-spacing: .03em; opacity: .9; }
.gp-qmenu { position: absolute; bottom: 40px; right: -6px; display: flex; flex-direction: column; min-width: 110px; padding: 6px; border-radius: 10px; background: rgba(20,20,20,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); direction: ltr; }
.gp .gp-qmenu button { width: auto; height: auto; display: block; text-align: left; font-size: 13px; padding: 8px 12px; border-radius: 6px; color: rgba(255,255,255,.8); }
.gp .gp-qmenu button:hover { background: rgba(255,255,255,.1); color: #fff; }
.gp .gp-qmenu button.on { color: #fff; font-weight: 700; }
.gp .gp-qmenu button.on::before { content: "✓ "; }
.gp-small { display: none; }

/* טלפון: כפתורים גדולים יותר במרכז, בלי פס עוצמה (שולטים בכפתורים של הטלפון) */
@media (pointer: coarse) {
  .gp-vol { display: none; }
  .gp-mid { gap: 40px; }
  .gp-track { height: 34px; }
  .gp-rail { top: 15px; } .gp-track:hover .gp-rail, .gp.drag .gp-rail { top: 14px; }
  .gp-knob { top: 10px; width: 16px; height: 16px; margin-left: -8px; }
  .gp-mark { top: 13px; }
  .gp-tip { bottom: 36px; }
  .gp-tip img { width: 130px; }
}
@media (max-width: 600px) {
  .gp-ch { justify-content: flex-start; }
  .gp-ch button { font-size: 12px; padding: 6px 11px; }
  .gp-mid { gap: 30px; }
  .gp-mid button { width: 48px; height: 48px; }
  .gp-mid .gp-play { width: 66px; height: 66px; }
}
@media (prefers-reduced-motion: reduce) { .gp-fade, .gp-rail { transition: none; } }
