/* ==========================================================================
   ANIRATE SHAXSIY VIDEO PLAYER — SHAFFOF (GLASSMORPHISM) DIZAYN
   ========================================================================== */

/* 1. Teatr Sarlavhasi (Yuqori Asboblar Paneli) - Frosted Glass Bar */
.player-theater-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(20, 24, 36, 0.65) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: var(--radius-xl, 18px) var(--radius-xl, 18px) 0 0 !important;
  padding: 12px 20px !important;
  flex-wrap: wrap;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  transition: all 0.3s ease;
}

.player-source-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill, 9999px);
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.player-tab-btn:hover {
  background: rgba(229, 9, 20, 0.2);
  color: #ffffff;
  border-color: rgba(229, 9, 20, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.35);
}

.player-tab-btn.active {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.9), rgba(184, 29, 36, 0.9));
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.player-actions-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.player-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-pill, 9999px);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  outline: none;
}

.player-tool-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.player-tool-btn.active {
  background: rgba(229, 9, 20, 0.25);
  color: #ffffff;
  border-color: var(--primary, #E50914);
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.4);
}

/* 2. Video Teatr Ramkasi - Ambient Aura & Glass Frame */
.video-theater-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #08090d;
  border-radius: 0 0 var(--radius-xl, 18px) var(--radius-xl, 18px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: none;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.9), 0 0 40px -10px rgba(229, 9, 20, 0.25);
  margin-bottom: 16px;
  z-index: 10;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Teatr Keng Ekran Rejimi */
.player-page-grid.theater-active {
  grid-template-columns: 1fr !important;
}

.player-page-grid.theater-active .player-aside-area,
.player-page-grid.theater-active .player-sidebar-panel {
  display: none !important;
}

.player-page-grid.theater-active .video-theater-wrapper {
  aspect-ratio: 21/9;
  max-height: 80vh;
}

/* Chiroqni o'chirish rejimi */
body.theater-lights-off {
  background: #000000 !important;
}

body.theater-lights-off .animedia-sidebar,
body.theater-lights-off .animedia-topbar,
body.theater-lights-off .animedia-footer,
body.theater-lights-off .player-aside-area,
body.theater-lights-off .anime-detail-card,
body.theater-lights-off .player-episodes-section,
body.theater-lights-off .player-nav-bar,
body.theater-lights-off .comments-section {
  opacity: 0.05 !important;
  pointer-events: none !important;
  transition: opacity 0.35s ease;
}

/* ==========================================================================
   3. PLYR SHAFFOF (GLASSMORPHISM) SOZLAMALARI
   ========================================================================== */
.plyr {
  font-family: var(--font-main, 'Poppins', sans-serif) !important;
  --plyr-color-main: #E50914;
  --plyr-video-background: #000000;
  --plyr-video-control-color: #f1f5f9;
  --plyr-video-control-color-hover: #ffffff;
  --plyr-video-controls-background: transparent;
  --plyr-range-thumb-height: 14px;
  --plyr-range-track-height: 5px;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

.plyr video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Suzuvchi Shaffof Boshqaruv Paneli (Floating Glass Island) */
.plyr--video .plyr__controls {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  margin: 0 16px 14px 16px !important;
  padding: 10px 18px !important;
  background: rgba(14, 18, 28, 0.58) !important;
  backdrop-filter: blur(24px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(200%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 16px !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.22) !important;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  gap: 10px !important;
  z-index: 5 !important;
}

/* Standart qora gradient soyani olib tashlash - Sof shaffoflik uchun */
.plyr--video .plyr__controls::before {
  display: none !important;
}

/* Boshqaruv tugmalari yashirilgandagi animatsiya */
.plyr--hide-controls .plyr__controls {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(12px) scale(0.98) !important;
}

/* Boshqaruv paneli tugmachalari */
.plyr__controls .plyr__control {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  padding: 8px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.plyr__controls .plyr__control:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  transform: scale(1.08) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.plyr__controls .plyr__control:active {
  transform: scale(0.94) !important;
}

/* Markazdagi Katta Play Tugmasi - Shaffof Qizil Kristal */
.plyr__control--overlaid {
  width: 78px !important;
  height: 78px !important;
  border-radius: 50% !important;
  background: rgba(229, 9, 20, 0.75) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 2px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: 0 8px 35px rgba(229, 9, 20, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5) !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s, box-shadow 0.25s !important;
}

.plyr__control--overlaid:hover {
  background: rgba(244, 6, 18, 0.92) !important;
  transform: translate(-50%, -50%) scale(1.15) !important;
  box-shadow: 0 0 50px rgba(229, 9, 20, 0.85), inset 0 1px 3px rgba(255, 255, 255, 0.6) !important;
}

.plyr__control--overlaid svg {
  width: 26px !important;
  height: 26px !important;
  fill: #ffffff !important;
  margin-left: 4px !important;
}

/* Vaqt Chizig'i (Progress Bar) */
.plyr__progress__container {
  flex: 1 1 auto !important;
  position: relative !important;
}

.plyr__progress input[type="range"] {
  border-radius: 6px !important;
  cursor: pointer !important;
}

.plyr__progress__buffer {
  background: rgba(255, 255, 255, 0.22) !important;
  border-radius: 6px !important;
}

.plyr--full-ui input[type="range"] {
  color: #E50914 !important;
}

.plyr--full-ui input[type="range"]::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.16) !important;
  border-radius: 6px !important;
  height: 6px !important;
  transition: height 0.2s ease !important;
}

.plyr--full-ui input[type="range"]::-webkit-slider-thumb {
  background: #ffffff !important;
  box-shadow: 0 0 12px rgba(229, 9, 20, 0.9), 0 0 0 3px #E50914 !important;
  border: none !important;
  width: 14px !important;
  height: 14px !important;
  transition: transform 0.2s ease !important;
}

.plyr--full-ui input[type="range"]:hover::-webkit-slider-runnable-track {
  height: 8px !important;
}

.plyr--full-ui input[type="range"]:hover::-webkit-slider-thumb {
  transform: scale(1.2) !important;
}

/* Vaqt Ko'rsatkichlari */
.plyr__time {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.88) !important;
  letter-spacing: 0.3px !important;
  padding: 0 4px !important;
}

