/*--- Fondo Oscuro (Overlay) ---*/
.modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px); /* Efecto borroso Apple */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/*--- Caja del Modal (Glassmorphism) ---*/
.modal-box {
    background: rgba(30, 30, 32, 0.85); /* Fondo oscuro translúcido */
    width: 90%;
    max-width: 350px;
    padding: 30px 25px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

/*--- Icono Animado ---*/
.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.icon-error { color: #FF3B30; } /* Rojo iOS */
.icon-success { color: #30D158; } /* Verde iOS */

/*--- Textos ---*/
.modal-box h2 {
    color: #FFFFFF;
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.modal-box p {
    color: #8E8E93; /* Gris terciario */
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

/*--- Botón de Cerrar ---*/
.btn-modal-close {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: #30D158;
    color: #000;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-modal-close:hover {
    transform: scale(1.03);
    background: #28b84d;
}

/* Clases para mostrar el modal */
.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-overlay.show .modal-box {
    transform: scale(1);
}