.timeout-modal {
    display: table;
    position: fixed;
    z-index: 400;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    overflow: hidden;
    table-layout: fixed;
    transition: all .4s;
    opacity: 0;
    visibility: hidden;
}
.timeout-modal.active {
    opacity: 1;
    visibility: visible;
}
.timeout-modal-main {
    display: table-cell;
    text-align: center;
    vertical-align: middle;
}

.timeout-modal-close {
    position: relative;
    float: right;
    width: 30px;
    height: 30px;
    transition: all .4s;
    transform: rotate(45deg);
}
.timeout-modal-close:hover {
    transform: rotate(225deg);
}
.timeout-modal-close:before,
.timeout-modal-close:after {
    content: '';
    position: absolute;
    background-color: #fff;
}
.timeout-modal-close:before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
}
.timeout-modal-close:after {
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
}

.timeout-main {
    position: relative;
    z-index: 1;
    display: inline-block;
    width: 768px;
    height: 500px;
    max-width: 90%;
    max-height: 90%;
    padding: 30px;
    background-color: #e93e3e;
    font-size: 16px;
    color: #fff;
    text-align: left;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0,0,0,.4);
    transition: all .4s;
    opacity: 0;
    visibility: hidden;
    transform: scale(.2);
}
.timeout-modal.active .timeout-main {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.timeout-main:before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 1px solid #f1f1f1;
}

.timeout-qr {
    position: relative;
    z-index: 1;
    width: 200px;
    height: 200px;
    line-height: 200px;
    margin-top: 30px;
    margin-bottom: 15px;
    background-color: #e93e3e;
}
.timeout-qr:before,
.timeout-qr:after {
    content: '';
    position: absolute;
    z-index: -1;
    left: 0;
    width: 100%;
    height: 100%;
}
.timeout-qr:after {
    transform: rotate(45deg) scale(1.2);
    background-color: inherit;
}
.timeout-qr:before {
    border: 1px solid #f4f4f4;
}

.img-contain {
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
    text-align: center;
    font-size: 0;
    overflow: hidden;
}
.img-contain img {
    display: inline-block;
    max-width: 90%;
    max-height: 90%;
}

.timeout-text {
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 40px;
    font-weight: normal;
    letter-spacing: 2px;
}
.timeout-p {
    font-size: 24px;
    font-weight: normal;
}

.timeout-foot {
    margin-top: 30px;
    font-size: 18px;
}

.timeout-btn {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 20px;
    border: 1px solid #fff;
    vertical-align: middle;
}
.timeout-btn:hover {
    color: #fff;
}

/* xs */
@media screen and (max-width: 768px) {
    .timeout-main {
        height: auto;
        padding: 20px;
    }
    .timeout-main:before {
        top: 10px;
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    .timeout-text {
        margin-top: 20px;
        font-size: 28px;
    }
    .timeout-p {
        font-size: 18px;
    }
    .timeout-foot {
        margin-top: 15px;
    }
}