/* Shaffof Qalqiq Oyna (Tooltip) */
.plyr__tooltip {
  background: rgba(14, 18, 28, 0.85) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
}

/* Sozlamalar Menyusi - Shaffof Pop-up */
.plyr__menu__container {
  background: rgba(14, 18, 28, 0.82) !important;
  backdrop-filter: blur(25px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  padding: 8px !important;
}

.plyr__menu__container [role="menuitem"],
.plyr__menu__container [role="menuitemradio"] {
  border-radius: 10px !important;
  padding: 8px 12px !important;
  color: #e2e8f0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

.plyr__menu__container [role="menuitem"]:hover,
.plyr__menu__container [role="menuitemradio"]:hover,
.plyr__menu__container [role="menuitem"][aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.plyr__menu__container [role="menuitemradio"][aria-checked="true"]::before {
  background: #E50914 !important;
}

/* Ovoz Sozlagichi */
.plyr__volume {
  max-width: 90px !important;
}

/* ==========================================================================
   4. KEYINGI QISM AVTO-START SHAFFOF QALQIY OYNA
   ========================================================================== */
.player-next-ep-glass {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  animation: fadeIn 0.3s ease;
}

.player-next-ep-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 28px 36px;
  text-align: center;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 380px;
  width: 90%;
}

.player-next-ep-card .next-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #E50914;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.player-next-ep-card .next-title {
  font-family: var(--font-title, sans-serif);
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 16px;
}

.next-countdown-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.next-countdown-svg {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
}

.next-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 4;
}

.next-circle-progress {
  fill: none;
  stroke: #E50914;
  stroke-width: 4;
  stroke-dasharray: 163.36;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.next-countdown-num {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  z-index: 1;
}

.next-btn-group {
  display: flex;
  gap: 12px;
  width: 100%;
}

.next-btn-go {
  flex: 1;
  background: linear-gradient(135deg, #E50914, #b81d24);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
  transition: all 0.2s ease;
}

.next-btn-go:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

.next-btn-dismiss {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.next-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* ==========================================================================
   5. OLDINGI / KEYINGI QISM SHAFFOF TUGMALARI
   ========================================================================== */
.glass-ep-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  margin-bottom: 24px;
  gap: 12px;
}

.glass-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.glass-nav-btn.primary {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.85), rgba(184, 29, 36, 0.85));
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px rgba(229, 9, 20, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.glass-nav-btn.primary:hover {
  background: linear-gradient(135deg, #E50914, #cf1620);
  box-shadow: 0 8px 25px rgba(229, 9, 20, 0.6);
}

/* ==========================================================================
   6. RESPONSIVE MOSLASHUVLAR
   ========================================================================== */
@media (max-width: 768px) {
  .player-theater-header {
    padding: 10px 14px !important;
    gap: 8px !important;
    border-radius: var(--radius-lg, 14px) var(--radius-lg, 14px) 0 0 !important;
  }
  .player-tab-btn, .player-tool-btn {
    padding: 6px 12px !important;
    font-size: 11.5px !important;
  }
  .video-theater-wrapper {
    border-radius: 0 0 var(--radius-lg, 14px) var(--radius-lg, 14px) !important;
    margin-bottom: 12px;
  }
  .plyr--video .plyr__controls {
    margin: 0 8px 8px 8px !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    gap: 6px !important;
  }
  .plyr__control--overlaid {
    width: 62px !important;
    height: 62px !important;
  }
  .plyr__control--overlaid svg {
    width: 20px !important;
    height: 20px !important;
  }
  .plyr__controls .plyr__control {
    padding: 6px !important;
  }
  .plyr__volume {
    display: none !important;
  }
  .glass-ep-nav-bar {
    flex-direction: column;
    gap: 8px;
  }
  .glass-nav-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .player-tool-btn span {
    display: none;
  }
  .player-tool-btn {
    padding: 6px 10px !important;
  }
}

/* ==========================================================================
   7. 10 SEKUNDLIK 2X-TAP / 2X-CLICK RIPPLE EFFEKTLARI
   ========================================================================== */
.seek-ripple-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 18;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.seek-ripple-overlay.left {
  left: 0;
  border-radius: 0 120px 120px 0;
  background: radial-gradient(circle at left center, rgba(229, 9, 20, 0.28) 0%, rgba(229, 9, 20, 0) 72%);
}

.seek-ripple-overlay.right {
  right: 0;
  border-radius: 120px 0 0 120px;
  background: radial-gradient(circle at right center, rgba(229, 9, 20, 0.28) 0%, rgba(229, 9, 20, 0) 72%);
}

.seek-ripple-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(14, 18, 28, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.65), 0 0 30px rgba(229, 9, 20, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transform: scale(0.65);
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seek-ripple-badge i {
  font-size: 22px;
  color: #ffffff;
}

.seek-ripple-badge span {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.6px;
}

.seek-ripple-overlay.active {
  opacity: 1;
}

.seek-ripple-overlay.active .seek-ripple-badge {
  transform: scale(1.1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

