/* =========================================
   OVERLAY FONDO OSCURO + BLUR
========================================= */
#popup-overlay{
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    display: none;

    justify-content: center;
    align-items: center;

    z-index: 99998;

    background: rgba(0,0,0,0.50);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);

    padding: 20px;
    box-sizing: border-box;
}

/* =========================================
   POPUP PRINCIPAL
========================================= */
.popup-sorteo{
    position: relative;

    width: 960px;
    max-width: 100%;

    border-radius: 16px;

    animation: popupShow 0.4s ease;

    z-index: 99999;

    box-shadow:
        0 0 12px rgba(198,137,70,0.45),
        0 0 28px rgba(198,137,70,0.35),
        0 0 55px rgba(198,137,70,0.25);
}

/* =========================================
   AURA DORADA ANIMADA
========================================= */
.popup-sorteo::before{
    content: "";

    position: absolute;

    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;

    border-radius: 18px;

    background: linear-gradient(
        45deg,
        rgba(198,137,70,0.15),
        rgba(255,215,120,0.35),
        rgba(198,137,70,0.15)
    );

    z-index: -1;

    animation: glowPulse 2.8s infinite ease-in-out;
}

/* =========================================
   IMAGEN
========================================= */
.popup-sorteo img{
    width: 100%;
    display: block;

    border-radius: 16px;

    box-shadow:
        0 0 30px rgba(0,0,0,0.75);
}

/* =========================================
   BOTÓN CERRAR
========================================= */
.close-popup{
    position: absolute;

    top: -16px;
    right: -16px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: linear-gradient(
        145deg,
        #FFD36B,
        #C68946
    );

    color: #111;

    font-size: 22px;
    font-weight: bold;
    line-height: 42px;
    text-align: center;

    cursor: pointer;

    z-index: 3;

    transition: all 0.25s ease;

    box-shadow:
        0 0 10px rgba(198,137,70,0.6),
        0 0 20px rgba(198,137,70,0.4);
}

.close-popup:hover{
    transform: scale(1.12) rotate(90deg);

    background: linear-gradient(
        145deg,
        #FFE7A3,
        #D89A4C
    );

    box-shadow:
        0 0 14px rgba(255,215,120,0.8),
        0 0 28px rgba(255,215,120,0.6);
}

.close-popup:active{
    transform: scale(0.95);
}

/* =========================================
   BOTÓN MÁS INFORMACIÓN
========================================= */
.popup-btn{
    display: block;

    margin-top: 14px;
    padding: 14px 18px;

    text-align: center;
    text-decoration: none;

    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.5px;

    color: #fff;

    border-radius: 12px;

    background: linear-gradient(
        145deg,
        #C68946,
        #E0A85A
    );

    transition: all 0.25s ease;

    box-shadow:
        0 0 12px rgba(198,137,70,0.45);
}

.popup-btn:hover{
    transform: translateY(-2px);

    color: #fff;
    text-decoration: none;

    background: linear-gradient(
        145deg,
        #E0A85A,
        #FFD36B
    );

    box-shadow:
        0 0 18px rgba(255,215,120,0.75),
        0 0 30px rgba(255,215,120,0.35);
}

/* =========================================
   ANIMACIONES
========================================= */
@keyframes popupShow{
    from{
        opacity: 0;
        transform: scale(0.92);
    }

    to{
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse{
    0%{
        opacity: 0.4;
        transform: scale(1);
    }

    50%{
        opacity: 0.9;
        transform: scale(1.03);
    }

    100%{
        opacity: 0.4;
        transform: scale(1);
    }
}

/* =========================================
   RESPONSIVE MOBILE
========================================= */
@media (max-width: 768px){

    #popup-overlay{
        padding: 12px;
    }

    .popup-sorteo{
        width: 100%;
        max-width: 100%;
    }

    .popup-sorteo img{
        border-radius: 14px;
    }

    .close-popup{
        top: -10px;
        right: -10px;

        width: 38px;
        height: 38px;

        font-size: 20px;
        line-height: 38px;
    }

    .popup-btn{
        font-size: 14px;
        padding: 13px;
    }
}