/* BP Player CSS */

.bp-wrapper { position: relative; width: 100%; margin: 24px 0; border-radius: 14px; overflow: hidden; background: #000; border: 2px solid #2563eb; box-shadow: 0 12px 40px rgba(37, 99, 235, 0.25); }
.bp-wrapper.bp-has-thumb { padding-bottom: 56.25%; height: 0; }
.bp-wrapper video { display: block; width: 100%; height: auto; background: #000; }
.bp-wrapper.bp-has-thumb video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }

.bp-poster { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, #0f172a, #1e3a8a); z-index: 10; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: opacity 0.4s; }
.bp-poster.bp-hidden { opacity: 0; pointer-events: none; }
.bp-poster-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0.85; }
.bp-poster-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(15,23,42,0.4), rgba(15,23,42,0.7)); z-index: 1; }
.bp-play-btn { position: relative; z-index: 2; width: 84px; height: 84px; border-radius: 50%; background: rgba(37, 99, 235, 0.95); border: 3px solid rgba(255, 255, 255, 0.95); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(37, 99, 235, 0.15); transition: all 0.3s; }
.bp-play-btn:hover { transform: scale(1.1); background: #2563eb; }
.bp-play-btn svg { width: 36px; height: 36px; fill: #fff; margin-left: 4px; }

.bp-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 16px 14px; background: linear-gradient(to top, rgba(0,0,0,0.95), transparent); z-index: 5; transition: opacity 0.3s, transform 0.3s; }
.bp-wrapper.bp-idle .bp-controls { opacity: 0; transform: translateY(20px); pointer-events: none; }

.bp-progress { position: relative; width: 100%; height: 6px; background: rgba(255,255,255,0.25); border-radius: 3px; cursor: pointer; margin-bottom: 12px; direction: ltr; }
.bp-progress:hover { height: 8px; }
.bp-progress-buffered { position: absolute; top: 0; left: 0; height: 100%; background: rgba(255,255,255,0.35); border-radius: 3px; }
.bp-progress-current { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, #3b82f6, #60a5fa); border-radius: 3px; box-shadow: 0 0 10px rgba(59,130,246,0.8); }

.bp-buttons { display: flex; align-items: center; gap: 4px; direction: ltr; }
.bp-btn { background: transparent; border: 0; color: #fff; cursor: pointer; padding: 8px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.bp-btn:hover { background: rgba(59,130,246,0.3); }
.bp-btn svg { width: 22px; height: 22px; fill: #fff; pointer-events: none; }
.bp-time { font-size: 13px; font-weight: 700; direction: ltr; margin: 0 10px; color: #fff; font-variant-numeric: tabular-nums; }
.bp-spacer { flex: 1; }

.bp-wrapper:fullscreen { border-radius: 0; border: none; padding-bottom: 0; }
.bp-wrapper:fullscreen video { position: relative; width: 100vw; height: 100vh; object-fit: contain; }

/* Loading Spinner */
.bp-wrapper .bp-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 100; width: 64px; height: 64px; border-radius: 50%; border: 4px solid rgba(59, 130, 246, 0.2); border-top-color: #3b82f6; animation: bp-spin 0.8s linear infinite; display: none; pointer-events: none; box-shadow: 0 0 30px rgba(59, 130, 246, 0.4); }
.bp-wrapper .bp-loading.bp-show { display: block; }
@keyframes bp-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.bp-wrapper.bp-waiting .bp-controls { opacity: 0.5; }

/* Settings Menu */
.bp-settings-menu { position: fixed !important; background: rgba(15, 23, 42, 0.98); backdrop-filter: blur(15px); border: 1px solid rgba(59, 130, 246, 0.5); border-radius: 12px; padding: 12px; min-width: 260px; display: none; z-index: 999999; box-shadow: 0 20px 50px rgba(0,0,0,0.9); }
.bp-settings-menu.bp-show { display: flex !important; gap: 16px; }
.bp-settings-column { flex: 1; min-width: 0; }
.bp-settings-title { color: #60a5fa; font-size: 10.5px; font-weight: 800; padding: 0 0 8px; text-align: center; border-bottom: 1px solid rgba(59,130,246,0.2); margin-bottom: 8px; }
.bp-settings-item { color: #e2e8f0; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 12px; text-align: center; margin-bottom: 2px; }
.bp-settings-item:hover { background: rgba(59, 130, 246, 0.3); }
.bp-settings-item.bp-active { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-weight: 700; }

.bp-wrapper.bp-idle 
.bp-wrapper.bp-fullscreen 

/* Mobile */
@media (max-width: 640px) {
  .bp-play-btn { width: 64px; height: 64px; }
  .bp-play-btn svg { width: 28px; height: 28px; }
  .bp-btn { padding: 5px; }
  .bp-btn svg { width: 18px; height: 18px; }
  .bp-time { font-size: 11px; margin: 0 4px; }
  .bp-controls { padding: 25px 8px 8px; }
  .bp-loading { width: 48px; height: 48px; }
  
}


/* Toast Responsive */
@media (max-width: 640px) {
    
    
    
    
}
@media (min-width: 641px) {
    
}


/* BP Toast (بازسازی شده) */
#bp-scroll-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 14px;
    padding: 16px 20px;
    color: #f1f5f9;
    font-size: 13px;
    z-index: 2147483647;
    box-shadow: 0 25px 60px rgba(0,0,0,0.9);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    max-width: 460px;
    width: calc(100% - 32px);
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
    font-family: Tahoma, Arial, sans-serif;
    direction: rtl;
}
#bp-scroll-toast.bp-show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
#bp-scroll-toast .bp-ts-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: #60a5fa;
}
#bp-scroll-toast .bp-ts-body {
    flex: 1;
    min-width: 0;
}
#bp-scroll-toast .bp-ts-title {
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
}
#bp-scroll-toast .bp-ts-sub {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 12px;
    line-height: 1.4;
}
#bp-scroll-toast .bp-ts-actions {
    display: flex;
    gap: 8px;
}
#bp-scroll-toast .bp-ts-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 0;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
#bp-scroll-toast .bp-ts-btn-yes {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
#bp-scroll-toast .bp-ts-btn-no {
    background: rgba(255,255,255,0.08);
    color: #cbd5e1;
    border: 1px solid rgba(255,255,255,0.1);
}
#bp-scroll-toast .bp-ts-close {
    background: transparent;
    border: 0;
    color: #64748b;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 0;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}
