/* ============================================================
   player.css — پەقەت قويغۇچ بېتى (?p=play) دىلا يۈكلىنىدۇ
   باشقا بەتلەرگە ھېچقانداق تەسىرى يوق.
   ئۆز ئىچىگە ئالىدۇ: تولۇق كونترول بالدىقى (ئاۋاز كۇنۇپكىسى باسقاندا ئېچىلىدۇ)،
   تېلېۋىزورغا ئۇلاش، كۆپ بۆلۈملۈك فىلىمنى ئاپتوماتىك ئۇلاپ قويۇش،
   «تەۋسىيە» توختىماي ئايلىنىدىغان كىچىك مۇقاۋا رامكىسى.
   ============================================================ */

/* ---------- سەھنە / ھالەت (site.css دىكى ئورۇننى توغرىلاش) ---------- */
.player-stage { overflow: hidden; }
.player-stage .player-status { bottom: 14px; inset-inline-start: 12px; }

/* ---------- كونترول بالدىقى ---------- */
.player-bar {
  background: #0d1119;
  color: #eef1f6;
  border-top: 1px solid rgba(255, 255, 255, .09);
  padding: 10px 14px 12px;
  direction: rtl;
}
.pb-seek { display: flex; align-items: center; gap: 10px; direction: ltr; }
.pb-time {
  flex: none; min-width: 44px; text-align: center;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #98a2b3; direction: ltr; font-variant-numeric: tabular-nums;
}
.pb-range {
  -webkit-appearance: none; appearance: none;
  flex: 1 1 auto; height: 6px; margin: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--pb, 0%), rgba(255, 255, 255, .2) var(--pb, 0%));
  outline: none; cursor: pointer; direction: ltr;
}
.pb-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent);
  cursor: pointer;
}
.pb-range::-moz-range-thumb {
  width: 13px; height: 13px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px rgba(207, 51, 43, .55); cursor: pointer;
}

