.popup-overlay {
    position: fixed; /* Fija la posición respecto a la ventana del navegador */
    top: 0;
    left: 0;
    width: 100%; /* Ancho completo */
    height: 100%; /* Altura completa */
    background: rgba(0, 0, 0, 0.5); /* Fondo negro semi-transparente */
    z-index: 999; /* Asegura que se sitúe sobre otros elementos */
    display: none; /* Oculto por defecto */
}

#miPopup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: auto;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 10px;
    justify-content: center;
    align-items: center;
    color: white;
}

#miPopup .contenido {
    text-align: center;
    color: #fff;
    background-color: #000;
    display: inline-block;
    padding: 30px;
}

#miPopup .close-btn {
    text-align: center;
    position: absolute;
    top: -5px;
    right: -5px;
    cursor: pointer;
    color: #fff;
    background-color: red;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
}

#miPopup #contador {
    font-size: 2em;
    margin: 20px 0;
}

#miPopup button {
    margin-bottom: 20px !important;
}

/* Estilos para tabletas */
@media (max-width: 768px) {
    #miPopup {
        padding: 10px;
    }

    #miPopup .contenido {
        padding: 10px;
    }

    #miPopup .close-btn {
        width: 25px;
        height: 25px;
    }

    #miPopup #contador {
        font-size: 1.5em;
    }
}

/* Estilos para moviles */
@media (max-width: 480px) {
    #miPopup .contenido {
        width: calc(100% - 2px); /* Ajusta el 10px según el padding que tengas */
        padding: 5px;
        box-sizing: border-box; /* Esto asegura que el padding se incluya en el ancho total */
    }

    #miPopup {
        width: 90%; /* Ocupa la mayor parte de la pantalla */
        padding: 5px;
    }

    #miPopup .close-btn {
        top: -5px;
        right: -5px;
        width: 20px;
        height: 20px;
    }

    #miPopup #contador {
        font-size: 1.2em;
    }
}