/* YPlayer — tamamen özel oynatıcı arayüzü (YouTube tarzı, modern) */
:root { --yp-accent: #ff0000; }

.yplayer-root, .yp { width: 100%; height: 100%; }
.yp {
  position: relative;
  background: #000;
  overflow: hidden;
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #fff;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  line-height: normal;
}
.yp * { box-sizing: border-box; }
.yp [hidden] { display: none !important; }   /* .yp-btn{display:flex} hidden özniteliğini ezmesin */

.yp .yp-media, .yp video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.yp video { object-fit: contain; background: #000; cursor: pointer; }
.yp .yp-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Alt gradient */
.yp-gradient {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
  opacity: 1;
  transition: opacity .25s;
  pointer-events: none;
  z-index: 2;
}
.yp.yp-hidden .yp-gradient { opacity: 0; }

/* Başlık (üst) */
.yp-title {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 16px 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,.6), rgba(0,0,0,0));
  font-size: 16px; font-weight: 500;
  z-index: 3; pointer-events: none;
  transition: opacity .25s;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.yp.yp-hidden .yp-title { opacity: 0; }

/* Büyük orta oynat düğmesi */
.yp-bigplay {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border: 0; border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 4;
  transition: background .2s, transform .2s, opacity .2s;
}
.yp-bigplay svg { width: 38px; height: 38px; fill: currentColor; }
.yp-bigplay:hover { background: var(--yp-accent); transform: translate(-50%,-50%) scale(1.06); }
.yp:not(.yp-paused) .yp-bigplay { opacity: 0; pointer-events: none; transform: translate(-50%,-50%) scale(.8); }
.yp-loading .yp-bigplay { opacity: 0; pointer-events: none; }

/* Yükleniyor spinner */
.yp-spinner {
  position: absolute; top: 50%; left: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  border: 4px solid rgba(255,255,255,.25);
  border-top-color: var(--yp-accent);
  border-radius: 50%;
  z-index: 4; opacity: 0; pointer-events: none;
  animation: yp-spin .8s linear infinite;
  transition: opacity .2s;
}
.yp.yp-loading .yp-spinner { opacity: 1; }
@keyframes yp-spin { to { transform: rotate(360deg); } }

/* Hata */
.yp-error, .yp-error-only {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.85); padding: 24px; text-align: center;
}
.yp-err-inner { max-width: 80%; font-size: 14px; line-height: 1.5; }
.yp-err-icon { font-size: 34px; margin-bottom: 8px; color: var(--yp-accent); }

/* Kontrol çubuğu */
.yp-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0 12px 6px;
  z-index: 5;
  opacity: 1; transform: translateY(0);
  transition: opacity .25s, transform .25s;
}
.yp.yp-hidden .yp-controls { opacity: 0; transform: translateY(8px); pointer-events: none; }
.yp.yp-hidden, .yp.yp-hidden video { cursor: none; }

/* İlerleme çubuğu */
.yp-progress {
  position: relative;
  height: 18px;
  display: flex; align-items: center;
  cursor: pointer;
  margin-bottom: 2px;
}
.yp-prog-track {
  position: relative;
  width: 100%; height: 4px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
  transition: height .12s;
}
.yp-progress:hover .yp-prog-track, .yp-scrubbing .yp-prog-track { height: 6px; }
.yp-prog-buf { position: absolute; left: 0; top: 0; height: 100%; background: rgba(255,255,255,.45); border-radius: 2px; }
.yp-prog-play { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--yp-accent); border-radius: 2px; }
.yp-prog-knob {
  position: absolute; top: 50%; left: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--yp-accent);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .12s;
}
.yp-progress:hover .yp-prog-knob, .yp-scrubbing .yp-prog-knob { transform: translate(-50%,-50%) scale(1); }
.yp-prog-tip {
  position: absolute; bottom: 22px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.85); color: #fff;
  padding: 3px 7px; border-radius: 4px;
  font-size: 12px; pointer-events: none;
  opacity: 0; white-space: nowrap;
}
.yp-progress:hover .yp-prog-tip { opacity: 1; }
.yp-live-stream .yp-progress { display: none; }   /* canlıda seek çubuğu yok */

/* Alt satır */
.yp-bottom { display: flex; align-items: center; justify-content: space-between; height: 42px; }
.yp-left, .yp-right { display: flex; align-items: center; gap: 2px; }

.yp-btn {
  width: 40px; height: 40px;
  border: 0; background: none; color: #fff;
  cursor: pointer; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s, transform .12s;
}
.yp-btn svg { width: 100%; height: 100%; fill: currentColor; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.yp-btn:hover { background: rgba(255,255,255,.15); }
.yp-btn:active { transform: scale(.92); }
.yp-btn.on { color: var(--yp-accent); }
.yp-play { width: 44px; height: 44px; }

/* Ses */
.yp-vol { display: flex; align-items: center; overflow: hidden; width: 0; transition: width .2s; }
.yp-left:hover .yp-vol, .yp-vol:hover { width: 80px; }
.yp-vol-track { position: relative; width: 64px; height: 4px; margin: 0 8px; background: rgba(255,255,255,.35); border-radius: 2px; cursor: pointer; }
.yp-vol-fill { position: absolute; left: 0; top: 0; height: 100%; background: #fff; border-radius: 2px; }
.yp-vol-knob { position: absolute; top: 50%; width: 12px; height: 12px; background: #fff; border-radius: 50%; transform: translate(-50%,-50%); }

.yp-time { font-size: 13px; padding: 0 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.yp-sep { opacity: .8; }
.yp-time .yp-dur { color: rgba(255,255,255,.75); }

.yp-livebadge { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 0 10px; text-transform: uppercase; letter-spacing: .3px; }
.yp-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--yp-accent); animation: yp-pulse 1.6s infinite; }
@keyframes yp-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Ayar menüsü */
.yp-settings { position: relative; }
.yp-menu {
  position: absolute; right: 0; bottom: 52px;
  min-width: 210px;
  background: rgba(28,28,28,.96);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 6px;
  font-size: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
  overflow: hidden;
}
.yp-menu-head { display: flex; align-items: center; gap: 6px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 4px; font-weight: 500; }
.yp-menu-head svg { width: 20px; height: 20px; fill: #fff; }
.yp-menu-row, .yp-menu-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 10px 12px;
  background: none; border: 0; color: #fff;
  cursor: pointer; border-radius: 8px; font-size: 14px; text-align: left;
}
.yp-menu-item { justify-content: flex-start; gap: 8px; }
.yp-menu-row:hover, .yp-menu-item:hover { background: rgba(255,255,255,.12); }
.yp-menu-val { color: rgba(255,255,255,.6); }
.yp-menu-chk { width: 18px; height: 18px; display: inline-flex; }
.yp-menu-chk svg { width: 18px; height: 18px; fill: var(--yp-accent); }
.yp-menu-item.on { color: #fff; }

/* Tam ekran */
.yp.yp-fs { width: 100vw; height: 100vh; }

/* Mobil — daha büyük dokunma alanları */
@media (max-width: 640px) {
  .yp-btn { width: 44px; height: 44px; }
  .yp-vol { display: none; }            /* mobilde ses kaydırıcısı gizli */
  .yp-bigplay { width: 64px; height: 64px; }
  .yp-bigplay svg { width: 32px; height: 32px; }
  .yp-time { font-size: 12px; padding: 0 4px; }
  .yp-menu { min-width: 180px; }
}

/* Altyazı görünümü */
.yp video::cue { background: rgba(0,0,0,.7); color: #fff; font-size: .9em; }
