/* ==========================================================================
   شريط التشجيع والاحتفال — مستخلَص من game-layout-v1.css
   مصدر واحد يشترك فيه قالب الألعاب (front.layouts.game) والألعاب التي
   تُمدّد القالب العام، حتى لا تتباعد نسختان مع الوقت.
   ========================================================================== */

/* ========================================
   ENCOURAGEMENT PANEL
   ======================================== */
.encouragement-panel {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(15, 15, 35, .95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 8px 16px; z-index: 9999;
}
.encouragement-buttons {
    display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.btn-encourage {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 14px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.05);
    color: #fff; cursor: pointer;
    font-weight: 600; font-size: .8rem;
    transition: all .2s; font-family: 'Tajawal', sans-serif;
    position: relative; overflow: hidden;
}
.btn-encourage:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,.3); }
.btn-encourage:active { transform: scale(.95); }

/* Ripple effect on click */
.btn-encourage .ripple {
    position: absolute; border-radius: 50%;
    background: rgba(255,255,255,.4);
    transform: scale(0); animation: rippleAnim .6s ease-out;
    pointer-events: none;
}
@keyframes rippleAnim {
    to { transform: scale(4); opacity: 0; }
}

.btn-encourage.clap { color: #fbbf24; border-color: rgba(251,191,36,.3); }
.btn-encourage.clap:hover { background: rgba(251,191,36,.15); }
.btn-encourage.star { color: #a78bfa; border-color: rgba(167,139,250,.3); }
.btn-encourage.star:hover { background: rgba(167,139,250,.15); }
.btn-encourage.heart { color: #f472b6; border-color: rgba(244,114,182,.3); }
.btn-encourage.heart:hover { background: rgba(244,114,182,.15); }
.btn-encourage.trophy { color: #fb923c; border-color: rgba(251,146,60,.3); }
.btn-encourage.trophy:hover { background: rgba(251,146,60,.15); }
.btn-encourage.excellent { color: #34d399; border-color: rgba(52,211,153,.3); }
.btn-encourage.excellent:hover { background: rgba(52,211,153,.15); }

/* ========================================
   CELEBRATION OVERLAY - Enhanced Effects
   ======================================== */
.celebration-overlay {
    position: fixed; inset: 0; pointer-events: none;
    z-index: 99999; display: none;
    align-items: center; justify-content: center;
    background: rgba(0,0,0,.15);
}
.celebration-overlay.show { display: flex; }

.celebration-wrapper {
    position: relative; display: flex;
    align-items: center; justify-content: center;
}

/* Expanding rings */
.celeb-ring {
    position: absolute;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    width: 80px; height: 80px;
    animation: celebRing 1.2s ease-out forwards;
    opacity: 0;
}
.celeb-ring:nth-child(2) { animation-delay: .15s; border-color: rgba(251,191,36,.4); }
.celeb-ring:nth-child(3) { animation-delay: .3s; border-color: rgba(167,139,250,.4); }
.celeb-ring:nth-child(4) { animation-delay: .45s; border-color: rgba(244,114,182,.4); }

@keyframes celebRing {
    0% { transform: scale(.5); opacity: .8; }
    100% { transform: scale(3.5); opacity: 0; }
}

/* Floating particles around emoji */
.celeb-particle {
    position: absolute;
    font-size: 1.5rem;
    animation: celebFloat 1.5s ease-out forwards;
    opacity: 0;
}
.celeb-particle:nth-child(1) { --angle: 0deg; --dist: 80px; animation-delay: .1s; }
.celeb-particle:nth-child(2) { --angle: 60deg; --dist: 90px; animation-delay: .2s; }
.celeb-particle:nth-child(3) { --angle: 120deg; --dist: 70px; animation-delay: .15s; }
.celeb-particle:nth-child(4) { --angle: 180deg; --dist: 85px; animation-delay: .25s; }
.celeb-particle:nth-child(5) { --angle: 240deg; --dist: 75px; animation-delay: .1s; }
.celeb-particle:nth-child(6) { --angle: 300deg; --dist: 95px; animation-delay: .3s; }

@keyframes celebFloat {
    0% { transform: rotate(var(--angle)) translateY(0) scale(0); opacity: 0; }
    30% { opacity: 1; transform: rotate(var(--angle)) translateY(calc(var(--dist) * -0.5)) scale(1.2); }
    100% { opacity: 0; transform: rotate(var(--angle)) translateY(calc(var(--dist) * -1)) scale(.5); }
}

/* Glow behind emoji */
.celeb-glow {
    position: absolute;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251,191,36,.4) 0%, transparent 70%);
    animation: celebGlow 1.5s ease-out forwards;
}
@keyframes celebGlow {
    0% { transform: scale(0); opacity: .8; }
    50% { transform: scale(1.5); opacity: .6; }
    100% { transform: scale(2); opacity: 0; }
}

/* Main emoji */
.celebration-character {
    font-size: 7rem;
    filter: drop-shadow(0 4px 20px rgba(0,0,0,.4));
    animation: celebBounce .6s ease forwards;
    position: relative; z-index: 2;
}

@keyframes celebBounce {
    0% { transform: scale(0) rotate(-10deg); opacity: 0; }
    40% { transform: scale(1.3) rotate(5deg); opacity: 1; }
    70% { transform: scale(.9) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Floating mini emojis after bounce */
.celeb-mini {
    position: absolute; font-size: 1.8rem;
    animation: celebMini 2s ease-out forwards;
    opacity: 0; pointer-events: none;
}
@keyframes celebMini {
    0% { opacity: 0; transform: translateY(0) scale(0); }
    20% { opacity: 1; transform: translateY(-20px) scale(1); }
    100% { opacity: 0; transform: translateY(-120px) scale(.3) rotate(var(--rot, 20deg)); }
}

/* ملء الشاشة: الشريط يبقى فوق المحتوى */
.game-layout:fullscreen .encouragement-panel { position: fixed !important; z-index: 999 !important; }
.game-layout:fullscreen .celebration-overlay { z-index: 99999 !important; }

@media (max-width: 768px) {
    .encouragement-panel { padding: 6px 10px; }
    .btn-encourage { padding: 5px 10px; font-size: .75rem; }
    .celebration-character { font-size: 5rem; }
}

@media (max-width: 480px) {
    .btn-encourage { padding: 4px 8px; font-size: .7rem; gap: 3px; }
    .celebration-character { font-size: 4rem; }
}
