

.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);
}

/* بطاقة الاستفتاء في الحائط */
.poll-card {
  position: relative;
  margin: 8px 6px;
  padding: 12px 13px;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff, #f3f6fb);
  border: 1px solid #dbe2ec;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
  overflow: hidden;
}
.poll-card.pp {
  background: linear-gradient(160deg, #fff7ed, #fef3c7);
  border-color: #fcd34d;
}
.poll-card.ended { opacity: .97; }

.poll-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}
.poll-card-ava {
  width: 34px; height: 34px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  flex-shrink: 0;
}
.poll-card-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
}
.poll-card-owner {
  font-weight: 800;
  font-size: 13px;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poll-card-tag {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
}
.poll-card-timer {
  font-size: 11.5px;
  font-weight: 800;
  color: #dc2626;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.poll-card-q {
  font-size: 14.5px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 10px;
  word-break: break-word;
}

.poll-card-opts {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.poll-opt-row {
  position: relative;
  border-radius: 10px;
  background: #eef2f7;
  border: 1.5px solid transparent;
  overflow: hidden;
  cursor: pointer;
  min-height: 38px;
  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: 9px 12px;
}
.poll-opt-text {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poll-opt-pct {
  font-size: 12px;
  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: 9px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-align: center;
}
