/* Overlay principal - Compatible con IE8+ */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    /* Fallback para IE8 */
    background-color: #000000;
    filter: alpha(opacity=90);
    display: none;
    z-index: 999999;
    margin: 0;
    padding: 20px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* Flexbox fallback para navegadores antiguos */
#overlay {
    text-align: center;
}

#overlay:before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: middle;
    margin-right: -0.25em;
}

/* Contenedor del mensaje */
#messageBox {
    display: inline-block;
    vertical-align: middle;
    text-align: center;
    position: relative;
    background: #2c3e50;
    /* Fallback para navegadores sin gradientes */
    background: -webkit-linear-gradient(135deg, #2c3e50, #34495e);
    background: -moz-linear-gradient(135deg, #2c3e50, #34495e);
    background: -o-linear-gradient(135deg, #2c3e50, #34495e);
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    border: 3px solid #3498db;
    /* Sombras compatibles */
    -webkit-box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    -moz-box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

/* Responsive para dispositivos móviles */
@media (max-width: 768px) {
    #messageBox {
        margin: 20px;
        padding: 30px 20px;
        max-width: calc(100% - 40px);
        /* Fallback para calc() */
        max-width: 90%;
    }
}

/* Botones con efectos compatibles */
#closeButton {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Transiciones compatibles */
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    -webkit-box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
    -moz-box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}