/* POPUP OVERLAY */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.popup-overlay.active {
    display: flex;  /* ← esto es lo que lo muestra */
}

/* RAIN CANVAS — cubre toda la pantalla */
#rainCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
}

/* CONFETI */
@keyframes fall {
    0%   { transform: translateY(-20px) rotate(0deg);    opacity: 1; }
    100% { transform: translateY(105vh) rotate(720deg);  opacity: 0.2; }
}
@keyframes sway {
    0%, 100% { margin-left: 0; }
    25%       { margin-left: 14px; }
    75%       { margin-left: -14px; }
}
@keyframes coin-fall {
    0%   { transform: translateY(-10px) rotateY(0deg);   opacity: 1; }
    100% { transform: translateY(105vh) rotateY(540deg); opacity: 0.3; }
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}
.confetti-piece.circle { border-radius: 50%; }
.confetti-piece.rect   { width: 14px; height: 7px; }
.confetti-piece.strip  { width: 3px;  height: 16px; border-radius: 2px; }

.coin {
    position: absolute;
    top: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFE066, #C8960C);
    border: 2px solid #B8860B;
    font-size: 20px;
    line-height: 16px;
    text-align: center;
    color: #8B6914;
    font-weight: 700;
}

/* BILLETE */
.billete {
    position: absolute;
    top: -40px;
    width: 65px;
    height: 30px;
    border-radius: 4px;
    background: linear-gradient(135deg, #2e7d32, #4CAF50, #2e7d32);
    border: 2px solid #1b5e20;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    color: #c8e6c9;
    letter-spacing: 2px;
    z-index: 10000;
}

.billete span {
    pointer-events: none;
}

@keyframes billete-fall {
    0%   { transform: translateY(-40px) rotate(0deg);   opacity: 1; }
    25%  { transform: translateY(25vh)  rotate(20deg);  }
    50%  { transform: translateY(50vh)  rotate(-15deg); }
    75%  { transform: translateY(75vh)  rotate(10deg);  }
    100% { transform: translateY(105vh) rotate(-5deg);  opacity: 0.3; }
}