/*
 * ============================================================================
 *  PLAYER — STİL               Yol: /modules/player/player.css
 * ----------------------------------------------------------------------------
 *  Önek: .szp-*
 *  .szp          : oynatıcı kutusu (16:9)
 *  .szp-ctrl     : alt kontrol çubuğu (ilerleme, ses, hız, sinema, PiP, tam ekran)
 *  .szp-panel    : devam et / hata / bitti pencereleri
 *  .szp-dim      : SİNEMA MODU — sayfanın geri kalanını karartan perde
 *  Durum sınıfları (JS ekler): is-playing, is-paused, is-idle (kontroller gizli),
 *  is-loading, is-fs (tam ekran), is-muted
 * ============================================================================
 */
.szp-page { background: #030305; }
.szp-stage { padding-top: calc(var(--sz-header-h) + var(--sz-safe-t) + 18px); position: relative; }
.szp-wrap { max-width: min(1680px, calc((100vh - var(--sz-header-h) - 60px) * 16 / 9)); margin: 0 auto; padding: 0 var(--sz-gutter); position: relative; z-index: 210; }

.szp {
  position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: 18px; overflow: hidden; outline: none;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.06); user-select: none; -webkit-user-select: none; isolation: isolate;
  --szp-accent: var(--sz-accent);
}
.szp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.szp-poster { position: absolute; inset: 0; background-size: cover; background-position: center 25%; filter: blur(30px) brightness(.45); transform: scale(1.15); transition: opacity .6s; z-index: 0; }
.szp.is-started .szp-poster { opacity: 0; pointer-events: none; }
.szp-video { z-index: 1; }
.szp-brand { position: absolute; top: 18px; right: 22px; z-index: 3; font-weight: 900; font-size: 18px; letter-spacing: -.04em; opacity: .35; pointer-events: none; transition: opacity .3s; }
.szp-brand span { background: var(--sz-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.szp.is-idle .szp-brand { opacity: .18; }

/* Üst bar */
.szp-top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 16px 18px 40px; background: linear-gradient(180deg, rgba(0,0,0,.75), transparent); transition: opacity .35s, transform .35s; }
.szp-top__t { min-width: 0; }
.szp-top__t small { display: block; font-size: 12px; color: rgba(255,255,255,.65); }
.szp-top__t b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.szp:not(.is-fs) .szp-top { display: none; }

/* Büyük oynat */
.szp-bigplay {
  position: absolute; left: 50%; top: 50%; z-index: 6; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.95); color: #08080d; box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 10px rgba(255,255,255,.12); transition: transform .3s var(--sz-ease), opacity .3s;
}
.szp-bigplay .sz-ico { width: 36px; height: 36px; margin-left: 6px; }
.szp-bigplay:hover { transform: scale(1.07); }
.szp.is-playing .szp-bigplay, .szp.is-loading .szp-bigplay, .szp.has-panel .szp-bigplay { opacity: 0; pointer-events: none; transform: scale(.8); }

.szp-spinner { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .2s; }
.szp.is-loading .szp-spinner { opacity: 1; }
.szp-spinner .sz-spinner { width: 60px; height: 60px; border-width: 4px; border-top-color: #fff; }

/* Çift dokunma ±10 sn */
.szp-tap { position: absolute; top: 0; bottom: 0; width: 38%; z-index: 3; display: grid; place-items: center; pointer-events: none; opacity: 0; }
.szp-tap--l { left: 0; border-radius: 0 50% 50% 0; } .szp-tap--r { right: 0; border-radius: 50% 0 0 50%; }
.szp-tap span { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); }
.szp-tap span .sz-ico { width: 34px; height: 34px; }
.szp-tap.is-show { animation: szp-tap .6s ease-out; }
@keyframes szp-tap { 0% { opacity: 0; background: rgba(255,255,255,0); } 30% { opacity: 1; background: rgba(255,255,255,.08); } 100% { opacity: 0; } }

/* Ekran bildirimi (ses %, hız vb.) */
.szp-osd { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); z-index: 7; padding: 10px 18px; border-radius: 12px; background: rgba(0,0,0,.7); font-weight: 700; font-size: 16px; opacity: 0; transition: opacity .25s; pointer-events: none; backdrop-filter: blur(8px); white-space: nowrap; }
.szp-osd.is-show { opacity: 1; }