@media (max-width: 640px) {
    #bp-scroll-toast {
        bottom: 12px;
        padding: 14px 16px;
        gap: 12px;
    }
    #bp-scroll-toast .bp-ts-title { font-size: 13px; }
    #bp-scroll-toast .bp-ts-icon { width: 36px; height: 36px; font-size: 18px; }
}


/* ═══ Settings Menu — Mobile Responsive ═══ */
@media (max-width: 640px) {
    .bp-settings-menu {
        min-width: 200px !important;
        max-width: 240px !important;
        padding: 8px !important;
        gap: 8px !important;
        border-radius: 10px !important;
    }
    .bp-settings-menu .bp-settings-column {
        flex: 1;
        min-width: 0;
    }
    .bp-settings-menu .bp-settings-title {
        font-size: 9px !important;
        padding: 0 0 5px !important;
        margin-bottom: 5px !important;
    }
    .bp-settings-menu .bp-settings-item {
        font-size: 10px !important;
        padding: 5px 6px !important;
        margin-bottom: 1px !important;
    }
}

/* ═══ Settings Menu — Desktop (بهتر و تمیزتر) ═══ */
@media (min-width: 641px) {
    .bp-settings-menu {
        min-width: 280px !important;
        padding: 12px !important;
        gap: 14px !important;
    }
}


/* قطره کوچیک زیر واترمارک */


/* درخشش پشت واترمارک */


/* انیمیشن اصلی — سکوت + حرکت ناگهانی + برگشت */

    65% {
        transform: translateX(4px) scale(1.05) rotate(-2deg);
    }
    70% {
        transform: translateX(-3px) scale(1.1) rotate(2deg);
        color: #bfdbfe;
        text-shadow: 0 0 12px rgba(96, 165, 250, 0.9), 0 0 24px rgba(59, 130, 246, 0.5);
    }
    75% {
        transform: translateX(2px) scale(1.08) rotate(-1deg);
        color: #dbeafe;
        text-shadow: 0 0 16px rgba(147, 197, 253, 1), 0 0 32px rgba(59, 130, 246, 0.8);
    }
    80% {
        transform: translateX(0) scale(1) rotate(0deg);
        color: #93c5fd;
        text-shadow: 0 0 6px rgba(96, 165, 250, 0.5);
    }
    85%, 100% {
        transform: translateX(0) scale(1) rotate(0deg);
        color: #93c5fd;
        text-shadow: 0 0 0 transparent;
    }
}

/* انیمیشن قطره */

    60% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    75% {
        opacity: 0.8;
        transform: translateY(15px) scale(0.8);
    }
    85%, 100% {
        opacity: 0;
        transform: translateY(25px) scale(0.3);
    }
}

/* انیمیشن درخشش */

    65% { opacity: 0.8; }
    75% { opacity: 1; }
    85%, 100% { opacity: 0; }
}

