/* ── OVERLAY ───────────────────────────────────────────────── */
.ytpp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.ytpp-overlay.ytpp-hidden {
  display: none;
}

/* ── MODAL ─────────────────────────────────────────────────── */
.ytpp-modal {
  position: relative;
  width: min(820px, 100%);
  background: #0a0a0a;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  animation: ytpp-slide-in 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ytpp-slide-in {
  from { transform: translateY(24px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── HEADER ────────────────────────────────────────────────── */
.ytpp-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #111;
  border-bottom: 1px solid #222;
}

.ytpp-modal-title {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 40px);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

/* ── KAPAT BUTONU ──────────────────────────────────────────── */
.ytpp-close {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
}

.ytpp-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ── VİDEO ALANI ───────────────────────────────────────────── */
.ytpp-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* ── THUMBNAIL ─────────────────────────────────────────────── */
.ytpp-thumb {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.ytpp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ytpp-thumb.ytpp-hidden {
  display: none;
}

/* ── PLAY BUTONU (thumbnail üzeri) ─────────────────────────── */
.ytpp-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.62);
  border: 3px solid rgba(255,255,255,0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  z-index: 2;
}

.ytpp-play:hover {
  background: #ff0000;
  border-color: #ff0000;
  transform: translate(-50%, -50%) scale(1.08);
}

/* ── FOOTER ────────────────────────────────────────────────── */
.ytpp-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #111;
  border-top: 1px solid #222;
}

.ytpp-footer-source {
  font-size: 11px;
  color: #475569;
  font-family: 'Inter', sans-serif;
}

.ytpp-footer-link {
  font-size: 11px;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
  font-family: 'Inter', sans-serif;
}

.ytpp-footer-link:hover {
  color: #ff0000;
}

/* ── IFRAME ────────────────────────────────────────────────── */
#ytpp-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  border: 0;
}

/* ── SCROLL AÇMA BUTONU ────────────────────────────────────── */
#ytpp-scroll-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 0;
  background: #111;
  border: 1px solid #222;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: ytpp-btn-pop 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  max-width: 320px;
  user-select: none;
}

#ytpp-scroll-btn.ytpp-popup-open {
  display: none;
}

#ytpp-scroll-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.ytpp-scroll-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: #ff0000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.2s;
}

#ytpp-scroll-btn:hover .ytpp-scroll-icon {
  background: #cc0000;
}

.ytpp-scroll-text {
  padding: 0 14px;
  font-size: 11px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #e2e8f0;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

#ytpp-scroll-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Tooltip */
#ytpp-scroll-btn::before {
  display: none;
}

@keyframes ytpp-btn-pop {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