/* Paneller */
.szp-panel { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(0,0,0,.6); backdrop-filter: blur(6px); padding: 20px; }
.szp-panel[hidden] { display: none; }
.szp-panel__box { text-align: center; max-width: 520px; animation: sz-fade .4s var(--sz-ease); }
.szp-panel__box h3 { font-size: clamp(18px, 2.4vw, 26px); margin-bottom: 20px; }
.szp-panel__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.szp-panel__ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center; background: rgba(255,45,85,.15); color: var(--sz-accent); }
.szp-panel__ico .sz-ico { width: 30px; height: 30px; }
.szp-next { position: relative; display: flex; align-items: center; gap: 16px; text-align: left; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); margin-bottom: 16px; overflow: hidden; }
.szp-next img { width: 64px; height: 96px; object-fit: cover; border-radius: 10px; }
.szp-next small { display: block; color: var(--sz-muted); font-size: 13px; margin-bottom: 4px; }
.szp-next b { font-size: 17px; }
.szp-next__ring { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--sz-grad); width: 0; }
.szp-end.is-counting .szp-next__ring { animation: szp-count 10s linear forwards; }
@keyframes szp-count { to { width: 100%; } }

/* Kontrol çubuğu */
.szp-ctrl { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 60px 20px 14px; background: linear-gradient(0deg, rgba(0,0,0,.88) 0%, rgba(0,0,0,.45) 55%, transparent 100%); transition: opacity .35s, transform .35s var(--sz-ease); }
.szp.is-idle .szp-ctrl, .szp.is-idle .szp-top { opacity: 0; transform: translateY(8px); pointer-events: none; }
.szp.is-idle { cursor: none; }
.szp:not(.is-started) .szp-ctrl { opacity: 0; pointer-events: none; }

.szp-bar { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; margin: 0 4px; }
.szp-bar__track { position: relative; width: 100%; height: 5px; border-radius: 5px; background: rgba(255,255,255,.22); overflow: hidden; transition: height .15s; }
.szp-bar:hover .szp-bar__track, .szp-bar.is-drag .szp-bar__track { height: 7px; }
.szp-bar__track i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.szp-bar__buf { background: rgba(255,255,255,.35); }
.szp-bar__hover { background: rgba(255,255,255,.25); opacity: 0; }
.szp-bar:hover .szp-bar__hover { opacity: 1; }
.szp-bar__play { background: var(--szp-accent); z-index: 1; }
.szp-bar__knob { position: absolute; top: 50%; left: 0; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--szp-accent); box-shadow: 0 0 0 4px rgba(255,45,85,.25); transform: scale(0); transition: transform .15s; z-index: 2; }
.szp-bar:hover .szp-bar__knob, .szp-bar.is-drag .szp-bar__knob { transform: scale(1); }
.szp-bar__tip { position: absolute; bottom: 26px; left: 0; transform: translateX(-50%); padding: 5px 9px; border-radius: 8px; background: rgba(0,0,0,.85); font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; }
.szp-bar:hover .szp-bar__tip, .szp-bar.is-drag .szp-bar__tip { opacity: 1; }