/* در حالت هاور — انیمیشن سریع و شاد */



    25% { transform: scale(1.2) rotate(-8deg); }
    50% { transform: scale(0.9) rotate(8deg); }
    75% { transform: scale(1.1) rotate(-4deg); }
}

/* در حالت تمام‌صفحه سریع‌تر */
.bp-wrapper.bp-fullscreen 

/* موبایل — کوچیک‌تر ولی همچنان جذاب */
@media (max-width: 640px) {
    
    
}


/* ═══ Watermark — Neon Pulse (Clean & Modern) ═══ */

.bp-watermark {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 7;
    padding: 6px 14px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 20px;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 700;
    font-family: "Tahoma", Arial, sans-serif;
    letter-spacing: 0.5px;
    pointer-events: none;
    user-select: none;
    direction: ltr;
    overflow: hidden;
    animation: bpPulse 5s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* بازتاب نوری که از راست به چپ رد می‌شه */
.bp-watermark::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(147, 197, 253, 0.6),
        rgba(255, 255, 255, 0.9),
        rgba(147, 197, 253, 0.6),
        transparent
    );
    animation: bpShine 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bpPulse {
    0%, 100% {
        transform: scale(1);
        border-color: rgba(96, 165, 250, 0.35);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    }
    50% {
        transform: scale(1.03);
        border-color: rgba(96, 165, 250, 0.6);
        box-shadow: 0 2px 15px rgba(59, 130, 246, 0.4);
    }
}

@keyframes bpShine {
    0%, 70% {
        left: -100%;
    }
    85% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* حالت تمام‌صفحه */
.bp-wrapper.bp-fullscreen .bp-watermark {
    top: 20px;
    left: 20px;
    font-size: 13px;
    padding: 8px 16px;
}

/* موبایل */



/* ═══ MOBILE PLAYER FIX ═══ */
@media (max-width: 640px) {
    /* مخفی کردن دکمه‌های کم‌مصرف در موبایل برای خلوت شدن */
    

    /* تنظیم نوار پایین */
    .bp-controls {
        padding: 30px 8px 8px !important;
    }

    /* دکمه‌ها */
    .bp-buttons {
        gap: 2px !important;
    }

    .bp-btn {
        padding: 5px !important;
    }
    .bp-btn svg {
        width: 20px !important;
        height: 20px !important;
    }

    /* زمان */
    .bp-time {
        font-size: 11px !important;
        margin: 0 4px !important;
    }

    /* نوار پیشرفت */
    .bp-progress {
        height: 5px !important;
        margin-bottom: 8px !important;
    }
}

/* رفع به‌هم‌ریختگی در دسکتاپ */
.bp-buttons {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.bp-time {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}


/* ═══ Mobile: 10s buttons in overlay, mute in bar ═══ */
@media (max-width: 640px) {
    .bp-wrapper .bp-back,
    .bp-wrapper .bp-forward {
        display: none !important;
    }
    .bp-wrapper .bp-mute {
        display: flex !important;
    }
}


/* آیکون وسط ناحیه */







/* چرخش فلش‌ها به سمت درست */
 /* فلش به چپ */
 /* فلش به راست */

/* مخفی کردن در دسکتاپ (چون دکمه‌های ۱۰ ثانیه در نوار پایین هستن) */
@media (min-width: 641px) {
    
}

/* موبایل */
@media (max-width: 640px) {
    
    
    
    
    
    
}


/* مخفی در دسکتاپ */
@media (min-width: 641px) {
    .bp-tap-zone { display: none !important; }
}

/* موبایل — حتی کوچیک‌تر */
@media (max-width: 640px) {
    .bp-tap-zone {
        width: 60px;
        height: 60px;
    }
    .bp-tap-indicator {
        font-size: 8px;
    }
    .bp-tap-indicator svg {
        width: 14px;
        height: 14px;
    }
    .bp-tap-zone-left { left: 10%; }
    .bp-tap-zone-right { right: 10%; }
}


/* ═══ Tap Zones — Always Visible, Semi-Transparent ═══ */
.bp-tap-zone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    z-index: 6;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.bp-tap-zone-left { left: 15%; }
.bp-tap-zone-right { right: 15%; }

.bp-tap-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #fff;
    opacity: 0.4; /* شفاف ولی دیده می‌شه */
    transform: scale(0.9);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0,0,0,0.9);
    font-family: Tahoma, Arial;
    font-size: 9px;
    font-weight: 800;
    direction: ltr;
}
.bp-tap-indicator svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.9));
}

