/* ============================================================================
 *  DECO Natural — Promotion Popup Games (styles)
 * ========================================================================== */

#deco-promo {
    --pg-gold: #f5c542;
    --pg-accent: #22a04e;
    position: fixed;
    inset: 0;
    z-index: 99991;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s ease;
    font-family: 'Hind Siliguri', system-ui, -apple-system, sans-serif;
}
#deco-promo.pg-open { opacity: 1; }
#deco-promo.pg-hidden { display: none; }
.pg-hidden { display: none !important; }

#pg-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 50% 5%, rgba(18, 28, 52, .8), rgba(3, 6, 14, .93));
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
}

/* ---------------- প্যানেল ---------------- */
.pg-panel {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 26px;
    padding: 26px 22px 24px;
    text-align: center;
    color: #eef3fb;
    background:
        radial-gradient(90% 55% at 50% 0%, rgba(255, 216, 122, .12), transparent 62%),
        linear-gradient(180deg, #141d31 0%, #0a0f1c 100%);
    border: 1px solid rgba(255, 216, 122, .3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 30px 80px -20px rgba(0, 0, 0, .85);
    transform: translateY(24px) scale(.96);
    transition: transform .38s cubic-bezier(.2, .9, .25, 1);
}
#deco-promo.pg-open .pg-panel { transform: translateY(0) scale(1); }

/* কাউন্টডাউন — নিচ থেকে ওঠা ড্রয়ার */
#deco-promo:has(.pg-drawer) { align-items: flex-end; padding: 0; }
.pg-panel.pg-drawer {
    max-width: 100%;
    border-radius: 26px 26px 0 0;
    border-bottom: 0;
    transform: translateY(100%);
}
#deco-promo.pg-open .pg-panel.pg-drawer { transform: translateY(0); }
@media (min-width: 560px) {
    #deco-promo:has(.pg-drawer) { align-items: center; padding: 16px; }
    .pg-panel.pg-drawer { max-width: 420px; border-radius: 26px; border-bottom: 1px solid rgba(255, 216, 122, .3); transform: translateY(24px) scale(.96); }
}

#pg-close {
    position: absolute; top: 10px; right: 12px;
    width: 30px; height: 30px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .08); color: #cbd5e1;
    font-size: 17px; line-height: 1; cursor: pointer; z-index: 5;
}
#pg-close:hover { background: rgba(255, 255, 255, .16); color: #fff; }

#pg-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; z-index: 4; }
.pg-confetti-bit {
    position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px;
    animation: pg-fall linear forwards;
}
@keyframes pg-fall {
    to { transform: translateY(105vh) rotate(720deg); opacity: .1; }
}