.szp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.szp-row__l, .szp-row__r { display: flex; align-items: center; gap: 4px; }
.szp-row__c { flex: 1; text-align: center; font-weight: 600; font-size: 15px; color: rgba(255,255,255,.85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.szp-ibtn { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; color: #fff; transition: background .2s, transform .15s; flex: none; }
.szp-ibtn:hover { background: rgba(255,255,255,.12); }
.szp-ibtn:active { transform: scale(.92); }
.szp-ibtn .sz-ico { width: 26px; height: 26px; }
.szp-ibtn.is-on { color: var(--sz-gold); }
.szp-time { font-size: 15px; font-weight: 600; color: rgba(255,255,255,.85); margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.szp-time b { color: #fff; }

.szp-i-pause, .szp.is-playing .szp-i-play { display: none; }
.szp.is-playing .szp-i-pause { display: inline; }
.szp-i-vol1, .szp-i-mute, .szp-i-exitfs { display: none; }
.szp.is-vol-low .szp-i-vol { display: none; } .szp.is-vol-low .szp-i-vol1 { display: inline; }
.szp.is-muted .szp-i-vol, .szp.is-muted .szp-i-vol1 { display: none; } .szp.is-muted .szp-i-mute { display: inline; }
.szp.is-fs .szp-i-fs { display: none; } .szp.is-fs .szp-i-exitfs { display: inline; }

.szp-vol { display: flex; align-items: center; }
.szp-vol__range { width: 0; opacity: 0; transition: width .25s var(--sz-ease), opacity .2s; accent-color: #fff; height: 4px; cursor: pointer; }
.szp-vol:hover .szp-vol__range, .szp-vol:focus-within .szp-vol__range { width: 90px; opacity: 1; margin-right: 6px; }

/* Ayarlar menüsü */
.szp-menu-wrap { position: relative; }
.szp-menu {
  position: absolute; right: 0; bottom: 56px; width: 270px; padding: 10px; border-radius: 16px; background: rgba(18,18,26,.96); border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 50px rgba(0,0,0,.7); backdrop-filter: blur(16px); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s var(--sz-ease);
}
.szp-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.szp-menu__h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--sz-muted); padding: 8px 6px 6px; font-weight: 700; }
.szp-menu__speeds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.szp-menu__speeds button { height: 36px; border-radius: 9px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.06); }
.szp-menu__speeds button:hover { background: rgba(255,255,255,.12); }
.szp-menu__speeds button.is-active { background: var(--sz-primary); }
.szp-bright { width: 100%; accent-color: var(--sz-primary); margin: 4px 0 6px; }
.szp-menu__row { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 10px 6px; border-radius: 9px; font-size: 14px; cursor: pointer; }
.szp-menu__row:hover { background: rgba(255,255,255,.06); }
.szp-menu__row input { width: 18px; height: 18px; accent-color: var(--sz-primary); }
.szp-menu__row .sz-ico { width: 16px; height: 16px; }

/* Tam ekran */
.szp.is-fs { border-radius: 0; aspect-ratio: auto; width: 100%; height: 100%; }
.szp:fullscreen { border-radius: 0; }
.szp:-webkit-full-screen { width: 100%; height: 100%; border-radius: 0; }

/* Video altı bilgi */
.szp-info { display: grid; grid-template-columns: 1fr auto; gap: 14px 24px; align-items: center; margin-top: 22px; margin-bottom: 30px; position: relative; z-index: 1; }
.szp-info h1 { font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.szp-info__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; color: var(--sz-text-2); font-size: 14px; }
.szp-info__actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.szp-info__desc { grid-column: 1 / -1; color: var(--sz-muted); max-width: 900px; margin: 0; }
.szp-info__desc a { color: #b8a8ff; font-weight: 600; }

/* SİNEMA MODU */
.szp-dim { position: fixed; inset: 0; z-index: 205; background: #000; opacity: 0; visibility: hidden; transition: opacity .6s var(--sz-ease), visibility .6s; }
body.szp-cinema .szp-dim { opacity: .94; visibility: visible; }
body.szp-cinema .szp { box-shadow: 0 0 120px -10px rgba(123,92,255,.35), 0 0 0 1px rgba(255,255,255,.04); }
body.szp-cinema .sz-header { opacity: .08; }
body.szp-cinema .sz-header:hover { opacity: 1; }
.szp-ibtn[data-szp="cinema"].is-on { color: var(--sz-gold); }

/* Klavye kısayolları */
.szp-keys { display: grid; gap: 10px; }
.szp-keys div { display: flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--sz-text-2); }
.szp-keys span { margin-left: 10px; }
kbd { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px; background: var(--sz-surface-3); border: 1px solid var(--sz-line-2); border-bottom-width: 3px; font: 600 13px var(--sz-font); color: #fff; }

/* MOBİL */
@media (max-width: 860px) {
  .szp-stage { padding-top: calc(var(--sz-header-h) + var(--sz-safe-t)); }
  .szp-wrap { padding: 0; max-width: none; }
  .szp { border-radius: 0; }
  .szp-ctrl { padding: 40px 8px 6px; }
  .szp-ibtn { width: 40px; height: 40px; }
  .szp-ibtn .sz-ico { width: 23px; height: 23px; }
  .szp-row__c, .szp-vol__range, .szp-ibtn[data-szp="back"], .szp-ibtn[data-szp="fwd"], .szp-ibtn[data-szp="cinema"] { display: none; }
  .szp-time { font-size: 13px; margin-left: 2px; }
  .szp-bigplay { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .szp-bigplay .sz-ico { width: 28px; height: 28px; }
  .szp-brand { font-size: 13px; top: 12px; right: 14px; }
  .szp-info { grid-template-columns: 1fr; margin-top: 16px; }
  .szp-info__actions { justify-content: flex-start; }
  .szp-menu { right: -40px; width: 250px; }
  .szp-panel__box h3 { font-size: 17px; margin-bottom: 14px; }
  .szp-next img { width: 48px; height: 72px; }
}
@media (max-width: 860px) and (orientation: landscape) {
  .szp-stage { padding-top: 0; }
  body.szp-page .sz-header, body.szp-page .sz-tabbar { display: none; }
  .szp { aspect-ratio: auto; height: 100vh; height: 100dvh; }
}

/* Cihaz sınırı paneli (premium modülü) */
.szp-panel__ico--gold { background: rgba(255,190,80,.16); color: #ffcf66; }
.szp-panel__txt { color: #c9c9d6; font-size: 15px; margin: -8px 0 20px; line-height: 1.55; }

/* Embed: tıklanabilir SEZFILM markası (Admin → Ayarlar → Embed: konum) */
.szp-brand--embed { pointer-events: auto; opacity: .9 !important; z-index: 12; text-decoration: none; padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); }
.szp-brand--embed:hover { opacity: 1 !important; background: rgba(0,0,0,.7); }
.szp-brand--tl { top: 12px !important; left: 12px !important; right: auto !important; bottom: auto !important; }
.szp-brand--tr { top: 12px !important; right: 12px !important; left: auto !important; bottom: auto !important; }
.szp-brand--bl { bottom: 70px !important; left: 12px !important; top: auto !important; right: auto !important; }
.szp-brand--br { bottom: 70px !important; right: 12px !important; top: auto !important; left: auto !important; }

/* ---- Düzeltme 5.1 -------------------------------------------------------
   1) Header menüleri (bildirim zili, profil) oynatıcının ÜSTÜNDE açılsın.
      Sinema modunda header yine karartmanın altında kalır.               */
.szp-page .sz-header { z-index: 230; }
body.szp-cinema .sz-header { z-index: 100; }

/* 2) Ayarlar menüsü: masaüstünde oynatıcının içinde (sığmazsa kaydırılır),
      mobilde ekranın altından açılan alt sayfa (hiçbir satır kesilmez).   */
.szp-menu { overflow-y: auto; overscroll-behavior: contain; }
.szp-menu--sheet { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 82vh; z-index: 1000;
  border-radius: 22px 22px 0 0; padding: 8px 14px calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%);
  box-shadow: 0 0 0 100vmax rgba(0,0,0,0); transition: transform .3s var(--sz-ease), box-shadow .3s, opacity .2s, visibility .3s; }
.szp-menu--sheet.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.6); }
.szp-menu--sheet::before { content: ''; display: block; width: 42px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); margin: 4px auto 6px; }
.szp-menu--sheet .szp-menu__speeds button { height: 42px; }
html.szp-sheet-open, html.szp-sheet-open body { overflow: hidden; }

/* 3) İlerleme çubuğunda kare önizleme */
.szp-bar__tip { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 5px; }
.szp-bar__tip .szp-bar__time { padding: 0 4px; }
.szp-thumb { display: none; width: 168px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.szp-bar__tip.has-thumb .szp-thumb { display: block; }
.szp-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 600px) { .szp-thumb { width: 128px; } }

/* ---- Etap 6: kalite / ses / altyazı menüsü, girişi atla, altyazı görünümü ---- */
.szp-menu__sec { padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.szp-menu__sec .szp-menu__h, .szp-menu__h { display: flex; align-items: center; gap: 6px; }
.szp-menu__h .sz-ico { width: 14px; height: 14px; }
.szp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.szp-chip { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.06); color: #fff; }
.szp-chip:hover { background: rgba(255,255,255,.12); }
.szp-chip.is-active { background: var(--sz-primary); }
.szp-chip[data-locked] { color: #ffd98a; }
.szp-chips--sm .szp-chip { min-height: 30px; padding: 0 10px; font-size: 12px; }
.szp-substyle { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--sz-muted); }
.szp-skip { position: absolute; right: 22px; bottom: 96px; z-index: 9; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px;
  background: rgba(20,20,28,.85); border: 1px solid rgba(255,255,255,.35); color: #fff; font-weight: 700; font-size: 14.5px; backdrop-filter: blur(8px); animation: sz-fade .3s ease; }
.szp-skip:hover { background: #fff; color: #000; }
.szp-skip .sz-ico { width: 18px; height: 18px; }
.szp-skip--next { background: #fff; color: #000; }
.szp.is-ad .szp-skip { display: none !important; }
.szp-skip[hidden] { display: none !important; }
@media (max-width: 600px) { .szp-skip { right: 12px; bottom: 64px; height: 38px; padding: 0 12px; font-size: 13px; } }
/* Altyazı görünümü (menüden: boyut, arka plan, renk) */
.szp-video::cue { font-family: var(--sz-font); line-height: 1.35; }
.szp.sub-s .szp-video::cue { font-size: 70%; } .szp.sub-m .szp-video::cue { font-size: 100%; }
.szp.sub-l .szp-video::cue { font-size: 135%; } .szp.sub-xl .szp-video::cue { font-size: 170%; }
.szp.subbg-none .szp-video::cue { background: transparent; text-shadow: 0 0 4px #000, 0 0 2px #000, 1px 1px 2px #000; }
.szp.subbg-semi .szp-video::cue { background: rgba(0,0,0,.55); }
.szp.subbg-solid .szp-video::cue { background: #000; }
.szp.subc-white .szp-video::cue { color: #fff; } .szp.subc-yellow .szp-video::cue { color: #ffe14d; }
.szp-thumb { background-repeat: no-repeat; }
