:root {
  --color-ink-950: #000000;
  --color-ink-900: #0c0c0d;
  --color-ink-800: #0f0f23;
  --color-ink-700: #1e1b4b;
  --color-ink-600: #181818;
  --color-line: #312e81;
  --color-rose: #e11d48;
  --color-danger: #ef4444;
  --color-paper: #f8fafc;
  --color-mute: #94a3b8;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --z-player: 1;
  --z-tabs: 20;
  --z-overlay: 30;
  --z-banner: 40;
  --z-telegram: 80;
  --z-share: 200;
  --player-primary: var(--color-ink-800);
  --player-accent: var(--color-rose);
  --plyr-color-main: var(--player-accent);
  --font: "Noto Sans Arabic", Tahoma, sans-serif;
}

html, body {
  margin: 0;
  background: var(--color-ink-950);
  color: var(--color-paper);
  font-family: var(--font);
}

* { text-decoration: none; box-sizing: border-box; }

.albaplayer_name {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-2);
  list-style: none;
  background: var(--color-ink-950);
  position: relative;
  z-index: var(--z-tabs);
}

.albaplayer_name li {
  flex: 1;
  min-width: 0;
}

.albaplayer_name a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  background: var(--player-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background 200ms ease;
}

.albaplayer_name a:hover,
.albaplayer_name a.active {
  background: var(--player-accent);
}

.albaplayer_server-body {
  position: relative;
  width: 100%;
  background: var(--color-ink-950);
  height: calc(100vh - 60px);
  overflow: hidden;
}

.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.albaplayer_server-body.is-single {
  height: 100vh;
}

.albaplayer_server-body:fullscreen,
.albaplayer_server-body:-webkit-full-screen,
.albaplayer_server-body.is-fs {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 2147482000;
  background: #000;
  overflow: hidden;
}

.albaplayer_server-body:fullscreen .albaplayer-tg,
.albaplayer_server-body.is-fs .albaplayer-tg,
.albaplayer_server-body:fullscreen .albaplayer_videos_channel,
.albaplayer_server-body.is-fs .albaplayer_videos_channel,
.albaplayer_server-body:fullscreen .albaplayer_site_name,
.albaplayer_server-body:-webkit-full-screen .albaplayer_site_name,
.albaplayer_server-body.is-fs .albaplayer_site_name {
  visibility: visible !important;
  opacity: 1 !important;
}

.albaplayer_server-body:fullscreen .albaplayer_videos_channel,
.albaplayer_server-body.is-fs .albaplayer_videos_channel {
  display: flex;
}

.embed-responsive {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: var(--z-player);
}

.embed-responsive iframe,
.embed-responsive video,
#player,
[data-player] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 0;
}

#alba-mount.alba-click-lock {
  --alba-hole-top: 8px;
  --alba-hole-left: 8px;
  --alba-hole-w: 220px;
  --alba-hole-h: 44px;
}

.alba-click-lock-ui {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.alba-click-lock-ui > i {
  position: absolute;
  pointer-events: auto;
}

.alba-lock-t {
  top: 0;
  left: 0;
  right: 0;
  height: var(--alba-hole-top);
}

.alba-lock-b {
  top: calc(var(--alba-hole-top) + var(--alba-hole-h));
  left: 0;
  right: 0;
  bottom: 0;
}

.alba-lock-l {
  top: var(--alba-hole-top);
  left: 0;
  width: var(--alba-hole-left);
  height: var(--alba-hole-h);
}

.alba-lock-r {
  top: var(--alba-hole-top);
  left: calc(var(--alba-hole-left) + var(--alba-hole-w));
  right: 0;
  height: var(--alba-hole-h);
}

.albaplayer-fs-btn {
  display: none;
}

.albaplayer_server-body.alba-ext-fs .albaplayer-fs-btn {
  display: inline-flex;
}

.plyr--full-ui,
.plyr video { height: 100% !important; }

.albaplayer-share-mask {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 64px;
  height: 48px;
  background: #000;
  border-radius: 8px;
  pointer-events: auto;
  z-index: 2147483000;
}

.albaplayer-fs-mask {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58px;
  height: 54px;
  background: transparent;
  pointer-events: auto;
  z-index: 2147483000;
}

.albaplayer_server-body:fullscreen .albaplayer-share-mask,
.albaplayer_server-body:-webkit-full-screen .albaplayer-share-mask,
.albaplayer_server-body:fullscreen .albaplayer-fs-mask,
.albaplayer_server-body:-webkit-full-screen .albaplayer-fs-mask,
.albaplayer_server-body.is-fs .albaplayer-share-mask,
.albaplayer_server-body.is-fs .albaplayer-fs-mask {
  display: block;
  visibility: visible;
}

.albaplayer_videos_channel {
  position: absolute;
  z-index: 50;
  top: auto;
  bottom: 10px;
  left: 8px;
  right: auto;
  width: auto;
  max-width: calc(50% - 24px);
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transform: translateZ(0);
}

.albaplayer_videos_channel > * { pointer-events: none; }

.albaplayer-chrome-start,
.albaplayer-chrome-end {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.albaplayer-chrome-start > *,
.albaplayer-chrome-end > * {
  pointer-events: auto;
}

.albaplayer-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  background: #dc2626;
  color: #fff;
  font: 700 12px var(--font);
  border-radius: 999px;
}

.albaplayer-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  animation: alba-live-pulse 1.2s ease-out infinite;
}