/* ---------------- সাধারণ উপাদান ---------------- */
.pg-title {
    font-size: 19px; font-weight: 800; line-height: 1.5;
    background: linear-gradient(92deg, #ffe9a8, #ffd05e 45%, #fff6d6);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pg-sub { font-size: 11.5px; color: #93a5c1; line-height: 1.75; margin: 6px 0 14px; }
.pg-hint { font-size: 10.5px; color: #64748b; margin-top: 12px; }

.pg-btn {
    display: block; width: 100%; border: 0; border-radius: 14px; padding: 13px 20px;
    font-family: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
    transition: transform .12s, filter .15s;
}
.pg-btn:active { transform: translateY(1px); }
.pg-btn:disabled { opacity: .55; cursor: not-allowed; }
.pg-btn-primary {
    color: #2a1c00;
    background: linear-gradient(180deg, #ffe9a8 0%, #f5c542 48%, #d9a021 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .5) inset, 0 10px 22px -8px rgba(245, 197, 66, .7);
}
.pg-btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.pg-btn-ghost { color: #8fa2be; background: transparent; font-size: 12px; font-weight: 700; padding: 10px; margin-top: 4px; }
.pg-btn-ghost:hover { color: #dbe4f2; }

.pg-input {
    width: 100%; padding: 12px 14px; margin-bottom: 9px; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05);
    color: #f1f5fb; font-family: inherit; font-size: 13px; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.pg-input::placeholder { color: #64748b; }
.pg-input:focus { border-color: var(--pg-gold); box-shadow: 0 0 0 3px rgba(245, 197, 66, .16); }
.pg-error { font-size: 11px; color: #fca5a5; min-height: 15px; margin-bottom: 4px; }

.pg-prize-badge {
    font-size: 25px; font-weight: 900; line-height: 1.35; margin: 4px 0 8px;
    background: linear-gradient(92deg, #ffd75e, #fff3c4 50%, #f0b429);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pg-claim-sub { font-size: 11.5px; color: #93a5c1; line-height: 1.75; margin-bottom: 13px; }

.pg-coupon-box {
    margin: 4px 0 10px; padding: 13px; border-radius: 14px;
    border: 2px dashed rgba(255, 216, 122, .55); background: rgba(255, 216, 122, .07);
}
#pg-code {
    display: block; font-family: 'Inter', ui-monospace, monospace;
    font-size: 23px; font-weight: 900; letter-spacing: 3px; color: #ffe9a8;
}

/* ---------------- ১) কাউন্টডাউন ---------------- */
.pg-icon-ring {
    width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 28px;
    background: rgba(245, 197, 66, .12); border: 1px solid rgba(245, 197, 66, .35);
}
.pg-pulse { animation: pg-pulse 2s ease-in-out infinite; }
@keyframes pg-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 197, 66, .35); }
    50% { box-shadow: 0 0 0 14px rgba(245, 197, 66, 0); }
}

.pg-timer {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin: 4px 0 12px; font-family: 'Inter', ui-monospace, monospace;
}
.pg-timer span {
    min-width: 58px; padding: 10px 6px; border-radius: 14px;
    font-size: 30px; font-weight: 900; color: #fff;
    background: linear-gradient(180deg, #223049, #131c2e);
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .9);
}
.pg-timer b { font-size: 24px; color: #f5c542; }
.pg-timer.pg-urgent span { color: #fda4af; border-color: rgba(253, 164, 175, .4); animation: pg-blink 1s steps(2) infinite; }
.pg-timer.pg-expired span { opacity: .45; }
@keyframes pg-blink { 50% { opacity: .55; } }

.pg-offer-chip {
    display: inline-block; margin-bottom: 14px; padding: 7px 18px; border-radius: 999px;
    font-size: 14px; font-weight: 900; color: #2a1c00;
    background: linear-gradient(180deg, #ffe9a8, #f5c542);
}

/* ---------------- ২) বাবল পপ ---------------- */
.pg-bubbles {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin: 6px 0 4px;
}
.pg-bubble {
    position: relative; aspect-ratio: 1/1; border: 0; border-radius: 50%; cursor: pointer;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .85), rgba(255, 255, 255, .12) 42%, transparent 60%),
        radial-gradient(circle at 65% 72%, color-mix(in srgb, var(--tint) 85%, #000), color-mix(in srgb, var(--tint) 45%, #06121f));
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .18) inset;
    animation: pg-float 3.4s ease-in-out infinite;
    transition: transform .18s;
}
.pg-bubble:hover { transform: scale(1.07); }
.pg-bubble-q {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 900; color: rgba(255, 255, 255, .92);
    text-shadow: 0 2px 5px rgba(0, 0, 0, .45);
}
.pg-bubble-shine {
    position: absolute; top: 14%; left: 20%; width: 26%; height: 20%;
    border-radius: 50%; background: rgba(255, 255, 255, .7); filter: blur(2px);
}
@keyframes pg-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}
.pg-bubble.pg-pop { animation: pg-pop .42s ease-out forwards; }
@keyframes pg-pop {
    40% { transform: scale(1.35); opacity: .85; }
    100% { transform: scale(0); opacity: 0; }
}
.pg-bubble.pg-fade { animation: none; opacity: .25; transform: scale(.9); transition: all .4s; }

/* ---------------- ৩) ফার্স্ট অর্ডার ---------------- */
.pg-gift { font-size: 46px; margin-bottom: 6px; animation: pg-bounce 2.2s ease-in-out infinite; }
@keyframes pg-bounce {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-9px) rotate(4deg); }
}
.pg-mega {
    font-size: 34px; font-weight: 900; line-height: 1.25; margin: 8px 0;
    background: linear-gradient(92deg, #ffd75e, #fff3c4 50%, #f0b429);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    text-shadow: 0 0 40px rgba(255, 205, 90, .3);
}

/* ---------------- ৪) কুইজ ---------------- */
.pg-progress { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-bottom: 10px; }
.pg-progress i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #f5c542, #ffe9a8); transition: width .35s ease; }
.pg-step { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #64748b; margin-bottom: 8px; }
.pg-question { font-size: 15px; font-weight: 800; line-height: 1.6; color: #eef3fb; margin-bottom: 14px; }
.pg-options { display: flex; flex-direction: column; gap: 8px; }
.pg-option {
    width: 100%; padding: 13px 16px; border-radius: 13px; cursor: pointer; text-align: left;
    font-family: inherit; font-size: 12.5px; font-weight: 700; color: #dbe4f2;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12);
    transition: background .15s, border-color .15s, transform .12s;
}
.pg-option:hover { background: rgba(255, 255, 255, .1); border-color: rgba(245, 197, 66, .45); }
.pg-option:active { transform: translateY(1px); }
.pg-option.pg-selected { background: rgba(245, 197, 66, .18); border-color: var(--pg-gold); color: #ffe9a8; }

/* ---------------- ৫) স্ক্র্যাচ কার্ড ---------------- */
.pg-scratch-wrap {
    position: relative; width: 100%; aspect-ratio: 16/9; margin: 4px 0 2px;
    border-radius: 18px; overflow: hidden;
    border: 1px solid rgba(255, 216, 122, .35);
    box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .9);
}
.pg-scratch-under {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    padding: 12px; text-align: center;
    background: linear-gradient(135deg, #1b2740, #0d1524);
}
.pg-scratch-under span {
    font-size: 27px; font-weight: 900; line-height: 1.3;
    background: linear-gradient(92deg, #ffd75e, #fff3c4 50%, #f0b429);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
#pg-scratch {
    position: absolute; inset: 0; width: 100%; height: 100%;
    cursor: crosshair; touch-action: none; transition: opacity .5s ease;
}
#pg-scratch.pg-scratch-gone { opacity: 0; pointer-events: none; }

/* ---------------- ছোট পর্দা ---------------- */
@media (max-width: 380px) {
    .pg-panel { padding: 22px 15px 20px; }
    .pg-title { font-size: 17px; }
    .pg-mega { font-size: 28px; }
    .pg-timer span { min-width: 50px; font-size: 25px; }
    .pg-bubbles { gap: 9px; }
}

@media (prefers-reduced-motion: reduce) {
    #deco-promo, .pg-panel, .pg-bubble, .pg-gift, .pg-pulse { transition: none; animation: none; }
}