/* وقتی کلیک شد یا هاور شد، کامل واضح بشه */
.bp-tap-zone:active .bp-tap-indicator,
.bp-tap-zone:hover .bp-tap-indicator {
    opacity: 1;
    transform: scale(1.1);
}
.bp-tap-indicator.bp-show {
    opacity: 1;
    transform: scale(1.2);
    animation: bpTapPulse 0.6s ease-out;
}
@keyframes bpTapPulse {
    0% { transform: scale(0.9); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* مخفی در دسکتاپ */
@media (min-width: 641px) {
    .bp-tap-zone { display: none !important; }
}

/* موبایل — کوچیک‌تر و شفاف */
@media (max-width: 640px) {
    .bp-tap-zone {
        width: 60px;
        height: 60px;
    }
    .bp-tap-indicator {
        font-size: 8px;
        opacity: 0.35;
    }
    .bp-tap-indicator svg {
        width: 14px;
        height: 14px;
    }
    .bp-tap-zone-left { left: 10%; }
    .bp-tap-zone-right { right: 10%; }
}

/* وقتی کنترل‌ها مخفی هستن (bp-idle)، آیکون‌ها هم کم‌رنگ‌تر */
.bp-wrapper.bp-idle .bp-tap-indicator {
    opacity: 0.15;
}
/* ولی وقتی کنترل‌ها نمایش داده می‌شن، آیکون‌ها واضح‌تر */
.bp-wrapper:not(.bp-idle) .bp-tap-indicator {
    opacity: 0.5;
}

@media (max-width: 768px) {
  
}

/* ═══════════════════════════════════════════ */
/* واتر مارک انیمیشنی در ۱۰ ثانیه آخر */
/* ═══════════════════════════════════════════ */
.bp-watermark

@media (max-width: 768px) {
  .bp-watermark
}

.bp-watermark

@media (max-width: 768px) {
  .bp-watermark
}

.bp-watermark

@media (max-width: 768px) {
  .bp-watermark
}

/* ════════════════════════════════════════════════ */
/*     واترمارک مدرن — ۲۰ ثانیه آخر                    */
/* ════════════════════════════════════════════════ */
.bp-watermark.bp-watermark-modern {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%);
  font-family: "Arial Black", "Segoe UI Black", "Helvetica Black", Tahoma, sans-serif !important;
  font-size: 3rem !important;
  font-weight: 900 !important;
  letter-spacing: 3px !important;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 45%, #1e40af 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: drop-shadow(0 0 8px rgba(96,165,250,.7)) drop-shadow(2px 2px 0 #000) drop-shadow(-2px -2px 0 #000) drop-shadow(2px -2px 0 #000) drop-shadow(-2px 2px 0 #000) !important;
  opacity: 0;
  z-index: 100 !important;
  pointer-events: none !important;
  white-space: nowrap;
  direction: ltr;
  text-align: center;
  transition: opacity .3s ease;
}

.bp-watermark.bp-watermark-modern.bp-show {
  opacity: 1;
  animation: bpWmFadeIn 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, bpWmPulse 2.5s ease-in-out 0.9s infinite;
}

.bp-watermark.bp-watermark-modern.bp-hide {
  opacity: 0;
  animation: bpWmFadeOut 0.6s ease forwards;
}

@keyframes bpWmFadeIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(2deg); }
  80%  { transform: translate(-50%, -50%) scale(0.95) rotate(-1deg); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

@keyframes bpWmPulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(96,165,250,.7)) drop-shadow(2px 2px 0 #000) drop-shadow(-2px -2px 0 #000) drop-shadow(2px -2px 0 #000) drop-shadow(-2px 2px 0 #000);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(96,165,250,1)) drop-shadow(0 0 35px rgba(59,130,246,.9)) drop-shadow(2px 2px 0 #000) drop-shadow(-2px -2px 0 #000) drop-shadow(2px -2px 0 #000) drop-shadow(-2px 2px 0 #000);
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes bpWmFadeOut {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.3); }
}

@media (max-width: 768px) {
  .bp-watermark.bp-watermark-modern {
    font-size: 0.55rem !important;
    letter-spacing: 0 !important;
    padding: 0 !important;
    /* حذف drop-shadow که باعث لوزی می‌شه */
    filter: drop-shadow(0 1px 0 #000) drop-shadow(0 -1px 0 #000) drop-shadow(1px 0 0 #000) drop-shadow(-1px 0 0 #000) !important;
  }
  .bp-watermark {
    font-size: 6px !important;
    top: 8px !important;
    left: 8px !important;
    padding: 0 4px !important;
  }
}

/* در موبایل در حالت تمام‌صفحه */
/* ═══ مخفی کردن کامل بخش کیفیت (موقت) ═══ */
.bp-settings [data-quality],
.bp-settings .bp-quality-list,
.bp-settings .bp-quality-item,
.bp-settings .bp-quality-label,
[data-action="quality"],
.bp-settings-item[data-quality] {
  display: none !important;
}