.pb-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 34px; height: 34px; padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .13); border-radius: 10px;
  background: rgba(255, 255, 255, .06); color: #eef1f6;
  font-family: inherit; font-size: 12px; line-height: 1; cursor: pointer;
  transition: background .18s, border-color .18s, transform .12s;
}
.pb-btn:hover { background: rgba(255, 255, 255, .15); border-color: var(--accent); }
.pb-btn:active { transform: scale(.94); }
.pb-btn:disabled { opacity: .32; cursor: not-allowed; }
.pb-btn svg { width: 17px; height: 17px; display: block; flex: none; }
.pb-btn i { font-style: normal; font-size: 9px; font-weight: 700; opacity: .85; }
.pb-btn.is-primary {
  background: var(--accent); border-color: transparent; color: #fff;
  min-width: 42px; height: 38px;
}
.pb-btn.is-primary:hover { background: var(--accent-2); }
.pb-btn.is-on { background: color-mix(in srgb, var(--accent) 24%, transparent); border-color: var(--accent); }
.pb-sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .15); margin-inline: 4px; flex: none; }
.pb-vol { width: 78px; flex: none; }
/* ئاۋاز يۇقىرى-تۆۋەن كۇنۇپكىسى ئادەتتە يوشۇرۇن، ئاۋاز سىنبەلگىسىنى باسقاندا ئېچىلىدۇ */
.pb-volume { position: relative; display: inline-flex; flex: none; }
.pb-vol-pop {
  position: absolute; bottom: calc(100% + 11px); left: 0; z-index: 14;
  display: flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 9px 11px; border-radius: 12px;
  background: #171d28; border: 1px solid rgba(255, 255, 255, .17);
  box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .85);
}
.pb-vol-pop[hidden] { display: none; }
.pb-vol-pop .pb-btn { min-width: 32px; height: 32px; padding: 0 7px; }
.pb-vol-pop .pb-vol { width: 100px; }
.pb-vol-num {
  min-width: 36px; text-align: center; direction: ltr;
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #c8cfda; font-variant-numeric: tabular-nums;
}
.pb-rate { min-width: 46px; font-variant-numeric: tabular-nums; font-weight: 700; direction: ltr; }
.pb-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: #c8cfda; cursor: pointer; white-space: nowrap; }
.pb-auto input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }
.pb-count {
  font-size: 11px; color: #98a2b3; direction: ltr;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pb-hint { margin-inline-start: auto; font-size: 11px; color: #818b9b; }

/* ---------- كېيىنكى بۆلۈم (ئاپتوماتىك ئۇلاش) ---------- */
.next-overlay {
  position: absolute; inset: 0; z-index: 7;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 6, 11, .74); backdrop-filter: blur(7px); padding: 16px;
}
.no-card {
  width: min(340px, 100%); text-align: center; color: #fff;
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 16px;
  background: rgba(20, 24, 33, .94); padding: 20px 18px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
}
.no-label { display: block; font-size: 11px; letter-spacing: .04em; color: #ff9082; margin-bottom: 6px; }
.no-card b { display: block; font-size: 19px; margin-bottom: 8px; }
.no-card p { font-size: 12.5px; color: #c3cad6; margin: 0 0 14px; }
.no-count { color: #fff; font-weight: 700; font-size: 15px; }
.no-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
/* قاراڭغۇ كارتا ئۈستىدە «ئەمەلدىن قالدۇرۇش» كۇنۇپكىسى كۆرۈنۈپ تۇرسۇن */
.no-actions .btn-ghost {
  color: #eef1f6; border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .07);
}
.no-actions .btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); }

/* ---------- تېلېۋىزورغا ئۇلاش تاختىسى ---------- */
.cast-panel {
  padding: 16px 18px; background: var(--surface); color: var(--text);
  border-top: 1px solid var(--border);
}
.cast-panel h3 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.cast-panel h3 svg { width: 18px; height: 18px; color: var(--accent); }
#castMsg { font-size: 12.5px; color: var(--text); margin: 0 0 8px; }
.cast-tips { font-size: 12px; color: var(--dim); line-height: 1.9; margin: 0 0 12px; }
.cast-tips b { color: var(--text); }
.cast-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cast-actions .btn { text-decoration: none; }

/* ---------- «تەۋسىيە» — كىچىك، توختىماي ئايلىنىدىغان مۇقاۋا رامكىسى ---------- */
.play-reco { position: relative; overflow: hidden; padding: 14px 16px 12px; margin-bottom: 20px; }
.reco-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.reco-head .panel-title { margin: 0; font-size: 15px; }
.reco-head .panel-title small { font-size: 11.5px; }
.reco-nav { margin-inline-start: auto; display: flex; gap: 6px; }
.reco-nav button {
  width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: 15px; line-height: 1; cursor: pointer;
  transition: border-color .18s, color .18s, background .18s;
}
.reco-nav button:hover { border-color: var(--accent); color: var(--accent); }
.reco-nav button.is-on { border-color: var(--accent); color: #fff; background: var(--accent); }

.reco-viewport {
  overflow: hidden; direction: ltr; width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}
.reco-track {
  display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px;
  width: max-content; direction: ltr;
  will-change: transform;
}
.reco-item {
  flex: none; width: 88px; display: flex; flex-direction: column; gap: 6px;
  color: var(--text); text-decoration: none; outline: none;
}
.reco-img {
  display: block; width: 88px; height: 124px; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.reco-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.reco-item:hover .reco-img, .reco-item:focus-visible .reco-img {
  border-color: var(--accent); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  transform: translateY(-2px);
}
.reco-item:hover .reco-img img, .reco-item:focus-visible .reco-img img { transform: scale(1.07); }
.reco-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 31px; max-height: 31px;
  font-size: 11.5px; line-height: 1.35; font-weight: 600;
  text-align: center; direction: rtl; unicode-bidi: isolate; word-break: break-word;
}
.reco-item:hover .reco-name { color: var(--accent); }

.reco-dots { display: flex; gap: 5px; justify-content: center; margin-top: 9px; }
.reco-dot {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px;
  background: var(--border); cursor: pointer; transition: width .25s, background .25s;
}
.reco-dot.is-on { width: 17px; background: var(--accent); }

/* ---------- تار ئېكران ---------- */
@media (max-width: 760px) {
  .player-stage .player-status { bottom: 10px; font-size: 11px; }
  .player-bar { padding: 9px 10px 11px; }
  .pb-btn { min-width: 32px; height: 32px; padding: 0 7px; }
  .pb-btn.is-primary { min-width: 38px; height: 34px; }
  .pb-hint { display: none; }
  .pb-sep { margin-inline: 1px; }
  .pb-vol-pop { left: auto; right: 0; padding: 8px 9px; gap: 7px; }
  .pb-vol-pop .pb-vol { width: 84px; }
  .play-reco { padding: 12px 12px 10px; }
  .reco-head .panel-title { font-size: 14px; }
  .reco-nav button { width: 25px; height: 25px; font-size: 14px; }
  .reco-track { gap: 8px; }
  .reco-item { width: 74px; gap: 5px; }
  .reco-img { width: 74px; height: 104px; border-radius: 9px; }
  .reco-name { font-size: 10.5px; min-height: 28px; max-height: 28px; }
}