.albaplayer-live-count {
  opacity: 0.95;
  font-variant-numeric: tabular-nums;
}

@keyframes alba-live-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.albaplayer-share-btn,
.albaplayer_videos_channel .button,
.albaplayer-brand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  background: var(--player-accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: 700 13px var(--font);
  transition: filter 200ms ease;
}

.albaplayer-share-btn:hover,
.albaplayer_videos_channel .button:hover,
.albaplayer-brand-btn:hover {
  filter: brightness(1.08);
}

.albaplayer_site_name {
  position: absolute;
  z-index: 40;
  text-align: center;
  pointer-events: none;
  padding: 0;
  margin: 0;
  background: transparent;
  box-sizing: border-box;
  transform: translateZ(0);
}

.albaplayer_site_name a,
.albaplayer_site_name span {
  pointer-events: auto;
  font-size: inherit;
  font-weight: 700;
  line-height: 1.35;
  padding: 0;
  text-shadow: 0 1px 2px #000, 0 0 4px #000, 0 0 8px rgba(0, 0, 0, 0.85);
}

.albaplayer_site_name a:hover,
.albaplayer_site_name a:focus,
.albaplayer_site_name span:hover {
  text-decoration: none;
  opacity: 0.92;
}

.albaplayer_site_name.is-button a,
.albaplayer_site_name.is-button span {
  display: inline-flex;
  min-height: 34px;
  padding: 0 14px;
  font-size: inherit;
  text-shadow: none;
  box-sizing: border-box;
  border-radius: 999px;
}

.albaplayer_site_name.is-button a:hover,
.albaplayer_site_name.is-button span:hover {
  opacity: 0.92;
}

.albaplayer-share-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  pointer-events: none;
  transform: translateZ(0);
}

.albaplayer-share-modal.is-open {
  display: flex !important;
  pointer-events: auto;
}

.albaplayer-share-box {
  position: relative;
  width: min(520px, 92%);
  background: #1e1b4b;
  border: 0;
  padding: 28px 24px 24px;
}

.albaplayer-share-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 22px;
}

.albaplayer_share_title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: start;
  margin-bottom: 8px;
}

.albaplayer-share-help {
  color: #94a3b8;
  font-size: 13px;
  margin: 0 0 12px;
}

.albaplayer-share-box textarea {
  width: 100%;
  height: 96px;
  direction: ltr;
  text-align: left;
  background: #0f172a;
  color: #e2e8f0;
  border: 0;
  padding: 12px;
  font: 13px var(--font);
}

.albaplayer-share-url {
  color: #94a3b8;
  font-size: 12px;
  direction: ltr;
  text-align: left;
  word-break: break-all;
  margin: 0 0 10px;
}

.albaplayer-share-copy {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  background: #22c55e;
  color: #052e16;
  border: 0;
  padding: 12px 20px;
  cursor: pointer;
  font: 700 14px var(--font);
}

#fixedban {
  position: absolute;
  z-index: var(--z-banner);
  left: 50%;
  right: auto;
  bottom: 22%;
  transform: translateX(-50%);
  width: min(336px, 92%);
  max-height: 120px;
  overflow: hidden;
  background: transparent;
  border: 0;
  text-align: center;
  pointer-events: auto;
}

#close-fixedban,
.albaplayer-close {
  position: absolute;
  top: -10px;
  right: -6px;
  width: 28px;
  height: 28px;
  border: 0;
  background: #e11d48;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.albaplayer-tg {
  position: absolute;
  z-index: 60;
  bottom: 70px;
  top: auto;
  right: 16px;
  left: auto;
  direction: rtl;
  pointer-events: auto;
  transform: translateZ(0);
  overflow: hidden;
}

.albaplayer-tg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #141414;
  border: 1px solid #c9a227;
  border-radius: 16px;
  padding: 18px 16px 16px;
  color: #fff;
  text-align: right;
  box-sizing: border-box;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.albaplayer-tg-close {
  position: absolute;
  top: 8px;
  left: 8px;
  right: auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
  z-index: 6;
  line-height: 28px;
  text-align: center;
  font-size: 18px;
  pointer-events: auto;
}

.albaplayer-tg-plane {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

.albaplayer-tg-photo {
  width: 100%;
  height: var(--alba-tg-img-h, 96px);
  max-height: var(--alba-tg-img-h, 96px);
  object-fit: cover;
  object-position: center;
  flex: 0 0 var(--alba-tg-img-h, 96px);
  margin-bottom: 10px;
  border-radius: 10px;
  display: block;
}

.albaplayer-tg-badge {
  display: inline-block;
  background: #eab308;
  color: #111;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 8px;
  border-radius: 999px;
}

.albaplayer-tg-card h3 {
  margin: 8px 36px 8px 36px;
  font-size: 16px;
}

.albaplayer-tg-card p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #d1d5db;
  line-height: 1.6;
  overflow: hidden;
  min-height: 0;
}

.albaplayer-tg-card .albaplayer-tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  flex-shrink: 0;
  background: #2563eb;
  color: #fff;
  font: 700 14px var(--font);
  cursor: pointer;
  border-radius: 10px;
}

.albaplayer-tg-card .albaplayer-tg-btn:hover {
  background: #1d4ed8;
}

@media (max-width: 640px) {
  .albaplayer_name a { min-height: 36px; font-size: 12px; }
  .albaplayer_site_name,
  .albaplayer-tg {
    bottom: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .albaplayer-live-dot { animation: none; }
}
