/* ═══════════ مسرح المؤثرات فوق الفيديو ═══════════ */
#lfxStage {
    position: absolute;
    pointer-events: none;
    overflow: visible; /* Gift banners may extend over neighbouring cards. */
    border-radius: 8px;
    z-index: 110;
    container-type: inline-size;
}
#lfxStage > * { pointer-events: none; }
#lfxStage .bt-score[data-financial-lock] { pointer-events: auto; cursor: pointer; }

/* هالة الجولة: وهج قرمزي من اليسار وأزرق من اليمين حول البث */
#lfxStage.lfx-battle::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 7px 0 22px -8px rgba(255, 45, 111, .95), inset -7px 0 22px -8px rgba(41, 160, 246, .95);
    animation: lfxHalo 2.6s ease-in-out infinite;
    z-index: 1;
}
@keyframes lfxHalo { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ═══════════ شريط الجولة ═══════════ */
.bt {
    --bt-h: 20px;
    --bt-font: 13px;
    position: absolute;
    left: 0;
    right: 0;
    top: 3px; /* مثبت أعلى البث كما في تيك توك */
    z-index: 5;
    padding: 0 3px;
    direction: ltr;
    font-family: system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
    transition: opacity .35s ease, transform .35s ease;
}
.bt.on-video { --bt-h: clamp(15px, 7.4cqw, 26px); --bt-font: clamp(10px, 4.8cqw, 16px); }
.bt.in-page {
    position: relative;
    top: auto;
    max-width: 640px;
    margin: 6px auto 10px;
    padding: 8px 10px 6px;
    background: radial-gradient(120% 140% at 0% 50%, rgba(255, 45, 111, .22), transparent 55%),
        radial-gradient(120% 140% at 100% 50%, rgba(41, 160, 246, .22), transparent 55%), #0c0c14;
    border-radius: 12px;
    --bt-h: 24px;
    --bt-font: 15px;
}
.bt[hidden] { display: none; }
.bt.entering { animation: btEnter .6s cubic-bezier(.2, 1.3, .4, 1) both; }
.bt.leaving { opacity: 0; transform: translateY(-10px) scale(.98); }
@keyframes btEnter { from { opacity: 0; transform: translateY(-14px) scaleX(.6); } to { opacity: 1; transform: none; } }

.bt-bar {
    position: relative;
    display: flex;
    height: var(--bt-h);
    isolation: isolate;
}
/* هالة متوهجة حول الشريط */
.bt-bar::before {
    content: '';
    position: absolute;
    inset: -3px -2px;
    background: linear-gradient(90deg, #ff2d6f, #ff6f9c 45%, #6fd2ff 55%, #2a86f7);
    filter: blur(7px);
    opacity: .6;
    z-index: -1;
    animation: btGlow 2.4s ease-in-out infinite;
}
@keyframes btGlow { 0%, 100% { opacity: .4; } 50% { opacity: .85; } }

.bt-seg {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: visible;
    transition: width .8s cubic-bezier(.2, .8, .2, 1), filter .3s;
    min-width: 0;
}
.bt-seg::after { /* لمعة تجري على الشريط */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
    background-size: 220% 100%;
    animation: btShine 3s linear infinite;
    pointer-events: none;
}
@keyframes btShine { from { background-position: 130% 0; } to { background-position: -90% 0; } }

.bt-seg.s0 { background: linear-gradient(90deg, #e3124a 0%, #ff2d6f 55%, #ff5c8f 100%); justify-content: flex-start; padding-left: 6px; }
.bt-seg.s1 { background: linear-gradient(90deg, #4fd0ff 0%, #24aaf6 45%, #1d7ef3 100%); justify-content: flex-end; padding-right: 6px; flex: 1 1 auto; }
.bt-seg.s2 { background: linear-gradient(90deg, #ffb703, #fb8500); justify-content: center; }
.bt-seg.s3 { background: linear-gradient(90deg, #9b5cff, #6a3df0); justify-content: center; }
.bt-seg.s1 ~ .bt-seg.s2, .bt-seg.s1 ~ .bt-seg.s3 { flex: 0 0 auto; }
.bt-seg.flash { animation: btFlash .55s ease-out; }
@keyframes btFlash { 0% { filter: brightness(1.7) saturate(1.3); } 100% { filter: none; } }
.bt-seg.win { box-shadow: inset 0 0 0 2px #ffd54a, 0 0 12px rgba(255, 213, 74, .8); z-index: 1; }
.bt.finished .bt-seg.lose { filter: saturate(.55) brightness(.8); }

.bt-score {
    position: relative;
    z-index: 2;
    color: #fff;
    font-weight: 800;
    font-size: var(--bt-font);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
    white-space: nowrap;
}

/* الإيموجي عند نقطة الالتقاء */
.bt-spark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: left .8s cubic-bezier(.2, .8, .2, 1);
    font-size: calc(var(--bt-h) * 1.15);
    line-height: 1;
}
.bt-spark::before {
    content: '';
    position: absolute;
    inset: -35%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(255, 220, 120, .65) 30%, transparent 70%);
    animation: btSpark 1.2s ease-in-out infinite;
    z-index: -1;
}
.bt-spark span { display: block; filter: drop-shadow(0 0 4px rgba(0, 0, 0, .4)); }
.bt-spark.hot span { animation: btWiggle .5s ease-in-out infinite; }
@keyframes btSpark { 0%, 100% { transform: scale(.75); opacity: .55; } 50% { transform: scale(1.15); opacity: 1; } }
@keyframes btWiggle { 0%, 100% { transform: rotate(-10deg) scale(1); } 50% { transform: rotate(10deg) scale(1.12); } }

.bt-float {
    position: absolute;
    bottom: 100%;
    left: 50%;
    z-index: 4;
    color: #fff;
    font-weight: 900;
    font-size: calc(var(--bt-font) * .95);
    text-shadow: 0 0 6px rgba(255, 213, 74, .95), 0 1px 2px #000;
    white-space: nowrap;
    animation: btFloat 1.15s ease-out forwards;
}
.bt-seg.s0 .bt-float { left: 30%; }
.bt-seg.s1 .bt-float { left: auto; right: 22%; }
@keyframes btFloat { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -2px) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -18px) scale(1); } }

.bt-crit {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffde59, #ff8a00);
    color: #3a1500;
    font-weight: 900;
    font-size: calc(var(--bt-font) * .8);
    white-space: nowrap;
    box-shadow: 0 0 14px rgba(255, 190, 40, .9);
    animation: btCrit 1.8s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
.bt-crit img { width: 1.4em; height: 1.4em; object-fit: contain; }
@keyframes btCrit { 0% { opacity: 0; transform: translateX(-50%) scale(.3); } 15% { opacity: 1; transform: translateX(-50%) scale(1.15); } 25% { transform: translateX(-50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(-6px); } }

/* سطر العدّاد وأفضل الداعمين */
.bt-sub {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    min-height: calc(var(--bt-h) * 1.1);
    margin-top: 3px;
}
.bt-timer {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: 0 0 6px 6px;
    background: rgba(0, 0, 0, .62);
    color: #fff;
    font-size: calc(var(--bt-font) * .82);
    font-weight: 700;
    white-space: nowrap;
    direction: rtl;
    margin-top: -3px;
    transition: background .3s;
}
.bt-timer span { direction: ltr; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.bt.finished .bt-timer { background: linear-gradient(90deg, rgba(255, 45, 111, .85), rgba(41, 160, 246, .85)); }
.bt.urgent .bt-timer { background: #e11d48; animation: btBeat 1s ease-in-out infinite; }
.bt.urgent .bt-bar::before { animation-duration: .5s; opacity: 1; }
@keyframes btBeat { 0%, 100% { transform: translateX(-50%) scale(1); } 30% { transform: translateX(-50%) scale(1.14); } }

.bt-tops { display: flex; gap: 2px; align-items: center; }
.bt-fan {
    position: relative;
    width: calc(var(--bt-h) * 1.05);
    height: calc(var(--bt-h) * 1.05);
    border-radius: 50%;
    border: 1.5px solid #ff2d6f;
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: calc(var(--bt-font) * .7);
}
.bt-fan.f1 { border-color: #29a6f6; }
.bt-fan img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bt-fan i {
    position: absolute;
    bottom: -4px;
    right: -3px;
    min-width: 11px;
    height: 11px;
    border-radius: 6px;
    background: #ff2d6f;
    color: #fff;
    font: 800 8px/11px system-ui, sans-serif;
    text-align: center;
    font-style: normal;
}
.bt-fan.f1 i { background: #1d8cf3; }
.bt-fan.r1 { box-shadow: 0 0 6px rgba(255, 213, 74, .9); }
.bt-fan em { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; }

/* العدّ التنازلي الكبير في آخر 5 ثوانٍ */
.bt-big {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    font: italic 900 32cqw/1 system-ui, sans-serif;
    color: #fff;
    -webkit-text-stroke: 2px rgba(255, 45, 111, .9);
    text-shadow: 0 0 18px rgba(255, 45, 111, .9), 0 0 32px rgba(41, 160, 246, .8);
    animation: btBig .95s ease-out forwards;
}
@keyframes btBig { 0% { opacity: 0; transform: scale(2.2); } 25% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(.7); } }

/* مقدمة الجولة: صورتا الطرفين تتصادمان مع VS */
.bt-intro {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2cqw;
    background: radial-gradient(circle, rgba(0, 0, 0, .25), rgba(0, 0, 0, .7));
    animation: btIntroBg 2.3s ease forwards;
    direction: ltr;
}
.bt-intro.fixed { position: fixed; z-index: 10000; pointer-events: none; }
.bt-intro::after { content: ''; position: absolute; inset: 0; background: #fff; opacity: 0; animation: btWhite .5s .5s ease-out; }
.bt-iav { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; font: 800 min(4.5cqw, 16px)/1.2 system-ui, sans-serif; text-shadow: 0 1px 3px #000; max-width: 34%; }
.bt-iav span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-iav img { width: min(26cqw, 120px); height: min(26cqw, 120px); border-radius: 50%; object-fit: cover; background: #222; }
.bt-iav.a img { border: 3px solid #ff2d6f; box-shadow: 0 0 22px #ff2d6f; }
.bt-iav.b img { border: 3px solid #29a6f6; box-shadow: 0 0 22px #29a6f6; }
.bt-iav.a { animation: btInA .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.bt-iav.b { animation: btInB .55s cubic-bezier(.2, 1.4, .4, 1) both; }
.bt-vs {
    font: italic 900 min(17cqw, 78px)/1 system-ui, sans-serif;
    background: linear-gradient(180deg, #fff 20%, #ffd54a 60%, #ff8a00);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 45, 111, .9)) drop-shadow(0 0 16px rgba(41, 160, 246, .8));
    animation: btVs .45s .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes btInA { from { opacity: 0; transform: translateX(-120%) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes btInB { from { opacity: 0; transform: translateX(120%) rotate(20deg); } to { opacity: 1; transform: none; } }
@keyframes btVs { from { opacity: 0; transform: scale(3.2); } to { opacity: 1; transform: scale(1); } }
@keyframes btWhite { 0% { opacity: .75; } 100% { opacity: 0; } }
@keyframes btIntroBg { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* إعلان النتيجة */
.bt-result {
    position: absolute;
    inset: 0;
    z-index: 7;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: btResultBox 4.2s ease forwards;
}
.bt-result.fixed { position: fixed; z-index: 10000; pointer-events: none; }
.bt-result > span {
    padding: .35em 1em;
    border-radius: 999px;
    color: #fff;
    font: 900 min(9cqw, 40px)/1.1 system-ui, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .35);
    white-space: nowrap;
    animation: btResult .6s cubic-bezier(.2, 1.5, .4, 1) both;
}
.bt-result.win > span { background: linear-gradient(90deg, #ff2d6f, #ffb000); box-shadow: 0 0 28px rgba(255, 176, 0, .85); }
.bt-result.lose > span { background: linear-gradient(90deg, #475569, #1e3a8a); box-shadow: 0 0 18px rgba(41, 160, 246, .6); }
.bt-result.draw > span { background: linear-gradient(90deg, #ff2d6f, #8b5cf6, #29a6f6); box-shadow: 0 0 22px rgba(139, 92, 246, .8); }
@keyframes btResult { from { opacity: 0; transform: scale(.3) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes btResultBox { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
.bt-confetti {
    position: absolute;
    top: -12px;
    width: 7px;
    height: 11px;
    border-radius: 2px;
    animation: btConfetti 2.8s ease-in forwards;
}
@keyframes btConfetti { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(120cqh) rotate(var(--r)); opacity: .2; } }
.bt-result.fixed .bt-confetti { animation-name: btConfettiPage; }
@keyframes btConfettiPage { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(100vh) rotate(var(--r)); opacity: .2; } }

/* ═══════════ مؤثرات الهدايا ═══════════ */
#gfx { font-family: inherit; position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: visible; container-type: size; }
#gfx.fixed { position: fixed; z-index: 9990; }
#gfx.shake { animation: gfxShake .6s ease-in-out .35s; }
@keyframes gfxShake { 0%, 100% { transform: none; } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 2px); } }

.gfx-tray {
    position: absolute;
    left: 6px;
    bottom: 13%; /* تحت اسم مرسل الهدية الكبيرة */
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 6px;
    direction: ltr;
    max-width: calc(100% - 64px); /* يترك مكانًا لعدّاد xN */
    z-index: 5; /* فوق مشهد الهدية الكبيرة */
}
#gfx.fixed .gfx-tray { left: 14px; bottom: 90px; max-width: 360px; }
body.mobile-responsive-layout #gfx:not(.fixed) .gfx-tray { min-width: 190px; }
body.mobile-responsive-layout #gfx:not(.fixed) .gfx-banner .tx b,
body.mobile-responsive-layout #gfx:not(.fixed) .gfx-banner .tx small { max-width: 90px; }
.gfx-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 60px 4px 4px;
    border-radius: 999px;
    font-family: inherit; /* خط الصفحة نفسه */
    background: linear-gradient(90deg, rgba(10, 10, 20, .78), rgba(10, 10, 20, .35));
    color: #fff;
    min-width: 0;
    animation: gfxIn .38s cubic-bezier(.2, 1.35, .4, 1) both;
}
.gfx-banner.t1 { background: linear-gradient(90deg, rgba(255, 45, 111, .85), rgba(255, 45, 111, .25)); }
.gfx-banner.t2 { background: linear-gradient(90deg, rgba(139, 92, 246, .9), rgba(255, 45, 111, .35)); box-shadow: 0 0 12px rgba(139, 92, 246, .55); }
.gfx-banner.t3 { background: linear-gradient(90deg, rgba(255, 170, 0, .95), rgba(255, 45, 111, .45)); box-shadow: 0 0 16px rgba(255, 190, 40, .8); }
.gfx-banner.out { animation: gfxOut .4s ease forwards; }
.gfx-banner .av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #333; flex: 0 0 auto; border: 1.5px solid rgba(255, 255, 255, .7); }
.gfx-banner .tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.gfx-banner .tx b { font-weight: 800; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(120px, 32cqw); }
.gfx-banner .tx small { font-weight: 600; font-size: 12px; color: #ffe08a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: min(120px, 32cqw); }
.gfx-banner .gi { position: absolute; right: -4px; top: 50%; width: 54px; height: 54px; object-fit: contain; transform: translateY(-50%); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); animation: gfxGift .5s .1s cubic-bezier(.2, 1.6, .4, 1) both; }
.gfx-banner .x {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    font: italic 900 28px/1 system-ui, sans-serif;
    color: #ffe14d;
    -webkit-text-stroke: 1px #9a4b00;
    text-shadow: 0 0 8px rgba(255, 200, 0, .75), 0 2px 2px rgba(0, 0, 0, .45);
    white-space: nowrap;
}
.gfx-banner .x.bump { animation: gfxBump .35s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes gfxIn { from { opacity: 0; transform: translateX(-110%); } to { opacity: 1; transform: none; } }
@keyframes gfxOut { to { opacity: 0; transform: translateX(-40px); } }
@keyframes gfxGift { from { opacity: 0; transform: translateY(-50%) scale(.2) rotate(-30deg); } to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes gfxBump { 0% { transform: translateY(-50%) scale(1.9); } 100% { transform: translateY(-50%) scale(1); } }

.gfx-center {
    position: absolute;
    inset: 0;
    overflow: hidden; /* Keep large scenes and particles inside the video. */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2cqh;
    animation: gfxFadeIn .3s ease both;
}
.gfx-center.out { animation: gfxFadeOut .45s ease forwards; }
@keyframes gfxFadeIn { from { opacity: 0; } }
@keyframes gfxFadeOut { to { opacity: 0; transform: scale(1.06); } }
.gfx-veil { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(40, 10, 60, .2), rgba(0, 0, 0, .55)); }
.gfx-center.t3 .gfx-veil { background: radial-gradient(circle at 50% 45%, rgba(80, 20, 110, .35), rgba(0, 0, 0, .78)); }
.gfx-rays {
    position: absolute;
    left: 50%;
    top: 45%;
    width: 170cqmax;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: repeating-conic-gradient(from 0deg, rgba(255, 221, 120, .42) 0deg 7deg, transparent 7deg 20deg);
    -webkit-mask-image: radial-gradient(circle, #000 8%, transparent 46%);
    mask-image: radial-gradient(circle, #000 8%, transparent 46%);
    animation: gfxSpin 7s linear infinite, gfxFadeIn .6s ease both;
}
.gfx-center.t3 .gfx-rays { background: repeating-conic-gradient(from 0deg, rgba(255, 221, 120, .5) 0deg 6deg, rgba(150, 90, 255, .25) 6deg 12deg, transparent 12deg 20deg); animation-duration: 4.5s; }
@keyframes gfxSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.gfx-glow { position: absolute; left: 50%; top: 45%; width: 70cqw; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(255, 236, 160, .85) 0%, rgba(255, 120, 170, .35) 38%, transparent 68%); animation: gfxPulse 1.4s ease-in-out infinite; }
.gfx-center.t1 .gfx-glow { width: 50cqw; opacity: .8; }
@keyframes gfxPulse { 0%, 100% { transform: translate(-50%, -50%) scale(.9); } 50% { transform: translate(-50%, -50%) scale(1.08); } }
.gfx-ring { position: absolute; left: 50%; top: 45%; width: 30cqw; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 0 16px rgba(255, 213, 74, .9); transform: translate(-50%, -50%) scale(.2); opacity: 0; animation: gfxRing 1.1s .35s ease-out forwards; }
.gfx-ring.r2 { animation-delay: .75s; border-color: rgba(120, 200, 255, .9); }
@keyframes gfxRing { 0% { opacity: 1; transform: translate(-50%, -50%) scale(.2); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(4); } }
.gfx-aurora { position: absolute; inset: -20%; background: conic-gradient(from 0deg, rgba(255, 45, 111, .25), rgba(41, 160, 246, .25), rgba(255, 213, 74, .25), rgba(155, 92, 255, .25), rgba(255, 45, 111, .25)); filter: blur(30px); animation: gfxSpin 9s linear infinite; mix-blend-mode: screen; left: 50%; top: 50%; width: 140%; height: 140%; transform: translate(-50%, -50%); }

.gfx-img { position: relative; z-index: 2; width: 46cqw; max-width: 360px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 0 16px rgba(255, 210, 80, .85)); animation: gfxPop 3.3s cubic-bezier(.2, 1.3, .4, 1) both; }
.gfx-center.t1 .gfx-img { width: 32cqw; animation: gfxPopSmall 1.7s cubic-bezier(.2, 1.5, .4, 1) both; }
.gfx-center.t3 .gfx-img { width: 62cqw; animation: gfxPopEpic 5.2s cubic-bezier(.2, 1.2, .4, 1) both; }
@keyframes gfxPopSmall { 0% { opacity: 0; transform: scale(.2) rotate(-25deg); } 30% { opacity: 1; transform: scale(1.12); } 45% { transform: scale(1); } 80% { opacity: 1; transform: translateY(-4cqh); } 100% { opacity: 0; transform: translateY(-12cqh) scale(.8); } }
@keyframes gfxPop { 0% { opacity: 0; transform: translateY(40cqh) scale(.3); } 22% { opacity: 1; transform: translateY(-2cqh) scale(1.12); } 32% { transform: none; } 50% { transform: translateY(-2cqh); } 70% { transform: none; } 100% { transform: translateY(-1cqh) scale(1.03); } }
@keyframes gfxPopEpic { 0% { opacity: 0; transform: scale(6); filter: blur(10px) drop-shadow(0 0 16px rgba(255, 210, 80, .85)); } 16% { opacity: 1; transform: scale(.92); filter: drop-shadow(0 0 22px rgba(255, 210, 80, .95)); } 24% { transform: scale(1.06); } 32% { transform: scale(1); } 55% { transform: translateY(-2.5cqh) rotate(-2deg); } 78% { transform: translateY(0) rotate(2deg); } 100% { transform: scale(1.04); } }

.gfx-cap { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .4em 1.2em; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 45, 111, .92), rgba(255, 170, 0, .92)); color: #fff; text-align: center; box-shadow: 0 0 18px rgba(255, 170, 0, .6); animation: gfxCap .6s .5s cubic-bezier(.2, 1.5, .4, 1) both; max-width: 90%; }
.gfx-center.t3 .gfx-cap { background: linear-gradient(90deg, #ffcf3a, #ff7a00, #ff2d6f); }
.gfx-cap b { font: 900 min(5.2cqw, 22px)/1.15 system-ui, sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gfx-cap span { font: 700 min(3.8cqw, 15px)/1.2 system-ui, sans-serif; }
@keyframes gfxCap { from { opacity: 0; transform: translateY(14px) scale(.6); } to { opacity: 1; transform: none; } }

.gfx-p { position: absolute; left: 50%; top: 45%; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); opacity: 0; animation: gfxBurst 1.3s ease-out forwards; z-index: 2; }
@keyframes gfxBurst { 0% { opacity: 1; transform: translate(-50%, -50%) scale(1.3); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(.3); } }
.gfx-star { position: absolute; top: -20px; color: #ffe27a; text-shadow: 0 0 8px rgba(255, 220, 120, .9); animation: gfxStar 2.6s linear forwards; z-index: 2; }
@keyframes gfxStar { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(110cqh) rotate(540deg); opacity: 0; } }
.gfx-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: screen; }
.gfx-film .gfx-cap { position: absolute; bottom: 12%; }

/* زر تشغيل/إيقاف المؤثرات */
#giftFxToggle.off { opacity: .45; filter: grayscale(1); }

@media (prefers-reduced-motion: reduce) {
    .bt-seg::after, .gfx-rays, .gfx-aurora, #lfxStage.lfx-battle::before, .bt-bar::before { animation: none !important; }
    #gfx.shake { animation: none; }
}

/* ═══════════ ملء الشاشة: الفيديو مع الشريط والهدايا ═══════════ */
#videoCenterSlot:fullscreen { width: 100vw !important; height: 100vh !important; max-width: none !important; background: #000; display: flex; align-items: center; justify-content: center; }
#videoCenterSlot:-webkit-full-screen { width: 100vw !important; height: 100vh !important; max-width: none !important; background: #000; display: flex; align-items: center; justify-content: center; }
#videoCenterSlot.lfx-fs { position: fixed !important; inset: 0; z-index: 2147483000; width: 100vw !important; height: 100dvh !important; max-width: none !important; background: #000; display: flex; align-items: center; justify-content: center; }
#videoCenterSlot:fullscreen #liveVideoContainer { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain; border-radius: 0; }
#videoCenterSlot:-webkit-full-screen #liveVideoContainer { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain; border-radius: 0; }
#videoCenterSlot.lfx-fs #liveVideoContainer { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: contain; border-radius: 0; }
#videoCenterSlot:fullscreen #lfxStage { border-radius: 0; }
#videoCenterSlot.lfx-fs #lfxStage { border-radius: 0; }
html.lfx-fs-lock, html.lfx-fs-lock body { overflow: hidden; }
