/* Fondo oscuro */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}

/* Mostrar modal */
.modal-overlay.activo {
    opacity: 1;
    visibility: visible;
}

/* Caja del modal */
.modal-box {
    background: #ffffff;
    padding: 30px;
    width: 90%;
    max-width: 350px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: aparecer 0.2s ease;
}

/* Texto */
.modal-box p {
    margin-bottom: 25px;
    font-size: 16px;
    color: #333;
}

/* Botón */
.modal-box button {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    background-color: #2196F3;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
}

.modal-box button:hover {
    background-color: #1976D2;
}

/* Animación */
@keyframes aparecer {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .modal-box {
        padding: 25px 20px;
    }

    .modal-box p {
        font-size: 15px;
    }
}