

.ann-effect-wrap {
  position: relative;
  border-radius: 10px;
  padding: 2px;
  margin: 6px 1px 0px;
  isolation: isolate;
}

.ann-effect-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  z-index: 0;
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  padding: 2px;
}

.ann-effect-wrap > .uzr {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 8px;
  outline: none !important;
  border: none !important;
  margin: 0 !important;
}

@keyframes shimmer-sweep {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.ann-effect-wrap[data-ann-effect="shimmer"]::before {
  background: linear-gradient(
    90deg,
    #d4af37 0%, #d4af37 30%,
    #fff7cc 45%, #ffffff 50%, #fff7cc 55%,
    #d4af37 70%, #d4af37 100%
  );
  background-size: 200% 100%;
  animation: shimmer-sweep 2.5s ease-in-out infinite;
}

@keyframes gradient-flow {
  0%   { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}
.ann-effect-wrap[data-ann-effect="gradient-text"]::before {
  background: linear-gradient(
    90deg,
    #ff6fa5, #ffcf6f, #6fffd6, #8f8fff,
    #ff6fa5, #ffcf6f, #6fffd6, #8f8fff, #ff6fa5
  );
  background-size: 300% 100%;
  animation: gradient-flow 4s linear infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.3; box-shadow: 0 0 2px #ff6b35; }
  50%      { opacity: 1; box-shadow: 0 0 10px #ff6b35, 0 0 20px #ffa500; }
}
.ann-effect-wrap[data-ann-effect="glow-pulse"]::before {
  background: linear-gradient(90deg, #ff4500, #ff8c00, #ffd700, #ff4500);
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes aurora-wave {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
.ann-effect-wrap[data-ann-effect="aurora"]::before {
  background: linear-gradient(
    135deg,
    #7b00ff, #00d4ff, #00ff88, #ff00c8, #7b00ff
  );
  background-size: 400% 400%;
  animation: aurora-wave 6s ease infinite;
}

@keyframes glass-flash {
  0%   { background-position: -150% 0; opacity: 0.4; }
  50%  { opacity: 1; }
  100% { background-position: 250% 0; opacity: 0.4; }
}
.ann-effect-wrap[data-ann-effect="glass"]::before {
  background: linear-gradient(
    120deg,
    rgba(180,200,255,0.3) 0%, rgba(180,200,255,0.3) 35%,
    rgba(255,255,255,0.95) 45%, rgba(255,255,255,1) 50%, rgba(255,255,255,0.95) 55%,
    rgba(180,200,255,0.3) 65%, rgba(180,200,255,0.3) 100%
  );
  background-size: 200% 100%;
  animation: glass-flash 3s ease-in-out infinite;
}

@keyframes beam-rotate {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 100% 0%; }
  50%  { background-position: 100% 100%; }
  75%  { background-position: 0% 100%; }
  100% { background-position: 0% 0%; }
}
.ann-effect-wrap[data-ann-effect="border-beam"]::before {
  background: radial-gradient(circle at var(--bx, 0%) var(--by, 0%), #ffd700 0%, #ff6b35 20%, transparent 50%);
  background-size: 100% 100%;
  animation: beam-path 3s linear infinite;
}
@keyframes beam-path {
  0%   { background: radial-gradient(circle at 0% 50%, #ffd700 0%, #ff6b35 30%, transparent 60%); }
  25%  { background: radial-gradient(circle at 50% 0%, #ffd700 0%, #ff6b35 30%, transparent 60%); }
  50%  { background: radial-gradient(circle at 100% 50%, #ffd700 0%, #ff6b35 30%, transparent 60%); }
  75%  { background: radial-gradient(circle at 50% 100%, #ffd700 0%, #ff6b35 30%, transparent 60%); }
  100% { background: radial-gradient(circle at 0% 50%, #ffd700 0%, #ff6b35 30%, transparent 60%); }
}

@keyframes confetti-dance {
  0%   { background-position: 0% 0%, 25% 50%, 50% 25%, 75% 75%, 100% 0%; }
  50%  { background-position: 10% 50%, 35% 0%, 60% 75%, 85% 25%, 90% 50%; }
  100% { background-position: 0% 0%, 25% 50%, 50% 25%, 75% 75%, 100% 0%; }
}
.ann-effect-wrap[data-ann-effect="confetti"]::before {
  background:
    radial-gradient(circle 3px, #ff6b6b 100%, transparent 100%),
    radial-gradient(circle 2px, #ffd93d 100%, transparent 100%),
    radial-gradient(circle 3px, #6bcbff 100%, transparent 100%),
    radial-gradient(circle 2px, #c56bff 100%, transparent 100%),
    radial-gradient(circle 3px, #6bff9e 100%, transparent 100%);
  background-size: 8px 8px, 6px 6px, 8px 8px, 6px 6px, 8px 8px;
  background-repeat: repeat;
  animation: confetti-dance 2s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .ann-effect-wrap::before {
    animation: none !important;
    opacity: 1;
  }
}

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

@keyframes ludoPulse {
  0%, 100% { box-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 0 rgba(251,191,36,0.5); }
  50% { box-shadow: 0 1px 4px rgba(0,0,0,0.6), 0 0 0 4px rgba(251,191,36,0.15); }
}

/* وهج نابض قوي وواضح للقطع المسموح تحريكها في اللودو (بعد رمي النرد)
   لون سماوي/فيروزي بارز غير موجود في ألوان اللعبة حتى يكون واضحاً تماماً */
@keyframes ludoGlow {
  0%, 100% {
    box-shadow: 0 0 0 4px rgba(0,229,255,0.6), 0 0 14px 5px rgba(0,229,255,0.95), 0 3px 6px rgba(0,0,0,0.45);
    transform: scale(1.14);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(0,229,255,0.4), 0 0 24px 9px rgba(0,229,255,1), 0 3px 8px rgba(0,0,0,0.5);
    transform: scale(1.24);
  }
}

/* النرد القابل للرمي: نبض وهج سماوي يدل أنه قابل للنقر */
.ludo-dice-rollable {
  animation: ludoDicePulse 1.1s ease-in-out infinite;
}
@keyframes ludoDicePulse {
  0%, 100% { box-shadow: 0 6px 14px rgba(0,0,0,0.4), 0 0 0 0 rgba(0,229,255,0.55); transform: scale(1); }
  50% { box-shadow: 0 6px 14px rgba(0,0,0,0.4), 0 0 16px 5px rgba(0,229,255,0.85); transform: scale(1.06); }
}
/* لحظة الرمي: اهتزاز/دوران سريع */
.ludo-dice-rolling {
  animation: ludoDiceShake 0.5s ease-in-out;
}
@keyframes ludoDiceShake {
  0% { transform: rotate(0) scale(1); }
  25% { transform: rotate(-18deg) scale(1.12); }
  50% { transform: rotate(16deg) scale(1.12); }
  75% { transform: rotate(-10deg) scale(1.08); }
  100% { transform: rotate(0) scale(1); }
}

/* ═══════════════════════ الاستفتاء الحيّ (Poll) ═══════════════════════ */
/* تبويبات وضع الإعلان/الاستفتاء داخل نافذة الإرسال */
.ann-mode-tabs .ann-mode-tab {
  background: #eef1f5;
  color: #55607a;
  border: 1px solid #d7dce4;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.ann-mode-tabs .ann-mode-tab.on {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 3px 8px rgba(37, 99, 235, .35);
}

/* الاستفتاء: فقاعة بنفس شكل الإعلان، مع محتوى تصويت داخل .u-msg */
/* خلفية التصويت = نفس خلفية الإعلان (pmsgc) */
.pollmsgc { background-color: rgba(0, 77, 255, 0.08) !important; }
/* وسم "استفتاء" بجانب اسم صاحب الاستفتاء */
.poll-tag-badge {
  display: inline-block;
  margin-right: 5px;
  padding: 0 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #2563eb;
  background: rgba(37, 99, 235, .10);
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}
/* حاوية جسم الاستفتاء داخل الفقاعة */
.poll-body {
  width: 100%;
  padding-top: 2px;
}
/* مؤقّت الوقت المتبقّي — بجانب وسم الاستفتاء في صف الاسم */
.poll-card-timer {
  display: inline-block;
  margin-right: 5px;
  font-size: 10px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  padding: 1px 7px;
  border-radius: 999px;
  vertical-align: middle;
  white-space: nowrap;
}
.poll-card-timer:empty { display: none; }
.poll-card-q {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
  word-break: break-word;
}

.poll-card-opts {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.poll-opt-row {
  position: relative;
  border-radius: 8px;
  background: #eef2f7;
  border: 1.5px solid transparent;
  overflow: hidden;
  cursor: pointer;
  min-height: 30px;
  transition: border-color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.poll-opt-row:hover { border-color: #93c5fd; }
.poll-opt-row:active { transform: scale(.99); }
.poll-opt-row.ended { cursor: default; }
.poll-opt-row.ended:hover { border-color: transparent; }
/* شريط النسبة المتحرّك */
.poll-opt-fill {
  position: absolute;
  top: 0; right: 0; bottom: 0;   /* يبدأ من اليمين (RTL) */
  width: 0;
  background: linear-gradient(90deg, rgba(37, 99, 235, .18), rgba(37, 99, 235, .30));
  transition: width .5s cubic-bezier(.22, .85, .3, 1);
  z-index: 0;
}
.poll-opt-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
}
.poll-opt-text {
  font-size: 12px;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poll-opt-pct {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  flex-shrink: 0;
}
/* الخيار الذي صوّت له العضو */
.poll-opt-row.mine {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .18);
}
.poll-opt-row.mine .poll-opt-fill {
  background: linear-gradient(90deg, rgba(37, 99, 235, .30), rgba(37, 99, 235, .45));
}
.poll-opt-row.mine .poll-opt-text { color: #1d4ed8; }
/* الخيار الفائز عند انتهاء الاستفتاء */
.poll-opt-row.winner {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, .2);
}
.poll-opt-row.winner .poll-opt-fill {
  background: linear-gradient(90deg, rgba(22, 163, 74, .28), rgba(22, 163, 74, .45));
}
.poll-opt-row.winner .poll-opt-text { color: #15803d; }

.poll-card-total {
  margin-top: 7px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}
/* استفتاء أولوية (سوبر): لمسة ذهبية على الفقاعة */
.mm.pollmsgc.ppmsgc { outline-color: #fcd34d !important; }
.mm.pollmsgc.ppmsgc .poll-tag-badge {
  color: #b45309;
  background: rgba(251, 191, 36, .16);
}

/* ═══════════════ البث المباشر (Live Stream) ═══════════════ */
/* نقطة "مباشر" النابضة */
.lks-live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, .7);
  animation: lks-pulse 1.6s infinite;
  vertical-align: middle;
}
@keyframes lks-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); }
  70% { box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ─── مودال إعداد البث ─── */
.lks-setup-modal .modal-dialog { max-width: 720px; width: 94%; }
.lks-setup {
  background: linear-gradient(165deg, #1e293b, #0f172a);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 18px;
  color: #e2e8f0;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.lks-setup-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  font-size: 15px; font-weight: 800;
  background: rgba(255, 255, 255, .03);
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}
.lks-setup-head .lks-x {
  margin-right: auto;
  cursor: pointer; color: #94a3b8;
  width: 28px; height: 28px; line-height: 28px; text-align: center;
  border-radius: 8px; transition: background .15s, color .15s;
}
.lks-setup-head .lks-x:hover { background: rgba(239, 68, 68, .18); color: #fff; }

.lks-setup-body { display: flex; gap: 16px; padding: 16px 18px; }
.lks-col { flex: 1; min-width: 0; }
.lks-preview-col { flex: 1.05; display: flex; flex-direction: column; }

.lks-label {
  font-size: 12px; font-weight: 700; color: #94a3b8;
  margin: 12px 0 7px;
}
.lks-col > .lks-label:first-child { margin-top: 0; }

.lks-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.lks-opt {
  flex: 1; min-width: 92px;
  background: rgba(255, 255, 255, .035);
  border: 1.5px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
.lks-opt:hover { border-color: rgba(56, 189, 248, .55); }
.lks-opt:active { transform: scale(.98); }
.lks-opt.on {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, .12);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, .18) inset;
}
.lks-opt-ic { display: block; font-size: 22px; margin-bottom: 4px; }
.lks-opt b { display: block; font-size: 12.5px; color: #f1f5f9; }
.lks-opt small { display: block; font-size: 10px; color: #7c8aa0; margin-top: 2px; }

.lks-target, .lks-title {
  width: 100%;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  color: #f1f5f9 !important;
  border-radius: 10px;
  font-size: 13px;
}
.lks-mic-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; font-size: 13px; color: #cbd5e1; cursor: pointer;
}
.lks-mic-row input { width: 16px; height: 16px; }

/* ─── معاينة ─── */
.lks-preview-tag {
  align-self: flex-end;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: #22c55e;
  margin-bottom: 6px;
}
.lks-preview-tag .lks-live-dot { background: #22c55e; animation: none; }
.lks-preview-box {
  position: relative;
  flex: 1;
  min-height: 230px;
  background: #0b1220;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 14px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.lks-preview-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.lks-preview-empty { text-align: center; color: #64748b; padding: 20px; }
.lks-preview-empty b { display: block; font-size: 15px; color: #cbd5e1; margin-top: 8px; }
.lks-preview-empty small { display: block; font-size: 12px; margin-top: 4px; }
.lks-cam-ic { font-size: 40px; opacity: .85; }

/* ─── تذييل الأزرار ─── */
.lks-setup-foot {
  display: flex; gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  background: rgba(255, 255, 255, .02);
}
.lks-btn {
  border: none; border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .1s, filter .15s;
}
.lks-btn:active { transform: scale(.98); }
.lks-preview-btn { background: rgba(255, 255, 255, .08); color: #e2e8f0; }
.lks-preview-btn:hover { filter: brightness(1.15); }
.lks-go {
  margin-right: auto;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  color: #fff;
  box-shadow: 0 8px 22px rgba(244, 63, 94, .35);
}
.lks-go:hover { filter: brightness(1.08); }

/* ─── بطاقة البث في الحائط (فقاعة mykhal) ─── */
.lksmsgc { background-color: rgba(244, 63, 94, 0.07) !important; }
.lks-badge {
  display: inline-flex; align-items: center; gap: 5px;
  margin-right: 5px; padding: 1px 8px;
  font-size: 10.5px; font-weight: 800; color: #e11d48;
  background: rgba(225, 29, 72, .12);
  border-radius: 999px; vertical-align: middle; white-space: nowrap;
}
.lks-body { width: 100%; padding-top: 2px; }
.lks-card-title { font-size: 13px; font-weight: 800; color: #111827; margin-bottom: 6px; word-break: break-word; }
.lks-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lks-src { font-size: 11px; font-weight: 700; color: #475569; }
.lks-vcount { font-size: 11px; font-weight: 800; color: #64748b; }
.lks-vcount .fa { color: #94a3b8; }
.lks-watch-btn {
  width: 100%;
  border: none; border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px; font-weight: 800; cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  box-shadow: 0 5px 14px rgba(244, 63, 94, .3);
  transition: transform .1s, filter .15s;
}
.lks-watch-btn:hover { filter: brightness(1.08); }
.lks-watch-btn:active { transform: scale(.99); }

/* ─── عارض البث: نافذة عائمة قابلة للسحب (dock) ─── */
.lks-dock {
  position: fixed;
  z-index: 100001;
  width: 300px;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  color: #e2e8f0;
  overflow: hidden;
  user-select: none;
  transition: width .18s ease;
}
/* شريط العنوان (مقبض السحب) */
.lksd-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  cursor: move;
}
.lksd-ava {
  width: 30px; height: 30px; border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid rgba(255, 255, 255, .16); flex-shrink: 0;
}
.lksd-meta { min-width: 0; line-height: 1.2; margin-left: 2px; }
.lksd-name { font-size: 12.5px; font-weight: 800; color: #f1f5f9; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.lksd-sub { font-size: 10px; color: #f87171; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.lksd-q { color: #94a3b8; }
.lksd-count {
  margin-right: auto;
  font-size: 11.5px; font-weight: 800; color: #cbd5e1;
  background: rgba(255, 255, 255, .07); padding: 3px 9px; border-radius: 999px;
  white-space: nowrap;
}
.lksd-count .fa { color: #94a3b8; margin-left: 3px; }
.lksd-btn {
  width: 28px; height: 28px; line-height: 28px;
  text-align: center; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; cursor: pointer; color: #cbd5e1; flex-shrink: 0;
  background: rgba(255, 255, 255, .07);
  font-size: 14px; font-style: normal; direction: ltr;
  transition: background .15s, color .15s;
}
.lksd-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.lksd-close:hover { background: rgba(239, 68, 68, .3); color: #fff; }
/* مسرح الفيديو: مخفي في وضع الشريط، يظهر عند التوسّع */
.lksd-stage {
  position: relative;
  display: none;
  background: #000;
  cursor: pointer;
}
.lksd-video { width: 100%; display: block; background: #000; }
.lksd-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #64748b; font-size: 13px; text-align: center;
}
/* معاينة البثّار: نميّزها بلمسة خضراء (بثّك أنت) */
.lks-dock-host { border-color: rgba(34, 197, 94, .4); }
.lks-dock-host .lksd-sub { color: #22c55e; }
.lks-dock-host .lksd-sub .lks-live-dot { background: #22c55e; }
/* وضع مُصغّر (dock): شريط نظيف فقط بلا فيديو */
.lks-dock:not(.expanded) .lksd-stage { display: none; }
.lks-dock:not(.expanded) { width: auto; max-width: 320px; }
/* وضع موسّع: نافذة كبيرة */
.lks-dock.expanded {
  width: min(560px, 92vw);
}
.lks-dock.expanded .lksd-stage {
  display: block;
  min-height: 300px;
  cursor: default;
}
.lks-dock.expanded .lksd-video { max-height: 68vh; object-fit: contain; }

/* شاشات صغيرة: نُكدّس عمودَي الإعداد */
@media (max-width: 620px) {
  .lks-setup-body { flex-direction: column; }
  .lks-preview-box { min-height: 180px; }
  .lks-dock { width: 260px; }
}
